WPSEO_Post_Type::has_metabox_enabled
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() WPSEO Post Type::has metabox enabled Yoast 27.3
public static function has_metabox_enabled( $post_type ) {
return WPSEO_Options::get( 'display-metabox-pt-' . $post_type, false );
}