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 int      $user_id         The current user we're grabbing social profiles for.
 * @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`.
 *
 * @return int
 */
function wp_kama_wpseo_schema_person_social_profiles_filter( $user_id, $social_profiles ){

	// filter...
	return $user_id;
}
$user_id(int)
The current user we're grabbing social profiles for.
$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.

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

WPSEO_Schema_Person::get_social_profiles()
wpseo_schema_person_social_profiles
Person::get_social_profiles()
wpseo_schema_person_social_profiles
yoast/src/deprecated/frontend/schema/class-schema-person.php 91
$social_profiles = apply_filters( 'wpseo_schema_person_social_profiles', $this->social_profiles, $user_id );
yoast/src/generators/schema/person.php 104
$social_profiles = \apply_filters( 'wpseo_schema_person_social_profiles', $this->social_profiles, $user_id );

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

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