WP HOOKS
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_atom
  • get_the_generator_comment
  • get_the_generator_export
  • get_the_generator_html
  • get_the_generator_rdf
  • get_the_generator_rss2
  • get_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_xhtml

Parametry

ParametrTypOpis
$genstringThe HTML markup output to wp_head().
$typestringThe 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
}

Popularne w tej kategorii