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
обязательный
Исходный код
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. |

