функция since 2.5.0

the_generator()

Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.

Сигнатура

the_generator( string $type )

Описание

Возвращает корректный тип генератора для запрошенного формата вывода. Позволяет плагину фильтровать генераторы в целом через фильтр 'the_generator'.

Оригинал (английский)

Returns the correct generator type for the requested output format. Allows for a plugin to filter generators overall the ‘the_generator’ filter.

Параметры

$type string обязательный
Тип генератора для вывода — (html|xhtml|atom|rss2|rdf|comment|export).

Исходный код

wp-includes/general-template.php:5164

function the_generator( $type ) {
	/**
	 * Filters the output of the XHTML generator tag, for display.
	 *
	 * @since 2.5.0
	 *
	 * @param string $generator_type The generator output.
	 * @param string $type           The type of generator to output. Accepts 'html',
	 *                               'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.
	 */
	echo apply_filters( 'the_generator', get_the_generator( $type ), $type ) . "\n";
}

История изменений

ВерсияОписание
2.5.0 Introduced.

Что будем искать? Например,Продвижение

Этот сайт использует куки-файлы. Оставаясь на сайте, Вы соглашаетесь на их использование. Для получения дополнительной информации, пожалуйста, ознакомьтесь с политикой в отношении персональных данных.