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

Filter: wpseo_accessible_post_types Allow changing the accessible post types.

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

add_filter( 'wpseo_accessible_post_types', 'wp_kama_wpseo_accessible_post_types_filter' );

/**
 * Function for `wpseo_accessible_post_types` filter-hook.
 * 
 * @param array $post_types The public post types.
 *
 * @return array
 */
function wp_kama_wpseo_accessible_post_types_filter( $post_types ){

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

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

Post_Type_Helper::get_accessible_post_types()
wpseo_accessible_post_types
yoast/src/helpers/post-type-helper.php 85
$post_types = \apply_filters( 'wpseo_accessible_post_types', $post_types );

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

yoast/admin/class-admin.php 53
add_filter( 'wpseo_accessible_post_types', [ 'WPSEO_Post_Type', 'filter_attachment_post_type' ] );