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

Filter: wpseo_schema_person_data Allows filtering of schema data per user.

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

add_filter( 'wpseo_schema_person_data', 'wp_kama_wpseo_schema_person_data_filter', 10, 2 );

/**
 * Function for `wpseo_schema_person_data` filter-hook.
 * 
 * @param array $data    The schema data we have for this person.
 * @param int   $user_id The current user we're collecting schema data for.
 *
 * @return array
 */
function wp_kama_wpseo_schema_person_data_filter( $data, $user_id ){

	// filter...
	return $data;
}
$data(массив)
The schema data we have for this person.
$user_id(int)
The current user we're collecting schema data for.

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

Person::build_person_data()
wpseo_schema_person_data
yoast/src/generators/schema/person.php 165
$data = \apply_filters( 'wpseo_schema_person_data', $data, $user_id );

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

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