Yoast\WP\SEO\Abilities\User_Interface\Abilities
Update_Post_SEO_Data_Ability::get_update_post_seo_data_input_schema
Returns the input schema for updating a post's SEO data (write path).
Метод класса: Update_Post_SEO_Data_Ability{}
Хуков нет.
Возвращает
array<string, mixed>. The input schema.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_update_post_seo_data_input_schema(): array;
Код Update_Post_SEO_Data_Ability::get_update_post_seo_data_input_schema() Update Post SEO Data Ability::get update post seo data input schema Yoast 28.9
private function get_update_post_seo_data_input_schema(): array {
return [
'type' => 'object',
'additionalProperties' => false,
'properties' => [
'post_id' => [
'type' => 'integer',
'description' => \__( 'The ID of the post to update.', 'wordpress-seo' ),
'minimum' => 1,
],
'permalink' => [
'type' => 'string',
'description' => \__( 'The permalink (URL) of the post to update.', 'wordpress-seo' ),
],
'seo_title' => $this->ai_generate_field_schema( \__( 'SEO title', 'wordpress-seo' ) ),
'meta_description' => $this->ai_generate_field_schema( \__( 'meta description', 'wordpress-seo' ) ),
'canonical' => [
'type' => [ 'string', 'null' ],
'description' => \__( 'The custom canonical URL for the post. Use null or an empty string to remove it and fall back to the default canonical.', 'wordpress-seo' ),
],
'is_cornerstone' => [
'type' => 'boolean',
'description' => \__( 'Whether the post is marked as cornerstone content.', 'wordpress-seo' ),
],
'noindex' => [
'type' => [ 'boolean', 'null' ],
'description' => \__( 'Whether search engines should be told not to index this post. true sets noindex (the post is excluded from search results); false forces the post to be indexed; null clears the setting and falls back to the post-type default.', 'wordpress-seo' ),
],
'nofollow' => [
'type' => 'boolean',
'description' => \__( 'Whether search engines should be told not to follow the links on this post.', 'wordpress-seo' ),
],
'noimageindex' => [
'type' => 'boolean',
'description' => \__( 'Whether search engines should be told not to index the images on this post.', 'wordpress-seo' ),
],
'noarchive' => [
'type' => 'boolean',
'description' => \__( 'Whether search engines should be told not to show a cached copy of this post.', 'wordpress-seo' ),
],
'nosnippet' => [
'type' => 'boolean',
'description' => \__( 'Whether search engines should be told not to show a snippet of this post in the search results.', 'wordpress-seo' ),
],
'open_graph_title' => $this->ai_generate_field_schema( \__( 'Open Graph title', 'wordpress-seo' ) ),
'open_graph_description' => $this->ai_generate_field_schema( \__( 'Open Graph description', 'wordpress-seo' ) ),
'twitter_title' => $this->ai_generate_field_schema( \__( 'X title', 'wordpress-seo' ) ),
'twitter_description' => $this->ai_generate_field_schema( \__( 'X description', 'wordpress-seo' ) ),
'schema_page_type' => $this->nullable_enum_schema(
\array_keys( Schema_Types::PAGE_TYPES ),
\__( 'The Schema.org page type for the post. Must be one of the supported page types. Use null or an empty string to clear it and fall back to the default.', 'wordpress-seo' ),
),
'schema_article_type' => $this->nullable_enum_schema(
$this->get_schema_article_types(),
\__( 'The Schema.org article type for the post. Must be one of the supported article types. Use null or an empty string to clear it and fall back to the default.', 'wordpress-seo' ),
),
],
];
}