Yoast\WP\SEO\Helpers

Post_Type_Helper::has_metabox()publicYoast 1.0

Checks if the request post type has the Yoast Metabox enabled.

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

Хуков нет.

Возвращает

true|false. True if metabox is enabled.

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

$Post_Type_Helper = new Post_Type_Helper();
$Post_Type_Helper->has_metabox( $post_type_name );
$post_type_name(строка) (обязательный)
The name of the post type to lookup.

Код Post_Type_Helper::has_metabox() Yoast 19.10

public function has_metabox( $post_type_name ) {
	return ( $this->options_helper->get( 'display-metabox-pt-' . $post_type_name, true ) === true );
}