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', 'filter_function_name_6638', 10, 2 ); function filter_function_name_6638( $exclude, $post_type ){ // filter... return $exclude; }
- $exclude(true/false)
- Default false.
- $post_type(строка)
- Post type name.
Где вызывается хук
wpseo_sitemap_exclude_post_type
yoast/inc/sitemaps/class-post-type-sitemap-provider.php 276
if ( apply_filters( 'wpseo_sitemap_exclude_post_type', false, $post_type ) ) {