get_the_generator_rss2
Filters the HTML for the retrieved generator type.
This is one of the variants of the dynamic hook get_the_generator_(type)
Usage
add_filter( 'get_the_generator_rss2', 'wp_kama_get_the_generator_rss2_filter', 10, 2 ); /** * Function for `get_the_generator_rss2` 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_rss2_filter( $gen, $type ){ // filter... return $gen; }
- $gen(string)
- The HTML markup output to wp_head().
- $type(string)
- The type of generator. Accepts 'html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'.
Changelog
Since 2.5.0 | Introduced. |
Where the hook is called
get_the_generator_rss2
wp-includes/general-template.php 5066
return apply_filters( "get_the_generator_{$type}", $gen, $type );