Yoast\WP\SEO\Generators\Schema
Author::set_image_from_options()
An author should not have an image from options, this only applies to persons.
Метод класса: Author{}
Хуков нет.
Возвращает
Массив
. The Person schema.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->set_image_from_options( $data, $schema_id, $add_hash, $user_data );
- $data(массив) (обязательный)
- The Person schema.
- $schema_id(строка) (обязательный)
- The string used in the @id for the schema.
- $add_hash(true|false)
- Whether or not the person's image url hash should be added to the image id.
По умолчанию: false - $user_data(WP_User)
- User data.
По умолчанию: null
Код Author::set_image_from_options() Author::set image from options Yoast 24.1
protected function set_image_from_options( $data, $schema_id, $add_hash = false, $user_data = null ) { if ( $this->site_represents_current_author( $user_data ) ) { return parent::set_image_from_options( $data, $schema_id, $add_hash, $user_data ); } return $data; }