wpseo_schema_person_data
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.
Где вызывается хук
wpseo_schema_person_data
yoast/src/generators/schema/person.php 171
$data = \apply_filters( 'wpseo_schema_person_data', $data, $user_id );