wpseo_sitemap_exclude_empty_terms_taxonomy хук-фильтрYoast 1.0

Filter the setting of excluding empty terms from the XML sitemap for a specific taxonomy.

Использование

add_filter( 'wpseo_sitemap_exclude_empty_terms_taxonomy', 'wp_kama_wpseo_sitemap_exclude_empty_terms_taxonomy_filter', 10, 2 );

/**
 * Function for `wpseo_sitemap_exclude_empty_terms_taxonomy` filter-hook.
 * 
 * @param bool   $exclude       Defaults to the sitewide setting.
 * @param string $taxonomy_name The name of the taxonomy being processed.
 *
 * @return bool
 */
function wp_kama_wpseo_sitemap_exclude_empty_terms_taxonomy_filter( $exclude, $taxonomy_name ){

	// filter...
	return $exclude;
}
$exclude(true|false)
Defaults to the sitewide setting.
$taxonomy_name(строка)
The name of the taxonomy being processed.

Где вызывается хук

WPSEO_Taxonomy_Sitemap_Provider::get_index_links()
wpseo_sitemap_exclude_empty_terms_taxonomy
WPSEO_Taxonomy_Sitemap_Provider::get_sitemap_links()
wpseo_sitemap_exclude_empty_terms_taxonomy
yoast/inc/sitemaps/class-taxonomy-sitemap-provider.php 94
$hide_empty_tax = apply_filters( 'wpseo_sitemap_exclude_empty_terms_taxonomy', $hide_empty, $taxonomy_name );
yoast/inc/sitemaps/class-taxonomy-sitemap-provider.php 197
$hide_empty_tax = apply_filters( 'wpseo_sitemap_exclude_empty_terms_taxonomy', $hide_empty, $taxonomy->name );

Где используется хук в Yoast SEO

Использование не найдено.