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

Filter: wpseo_indexable_excluded_post_types Allows excluding posts of a certain post type from being saved to the indexable table.

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

add_filter( 'wpseo_indexable_excluded_post_types', 'wp_kama_wpseo_indexable_excluded_post_types_filter' );

/**
 * Function for `wpseo_indexable_excluded_post_types` filter-hook.
 * 
 * @param array $excluded_post_types The currently excluded post types that indexables will not be created for.
 *
 * @return array
 */
function wp_kama_wpseo_indexable_excluded_post_types_filter( $excluded_post_types ){

	// filter...
	return $excluded_post_types;
}
$excluded_post_types(массив)
The currently excluded post types that indexables will not be created for.

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

Post_Type_Helper::get_excluded_post_types_for_indexables()
wpseo_indexable_excluded_post_types
Indexables_Page_Action::get_sub_types()
wpseo_indexable_excluded_post_types
yoast/src/helpers/post-type-helper.php 108
$excluded_post_types = \apply_filters( 'wpseo_indexable_excluded_post_types', [] );
yoast/src/deprecated/src/actions/indexables-page-action.php 82
$excluded_post_types = \apply_filters( 'wpseo_indexable_excluded_post_types', [ 'attachment' ] );

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

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