Yoast\WP\SEO\Abilities\User_Interface

Abilities_Integration::get_score_output_schemaprivateYoast 1.0

Returns the score output schema, including the title property.

Метод класса: Abilities_Integration{}

Хуков нет.

Возвращает

Массив<Строку,. array<string, string>> The score output schema.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_score_output_schema(): array;

Код Abilities_Integration::get_score_output_schema() Yoast 28.3

private function get_score_output_schema(): array {
	return [
		'type'       => 'object',
		'properties' => [
			'title' => [
				'type'        => 'string',
				'description' => \__( 'The post title.', 'wordpress-seo' ),
			],
			'score' => [
				'type'        => 'string',
				'enum'        => [ 'na', 'bad', 'ok', 'good' ],
				'description' => \__( 'The score slug.', 'wordpress-seo' ),
			],
			'label' => [
				'type'        => 'string',
				'description' => \__( 'A human-readable label for the score.', 'wordpress-seo' ),
			],
		],
	];
}