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

Filter: wpseo_cornerstone_post_types Filters post types to exclude the cornerstone feature for.

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

add_filter( 'wpseo_cornerstone_post_types', 'wp_kama_wpseo_cornerstone_post_types_filter' );

/**
 * Function for `wpseo_cornerstone_post_types` filter-hook.
 * 
 * @param array $post_types The accessible post types to filter.
 *
 * @return array
 */
function wp_kama_wpseo_cornerstone_post_types_filter( $post_types ){

	// filter...
	return $post_types;
}
$post_types(массив)
The accessible post types to filter.

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

WPSEO_Cornerstone_Filter::get_post_types()
wpseo_cornerstone_post_types
WPSEO_Metabox::get_metabox_script_data()
wpseo_cornerstone_post_types
yoast/admin/filters/class-cornerstone-filter.php 143
$post_types = apply_filters( 'wpseo_cornerstone_post_types', parent::get_post_types() );
yoast/admin/metabox/class-metabox.php 299
$post_types = apply_filters( 'wpseo_cornerstone_post_types', WPSEO_Post_Type::get_accessible_post_types() );

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

yoast/admin/filters/class-cornerstone-filter.php 28
add_filter( 'wpseo_cornerstone_post_types', [ 'WPSEO_Post_Type', 'filter_attachment_post_type' ] );
yoast/admin/filters/class-cornerstone-filter.php 29
add_filter( 'wpseo_cornerstone_post_types', [ $this, 'filter_metabox_disabled' ] );