Change method for updating post status to hook in on meta update rather than on post save, as relying on post save doesn't work properly in Gutenberg and can result in off-by-one errors.
Removes Gutenberg-specific method of updating post status using the REST API because it can result in off-by-one errors.
Introduces a filter for REST responses for all public post types that overrides the value of post status to be publish if the post status is archiveless to fix a bug in Gutenberg where it appears that the post is unpublished because it's status is not literally publish.
Since we removed the post save handler, adds a handler for post status transition to handle future posts.
publish
if the post status isarchiveless
to fix a bug in Gutenberg where it appears that the post is unpublished because it's status is not literallypublish
.