wpseo_primary_term_taxonomies хук-фильтрYoast 1.0

Filters which taxonomies for which the user can choose the primary term.

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

add_filter( 'wpseo_primary_term_taxonomies', 'wp_kama_wpseo_primary_term_taxonomies_filter', 10, 3 );

/**
 * Function for `wpseo_primary_term_taxonomies` filter-hook.
 * 
 * @param 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.
 *
 * @return array
 */
function wp_kama_wpseo_primary_term_taxonomies_filter( $taxonomies, $post_type, $all_taxonomies ){

	// filter...
	return $taxonomies;
}
$taxonomies(массив)
An array of taxonomy objects that are primary_term enabled.
$post_type(строка)
The post type for which to filter the taxonomies.
$all_taxonomies(массив)
All taxonomies for this post types, even ones that don't have primary term enabled.

Где вызывается хук

WPSEO_Primary_Term_Admin::generate_primary_term_taxonomies()
wpseo_primary_term_taxonomies
Primary_Term_Helper::get_primary_term_taxonomies()
wpseo_primary_term_taxonomies
yoast/admin/class-primary-term-admin.php 200
$taxonomies = (array) apply_filters( 'wpseo_primary_term_taxonomies', $all_taxonomies, $post_type, $all_taxonomies );
yoast/src/helpers/primary-term-helper.php 33
$taxonomies = (array) \apply_filters( 'wpseo_primary_term_taxonomies', $all_taxonomies, $post_type, $all_taxonomies );

Где используется хук в Yoast SEO

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