Yoast\WP\SEO\Helpers
Post_Type_Helper::get_excluded_post_types_for_indexables() public Yoast 1.0
Returns an array of post types that are excluded from being indexed for the indexables.
{} Это метод класса: Post_Type_Helper{}
Хуки из метода
Возвращает
Массив. The excluded post types.
Использование
$Post_Type_Helper = new Post_Type_Helper(); $Post_Type_Helper->get_excluded_post_types_for_indexables();
Код Post_Type_Helper::get_excluded_post_types_for_indexables() Post Type Helper::get excluded post types for indexables Yoast 15.6.2
public function get_excluded_post_types_for_indexables() {
/**
* Filter: 'wpseo_indexable_excluded_post_types' - Allow developers to prevent posts of a certain post
* type from being saved to the indexable table.
*
* @param array $excluded_post_types The currently excluded post types.
*/
$excluded_post_types = \apply_filters( 'wpseo_indexable_excluded_post_types', [] );
// Failsafe, to always make sure that `excluded_post_types` is an array.
if ( ! \is_array( $excluded_post_types ) ) {
return [];
}
return $excluded_post_types;
}