WPSEO_Utils::display_taxonomy_metabox
Determine whether or not the metabox should be displayed for a taxonomy.
Метод класса: WPSEO_Utils{}
Хуков нет.
Возвращает
true|false. Whether or not the metabox should be displayed.
Использование
$result = WPSEO_Utils::display_taxonomy_metabox( $taxonomy );
- $taxonomy(строка|null)
- The post type to check the visibility of the metabox for.
По умолчанию:null
Код WPSEO_Utils::display_taxonomy_metabox() WPSEO Utils::display taxonomy metabox Yoast 27.9
protected static function display_taxonomy_metabox( $taxonomy = null ) {
if ( ! isset( $taxonomy ) || ! in_array( $taxonomy, get_taxonomies( [ 'public' => true ], 'names' ), true ) ) {
return false;
}
return WPSEO_Options::get( 'display-metabox-tax-' . $taxonomy );
}