filtrod 2.5.0
the_generator
Opis
Zmienia lub usuwa meta generator (wersja WordPressa) — ukrycie go utrudnia ataki na znane luki.
Przykład użycia
add_filter( 'the_generator', ... )php
add_filter( 'the_generator', 'wpdocs_hide_generator' );
function wpdocs_hide_generator() {
return '';
}
add_filter( 'the_generator', 'wpdocs_hide_generator' );
function wpdocs_hide_generator() {
return '';
}Parametry
| Parametr | Typ | Opis |
|---|---|---|
$generator_type | string | The generator output. |
$type | string | The type of generator to output. Accepts 'html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'the_generator', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'the_generator', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii