From 2ac7f39570af5ac4665a3a52171bbbec0f775485 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 10 May 2021 18:37:36 +0000 Subject: [PATCH] Posts, Post Types: Enable revisions for the `wp_block` post type. This allows site owners to take advantage of revisions while broader improvements to block management and reusable blocks are explored. Props matveb, audrasjb, desrosj. Fixes #53072. git-svn-id: https://develop.svn.wordpress.org/trunk@50835 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 1 + tests/phpunit/tests/rest-api/rest-schema-setup.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 56cd4a8cd5..ed95625d10 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -305,6 +305,7 @@ function create_initial_post_types() { 'supports' => array( 'title', 'editor', + 'revisions', ), ) ); diff --git a/tests/phpunit/tests/rest-api/rest-schema-setup.php b/tests/phpunit/tests/rest-api/rest-schema-setup.php index 3d0628d7ee..042c778d67 100644 --- a/tests/phpunit/tests/rest-api/rest-schema-setup.php +++ b/tests/phpunit/tests/rest-api/rest-schema-setup.php @@ -103,6 +103,8 @@ class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { '/wp/v2/blocks/(?P[\d]+)', '/wp/v2/blocks/(?P[\d]+)/autosaves', '/wp/v2/blocks/(?P[\d]+)/autosaves/(?P[\d]+)', + '/wp/v2/blocks/(?P[\d]+)/revisions', + '/wp/v2/blocks/(?P[\d]+)/revisions/(?P[\d]+)', '/wp/v2/types', '/wp/v2/types/(?P[\\w-]+)', '/wp/v2/statuses',