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

Filter: wpseo_schema_person_social_profiles Allows filtering of social profiles per user.

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

add_filter( 'wpseo_schema_person_social_profiles', 'wp_kama_wpseo_schema_person_social_profiles_filter', 10, 2 );

/**
 * Function for `wpseo_schema_person_social_profiles` filter-hook.
 * 
 * @param string[] $social_profiles The array of social profiles to retrieve. Each should be a user meta field key. As they are retrieved using the WordPress function `get_the_author_meta`.
 * @param int      $user_id         The current user we're grabbing social profiles for.
 *
 * @return string[]
 */
function wp_kama_wpseo_schema_person_social_profiles_filter( $social_profiles, $user_id ){

	// filter...
	return $social_profiles;
}
$social_profiles(string[])
The array of social profiles to retrieve. Each should be a user meta field key. As they are retrieved using the WordPress function get_the_author_meta.
$user_id(int)
The current user we're grabbing social profiles for.

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

Person::get_social_profiles()
wpseo_schema_person_social_profiles
yoast/src/generators/schema/person.php 103
$social_profiles = \apply_filters( 'wpseo_schema_person_social_profiles', $this->social_profiles, $user_id );

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

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