Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Editor: Move auto-draft status change to the server. #16814
Extracted from #16761
This PR moves auto-draft status changing to the server in preparation for refactoring the editor store to rely entirely on
It does this by filtering inserted post data to unset any auto-draft assigned post title. The status of an auto-draft should be read from its
How has this been tested?
It was verified that saving still works as expected.
Aug 1, 2019
Following up on the conversation above:
I understand this reasoning, but introducing this kind of "magic" into such a low level method does concern me. I'd conceptually prefer making this change at the REST API controller level, as that's a fairly consistent place for us to introduce filtering and transformations on the data being saved.
If committers with more familiarity with auto-draft are comfortable with changing things in this location then it's unarguably the most central place to introduce such a change; but I'd want to make sure no plugins or themes are using
I tend to agree with the concern about changing this low level function vs altering the REST API handling. Searching the plugin and theme repos I see a ton of uses of
I believe this is breaking the
Any feature or plugin using that function will be likely affected.