Unable to Trash pending revisions
-
When editing a post revision (For example URL https://mysite.com/wp-admin/post.php?post=11111&action=edit) and hitting Move to Trash, the post isn’t being moved to trash – it sticks with its original pending-revision post_status in the DB.
The reason for this is that Move to Trash calls wp_update_post() which in turn called wp_insert_post(). In your plugins /revisionary/revisionary_main.php file you have a filter around line 119:
add_filter( 'wp_insert_post_data', array($this, 'flt_regulate_revision_status'), 100, 2 );
This method has a comment:// Revisions are not published by wp_update_post() execution; Prevent setting to a non-revision status
and indeed, ‘trash’ isn’t a revision status so it’s switched back to pending-revision therefore cancelling the trashing of the post.
Can ‘trash’ status be detected and let through so we can successfully trash revisions?
- The topic ‘Unable to Trash pending revisions’ is closed to new replies.