filtrdynamicznyod 2.5.0
get_the_generator_{$type}
Args 2Plik wp-includes/general-template.php
Opis — z kodu źródłowego
Filters the HTML for the retrieved generator type.
The dynamic portion of the hook name, $type, refers to the generator type.
Possible hook names include:
get_the_generator_atomget_the_generator_commentget_the_generator_exportget_the_generator_htmlget_the_generator_rdfget_the_generator_rss2get_the_generator_xhtml
Hook dynamiczny — możliwe nazwy
get_the_generator_atomget_the_generator_commentget_the_generator_exportget_the_generator_htmlget_the_generator_rdfget_the_generator_rss2get_the_generator_xhtmlParametry
| Parametr | Typ | Opis |
|---|---|---|
$gen | string | The HTML markup output to wp_head(). |
$type | string | The type of generator. Accepts 'html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_the_generator_{$type}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_the_generator_{$type}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii