get_the_generator_html хук-фильтрWP 2.5.0

Filters the HTML for the retrieved generator type.

Это один из вариантов динамического хука get_the_generator_(type)

Использование

add_filter( 'get_the_generator_html', 'wp_kama_get_the_generator_html_filter', 10, 2 );

/**
 * Function for `get_the_generator_html` filter-hook.
 * 
 * @param string $gen  The HTML markup output to wp_head().
 * @param string $type The type of generator. Accepts 'html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.
 *
 * @return string
 */
function wp_kama_get_the_generator_html_filter( $gen, $type ){

	// filter...
	return $gen;
}
$gen(строка)
The HTML markup output to wp_head().
$type(строка)
The type of generator. Accepts 'html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.

Список изменений

С версии 2.5.0 Введена.

Где вызывается хук

get_the_generator()
get_the_generator_html
wp-includes/general-template.php 5049
return apply_filters( "get_the_generator_{$type}", $gen, $type );

Где используется хук в WordPress

Использование не найдено.