-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reinstate edit_published_posts support, without post_status chaos
The previous workaround for the WP "edit_published_posts without publish_posts" issue caused erreneous post_status storage. This was due to filtering the 'pre_post_status' value based on a post_id derived from the request parameters. The result was that the published status of the primary post was "restored" to the post being updated - which may have been an autodraft, WooCommerce custom types or other supplemental posts updated within the request. This is no longer possible because the post_status value is only filtered based on the post_id passed directly into the 'edit_post_status' or 'wp_insert_post_data' filter. Post ID is still derived from the query, but only for the purpose publish_posts / edit_publish_posts capability checks. This will be released as a beta version initially. As an ongoing precaution, the entire edit_published_posts workaround can be disabled by defining the following constant: define('CME_DISABLE_WP_EDIT_PUBLISHED_WORKAROUND', true);
- Loading branch information
Showing
4 changed files
with
164 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters