WPSEO_Metabox::current_post_type_has_taxonomies()privateYoast 1.0

Determines whether or not the current post type has registered taxonomies.

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

Хуков нет.

Возвращает

true|false. Whether the current post type has taxonomies.

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

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

Код WPSEO_Metabox::current_post_type_has_taxonomies() Yoast 22.4

private function current_post_type_has_taxonomies() {
	$post_taxonomies = get_object_taxonomies( get_post_type() );

	return ! empty( $post_taxonomies );
}