Yoast\WP\SEO\Generators\Schema
Person::determine_user_id()
Determines a User ID for the Person data.
Метод класса: Person{}
Хуки из метода
Возвращает
true|false|int
. User ID or false upon return.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->determine_user_id();
Код Person::determine_user_id() Person::determine user id Yoast 21.5
protected function determine_user_id() { /** * Filter: 'wpseo_schema_person_user_id' - Allows filtering of user ID used for person output. * * @api int|bool $user_id The user ID currently determined. */ $user_id = \apply_filters( 'wpseo_schema_person_user_id', $this->context->site_user_id ); // It should to be an integer higher than 0. if ( \is_int( $user_id ) && $user_id > 0 ) { return $user_id; } return false; }