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

When autosaving drafts, don't create revisions. #4062

Closed
wants to merge 6 commits into from

Conversation

adamsilverstein
Copy link
Member

@adamsilverstein adamsilverstein commented Dec 18, 2017

Description

When dispatching the autosave event, pass a query var, then skip revisions for that save event.

How Has This Been Tested?

Creating and saving draft posts, monitoring the database.

Types of changes

  • when dispatching savePost from autosave add an option autoupdate=1
  • when initiating a save, add a gutenberg_autosave query var if the autoupdate option is set
  • filter the number of revisions for WordPress to create, set at 0 if the gutenberg_autosave query var is present.

Checklist:

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

@adamsilverstein
Copy link
Member Author

Closing in favor of #4156

@gziolo gziolo deleted the address-autosave-draft-revisions branch May 7, 2018 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant