[wp-trac] [WordPress Trac] #51403: Add filter for _post_states as it outputs raw HTML

WordPress Trac noreply at wordpress.org
Mon Oct 20 20:44:58 UTC 2025


#51403: Add filter for _post_states as it outputs raw HTML
-------------------------------------------------+-------------------------
 Reporter:  brandbrilliance                      |       Owner:
                                                 |  westonruter
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.9
Component:  Posts, Post Types                    |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-test-info has-    |     Focuses:  template
  patch has-unit-tests                           |
-------------------------------------------------+-------------------------
Changes (by westonruter):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 @dmsnell I've opened https://github.com/WordPress/wordpress-
 develop/pull/10360 to iterate on this further.

 In the last example you just commented, I don't think we need to go the
 route of a “pre” filter. Overriding the previously-constructed HTML via
 filter seems appropriate since this isn't an expensive operation. In
 regards to refactoring to encourage using a `UL`, I'm wary of the markup
 changes and back-compat.

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


More information about the wp-trac mailing list