[wp-trac] [WordPress Trac] #36237: Add filter for post statuses in quickedit
WordPress Trac
noreply at wordpress.org
Sun Jun 22 16:17:07 UTC 2025
#36237: Add filter for post statuses in quickedit
-------------------------------------+-----------------------------
Reporter: kakomap | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Posts, Post Types | Version: 4.4.2
Severity: normal | Resolution:
Keywords: has-patch has-test-info | Focuses: administration
-------------------------------------+-----------------------------
Changes (by SirLouen):
* keywords: has-patch needs-testing => has-patch has-test-info
Comment:
== Test Report
=== Description
✅ This report validates that the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-
develop/pull/9041.diff
=== Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-One 2.5
- MU Plugins: None activated
- Plugins:
* Remove Draft from Quick Edit 1.0.0
* Test Reports 1.2.0
=== Testing Instructions
1. Add the code provided in supplemental artifacts to a plugin,
functions.php or wherever it can be executed
2. Create a post or two
3. Quick edit them and check if "Draft" status appears under the status
Select. It should not appear.
=== Actual Results
1. ✅ Issue resolved with patch.
=== Some extra Testing Results
- Given that the logic changes a bit, I've tested around
1. ✅ Private only appears on bulk edit
2. ✅ No Change appears only on bulk edit
3. ✅ Scheduled, Future, Draft and Pending Review appear when the user has
capabilities
4. ✅ Testing with a user without capabilities (i.e. Contributor),
Schedule, Private and Scheduled doesn't appear as expected, only Draft and
Pending Review as expected.
=== Additional Notes
- I edited a little the code in
[https://core.trac.wordpress.org/attachment/ticket/36237/36237.patch the
original patch] because it was adding "Private" to members without the
right capability
- Also added some docs to the filter
- Added a little note referencing this #63612 to avoid future confusion.
- Apart from this, the rest is the same. It brings a pretty nice refactor.
=== Supplemental Artifacts
Test code
{{{
function remove_draft_from_quick_edit_statuses( $statuses ) {
if ( isset( $statuses['draft'] ) ) {
unset( $statuses['draft'] );
}
return $statuses;
}
add_filter( 'quick_edit_statuses', 'remove_draft_from_quick_edit_statuses'
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36237#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list