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

Filter decision if post type is excluded from the XML sitemap.

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

add_filter( 'wpseo_sitemap_exclude_post_type', 'wp_kama_wpseo_sitemap_exclude_post_type_filter', 10, 2 );

/**
 * Function for `wpseo_sitemap_exclude_post_type` filter-hook.
 * 
 * @param bool   $exclude   Default false.
 * @param string $post_type Post type name.
 *
 * @return bool
 */
function wp_kama_wpseo_sitemap_exclude_post_type_filter( $exclude, $post_type ){

	// filter...
	return $exclude;
}
$exclude(true|false)
Default false.
$post_type(строка)
Post type name.

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

WPSEO_Post_Type_Sitemap_Provider::is_valid_post_type()
wpseo_sitemap_exclude_post_type
yoast/inc/sitemaps/class-post-type-sitemap-provider.php 269
if ( apply_filters( 'wpseo_sitemap_exclude_post_type', false, $post_type ) ) {

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

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