WPSEO_Post_Type::has_metabox_enabled()public staticYoast 1.0

Checks if the Yoast Metabox has been enabled for the post type.

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

Хуков нет.

Возвращает

true|false. True whether the metabox is enabled.

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

$result = WPSEO_Post_Type::has_metabox_enabled( $post_type );
$post_type(строка) (обязательный)
The post type name.

Код WPSEO_Post_Type::has_metabox_enabled() Yoast 24.9

public static function has_metabox_enabled( $post_type ) {
	return WPSEO_Options::get( 'display-metabox-pt-' . $post_type, false );
}