WPSEO_Yoast_Columns::display_meta_columns()privateYoast 1.0

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

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

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->display_meta_columns();

Код WPSEO_Yoast_Columns::display_meta_columns() Yoast 22.4

private function display_meta_columns() {
	$current_post_type = $this->get_current_post_type();

	if ( empty( $current_post_type ) ) {
		return false;
	}

	return WPSEO_Utils::is_metabox_active( $current_post_type, 'post_type' );
}