[wp-trac] [WordPress Trac] #36237: Add filter for post statuses in quickedit

WordPress Trac noreply at wordpress.org
Mon Jun 23 17:03:28 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
-------------------------------------+-----------------------------

Comment (by iamadisingh):

 == Test Report
 === Description
 This report validates whether the indicated patch works as expected.

 Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress
 /wordpress-develop/pull/9041.diff

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.27.3
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 137.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-Five 1.2
 - MU Plugins: None activated
 - Plugins:
   * Test Quick Edit Filter
   * Test Reports 1.2.0

 === Testing Instructions

 1. **Create and activate the test plugin** with the this provided filter
 code
 2. **Create test posts** with various statuses (Published, Draft, Pending
 Review)
 3. **Navigate to Posts > All Posts** in WordPress admin
 4. **Test Quick Edit functionality:**
    - Hover over any post and click "Quick Edit"
    - Verify that "Draft" status is removed from the Status dropdown
    - Check that other statuses (Published, Pending Review) remain
 available


 === Actual Results
 1.  ✅ Issue resolved with patch.

 === Additional Notes
 - Filter works consistently across both Quick Edit and Bulk Edit
 interfaces

 === Supplemental Artifacts
 Test Plugin Code:
 {{{#!php
 <?php
 <?php
 /**
  * Plugin Name: Test Quick Edit Filter
  * Description: Tests the quick_edit_statuses filter
  */

 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'
 );

 function add_custom_status_to_quick_edit( $statuses ) {
     $statuses['custom_status'] = __( 'Custom Status' );
     return $statuses;
 }
 add_filter( 'quick_edit_statuses', 'add_custom_status_to_quick_edit' );
 }}}

 Visual Evidence: https://ibb.co/MD2rZPQW

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/36237#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list