Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always register the autosaves controller #8692

Closed
wants to merge 1 commit into from

Conversation

danielbachhuber
Copy link
Member

Description

Ensures the autosaves controller is always registered for post types with show_in_rest=>true. While revisions can be enabled/disabled on a post type by post type basis, the editor expects that a post type can always be autosaved.

Fixes #7442
Fixes #7348

How has this been tested?

  1. Disable revisions for the Post post type:
add_action( 'init', function(){
	remove_post_type_support( 'post', 'revisions' );
});
  1. In the Gutenberg editor, create a new Post, enter a title, and hit "Preview". You should see the preview of the post display.

Types of changes

Bug fix (non-breaking change which fixes an issue).

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

Post types always support autosaves, even when they don't support
revisions.
@danielbachhuber danielbachhuber added [Type] Bug An existing feature does not function as intended REST API Interaction Related to REST API [Feature] Saving Related to saving functionality labels Aug 7, 2018
@danielbachhuber danielbachhuber added this to the 3.5 milestone Aug 7, 2018
@danielbachhuber danielbachhuber requested a review from a team August 7, 2018 21:29
@danielbachhuber
Copy link
Member Author

@adamsilverstein beat me to it in #8682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Saving Related to saving functionality REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended
Projects
None yet
1 participant