filtrod 5.5.0
wp_sitemaps_enabled
Opis — z kodu źródłowego
Filters whether XML Sitemaps are enabled or not.
When XML Sitemaps are disabled via this filter, rewrite rules are still in place to ensure a 404 is returned.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$is_enabled | bool | Whether XML Sitemaps are enabled or not. Defaults to true for public sites. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'wp_sitemaps_enabled', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'wp_sitemaps_enabled', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii