Yoast\WP\SEO\Helpers
Post_Type_Helper::get_excluded_post_types_for_indexables()
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 23.6
public function get_excluded_post_types_for_indexables() { /** * Filter: 'wpseo_indexable_excluded_post_types' - Allows excluding posts of a certain post * type from being saved to the indexable table. * * @param array $excluded_post_types The currently excluded post types that indexables will not be created for. */ $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; }