WPSEO_Taxonomy::get_labels()public staticYoast 1.0

Function to get the labels for the current taxonomy.

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

Хуков нет.

Возвращает

Объект|null. Labels for the current taxonomy or null if the taxonomy is not set.

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

$result = WPSEO_Taxonomy::get_labels();

Код WPSEO_Taxonomy::get_labels() Yoast 22.3

public static function get_labels() {
	$term = self::get_taxonomy();
	if ( $term !== '' ) {
		$taxonomy = get_taxonomy( $term );
		return $taxonomy->labels;
	}
	return null;
}