Yoast\WP\SEO\Helpers
Post_Type_Helper::is_of_indexable_post_type
Checks if the given post type should be indexed.
Метод класса: Post_Type_Helper{}
Хуков нет.
Возвращает
true|false.
Использование
$Post_Type_Helper = new Post_Type_Helper(); $Post_Type_Helper->is_of_indexable_post_type( $post_type );
- $post_type(строка) (обязательный)
- The post type that is checked.
Код Post_Type_Helper::is_of_indexable_post_type() Post Type Helper::is of indexable post type Yoast 27.4
public function is_of_indexable_post_type( $post_type ) {
$public_types = $this->get_indexable_post_types();
if ( ! \in_array( $post_type, $public_types, true ) ) {
return false;
}
return true;
}