Yoast\WP\SEO\Generators\Schema

Author::set_image_from_options()protectedYoast 1.0

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() Yoast 22.4

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;
}