wpseo_sitemap_exclude_taxonomy
Filter to exclude the taxonomy from the XML sitemap.
Использование
add_filter( 'wpseo_sitemap_exclude_taxonomy', 'wp_kama_wpseo_sitemap_exclude_taxonomy_filter', 10, 2 ); /** * Function for `wpseo_sitemap_exclude_taxonomy` filter-hook. * * @param bool $exclude Defaults to false. * @param string $taxonomy_name Name of the taxonomy to exclude.. * * @return bool */ function wp_kama_wpseo_sitemap_exclude_taxonomy_filter( $exclude, $taxonomy_name ){ // filter... return $exclude; }
- $exclude(true|false)
- Defaults to false.
- $taxonomy_name(строка)
- Name of the taxonomy to exclude..
Где вызывается хук
wpseo_sitemap_exclude_taxonomy
yoast/inc/sitemaps/class-taxonomy-sitemap-provider.php 303
if ( apply_filters( 'wpseo_sitemap_exclude_taxonomy', false, $taxonomy_name ) ) {