[wp-trac] [WordPress Trac] #51403: Add filter for _post_states as it outputs raw HTML
WordPress Trac
noreply at wordpress.org
Mon Oct 20 21:02:28 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 |
-------------------------------------------------+-------------------------
Comment (by dmsnell):
Thanks @westonruter — to be clear I wasn’t proposing we change the markup;
I was merely trying to think of a use-case for this filter that was more
than adding plaintext //after// the list of post states.
My main confusion is that `display_post_states` sounds much more like the
filter I would seek out to replace the generated HTML in `wp-admin` than
`post_states_string`. It still seems like there could be some more
specific vocabulary escaping us on that one.
But the improved docblock comments are gold. I can see in your changes
that I was wrong on the data type for `$post_states`, which only confirms
to me the need for them.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51403#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list