Yoast\WP\SEO\Abilities\User_Interface\Abilities

Update_Term_SEO_Data_Ability::ai_generate_field_schema │ private │ Yoast 1.0

Returns the input schema for a nullable string field that AI Generate can also write, such as the SEO title or the social titles and descriptions.

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

Хуков нет.

Возвращает

array<string, mixed>. The input schema fragment.

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

// private - только в коде основоного (родительского) класса
$result = $this->ai_generate_field_schema( $field ): array;
$field(строка) (обязательный)
The human-readable field name.

Код Update_Term_SEO_Data_Ability::ai_generate_field_schema() Yoast 28.9

private function ai_generate_field_schema( string $field ): array {
	return [
		'type'        => [ 'string', 'null' ],
		'description' => \sprintf(
			/* translators: %s expands to the name of the SEO field, e.g. "SEO title". */
			\__( 'The %s for the term.', 'wordpress-seo' ),
			$field,
		),
	];
}