Yoast\WP\SEO\Abilities\User_Interface\Abilities
Update_Post_SEO_Data_Ability::ai_generate_field_schema
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_Post_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_Post_SEO_Data_Ability::ai_generate_field_schema() Update Post 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 post.', 'wordpress-seo' ),
$field,
),
];
}