Yoast\WP\SEO\Helpers

Post_Type_Helper::is_excluded()publicYoast 1.0

Checks if the post type is excluded.

Метод класса: Post_Type_Helper{}

Хуков нет.

Возвращает

true|false. If the post type is exclude.

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

$Post_Type_Helper = new Post_Type_Helper();
$Post_Type_Helper->is_excluded( $post_type );
$post_type(строка) (обязательный)
The post type to check.

Код Post_Type_Helper::is_excluded() Yoast 22.3

public function is_excluded( $post_type ) {
	return \in_array( $post_type, $this->get_excluded_post_types_for_indexables(), true );
}