Yoast\WP\SEO\Helpers
Post_Type_Helper::is_indexable()
Checks if the request post type is public and indexable.
Метод класса: Post_Type_Helper{}
Хуков нет.
Возвращает
true|false
. True when post type is set to index.
Использование
$Post_Type_Helper = new Post_Type_Helper(); $Post_Type_Helper->is_indexable( $post_type_name );
- $post_type_name(строка) (обязательный)
- The name of the post type to lookup.
Код Post_Type_Helper::is_indexable() Post Type Helper::is indexable Yoast 24.4
public function is_indexable( $post_type_name ) { if ( $this->options_helper->get( 'disable-' . $post_type_name, false ) ) { return false; } return ( $this->options_helper->get( 'noindex-' . $post_type_name, false ) === false ); }