diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 4741d989fa6f9..aef5648ec886c 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -328,6 +328,7 @@ function create_initial_post_types() { 'map_meta_cap' => true, 'supports' => array( 'title', + 'excerpt', 'editor', 'revisions', 'custom-fields', diff --git a/tests/qunit/fixtures/wp-api-generated.js b/tests/qunit/fixtures/wp-api-generated.js index 928ea25e08f89..ecbb1160ae969 100644 --- a/tests/qunit/fixtures/wp-api-generated.js +++ b/tests/qunit/fixtures/wp-api-generated.js @@ -3879,6 +3879,40 @@ mockedApiResponse.Schema = { }, "required": false }, + "excerpt": { + "description": "The excerpt for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Excerpt for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML excerpt for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the excerpt is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false + }, "meta": { "description": "Meta fields.", "type": "object", @@ -3939,6 +3973,11 @@ mockedApiResponse.Schema = { "default": "view", "required": false }, + "excerpt_length": { + "description": "Override the default excerpt length.", + "type": "integer", + "required": false + }, "password": { "description": "The password for the post if it is password protected.", "type": "string", @@ -4049,6 +4088,40 @@ mockedApiResponse.Schema = { }, "required": false }, + "excerpt": { + "description": "The excerpt for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Excerpt for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML excerpt for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the excerpt is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false + }, "meta": { "description": "Meta fields.", "type": "object", @@ -4379,6 +4452,40 @@ mockedApiResponse.Schema = { }, "required": false }, + "excerpt": { + "description": "The excerpt for the post.", + "type": "object", + "properties": { + "raw": { + "description": "Excerpt for the post, as it exists in the database.", + "type": "string", + "context": [ + "edit" + ] + }, + "rendered": { + "description": "HTML excerpt for the post, transformed for display.", + "type": "string", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + }, + "protected": { + "description": "Whether the excerpt is protected with a password.", + "type": "boolean", + "context": [ + "view", + "edit", + "embed" + ], + "readonly": true + } + }, + "required": false + }, "meta": { "description": "Meta fields.", "type": "object",