WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Yoast\WP\SEO\Helpers

Primary_Term_Helper::get_primary_term_taxonomies() public Yoast 1.0

Generate the primary term taxonomies.

{} Это метод класса: Primary_Term_Helper{}

Хуки из метода
Возвращает

Массив. The taxonomies.

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

$Primary_Term_Helper = new Primary_Term_Helper();
$Primary_Term_Helper->get_primary_term_taxonomies( $post_id );
$post_id(число) (обязательный)
ID of the post.

Код Primary_Term_Helper::get_primary_term_taxonomies() Yoast 15.6.2

<?php
public function get_primary_term_taxonomies( $post_id ) {
	$post_type      = \get_post_type( $post_id );
	$all_taxonomies = \get_object_taxonomies( $post_type, 'objects' );
	$all_taxonomies = \array_filter( $all_taxonomies, [ $this, 'filter_hierarchical_taxonomies' ] );

	/**
	 * Filters which taxonomies for which the user can choose the primary term.
	 *
	 * @api array    $taxonomies An array of taxonomy objects that are primary_term enabled.
	 *
	 * @param string $post_type      The post type for which to filter the taxonomies.
	 * @param array  $all_taxonomies All taxonomies for this post types, even ones that don't have primary term
	 *                               enabled.
	 */
	$taxonomies = (array) \apply_filters( 'wpseo_primary_term_taxonomies', $all_taxonomies, $post_type, $all_taxonomies );

	return $taxonomies;
}