wpseo_exclude_from_sitemap_by_term_ids
Filter: wpseo_exclude_from_sitemap_by_term_ids Allow excluding terms by ID.
Использование
add_filter( 'wpseo_exclude_from_sitemap_by_term_ids', 'wp_kama_wpseo_exclude_from_sitemap_by_term_ids_filter' ); /** * Function for `wpseo_exclude_from_sitemap_by_term_ids` filter-hook. * * @param array $terms_to_exclude The terms to exclude. * * @return array */ function wp_kama_wpseo_exclude_from_sitemap_by_term_ids_filter( $terms_to_exclude ){ // filter... return $terms_to_exclude; }
- $terms_to_exclude(массив)
- The terms to exclude.
Где вызывается хук
wpseo_exclude_from_sitemap_by_term_ids
yoast/inc/sitemaps/class-taxonomy-sitemap-provider.php 238
$terms_to_exclude = apply_filters( 'wpseo_exclude_from_sitemap_by_term_ids', [] );