WPSEO_Taxonomy_Columns::display_metabox()privateYoast 7.0

Wraps the WPSEO_Metabox check to determine whether the metabox should be displayed either by choice of the admin or because the taxonomy is not public.

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

Хуков нет.

Возвращает

true|false. Whether the meta box (and associated columns etc) should be hidden.

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

// private - только в коде основоного (родительского) класса
$result = $this->display_metabox( $taxonomy );
$taxonomy(строка|null)
The taxonomy to test.
По умолчанию: current taxonomy

Список изменений

С версии 7.0 Введена.

Код WPSEO_Taxonomy_Columns::display_metabox() Yoast 22.4

private function display_metabox( $taxonomy = null ) {
	$current_taxonomy = $this->get_current_taxonomy();

	if ( ! isset( $taxonomy ) && ! empty( $current_taxonomy ) ) {
		$taxonomy = $current_taxonomy;
	}

	return WPSEO_Utils::is_metabox_active( $taxonomy, 'taxonomy' );
}