[wp-trac] [WordPress Trac] #51403: Add filter for _post_states as it outputs raw HTML
WordPress Trac
noreply at wordpress.org
Thu Sep 11 19:30:23 UTC 2025
#51403: Add filter for _post_states as it outputs raw HTML
-------------------------------------------------+-------------------------
Reporter: brandbrilliance | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future
| Release
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: needs-patch good-first-bug has- | Focuses: template
test-info |
-------------------------------------------------+-------------------------
Changes (by SirLouen):
* keywords: => needs-patch good-first-bug has-test-info
* focuses: template, coding-standards => template
* version: 5.5.1 =>
* milestone: Awaiting Review => Future Release
Comment:
Looks good to me. A filter to `post_states_string` can be applied here
definitely.
== Testing Instructions after the patch
Test info is pretty straight forward. These states are the ones that
appear near the list of posts for example (The list that can say something
like "Front Page, Draft", for example.
[[Image(https://i.imgur.com/v4Ya1bN.png)]]
So testing is simply adding the filter, and checking if it appears there
the modified content as expected. Like this:
[[Image(https://i.imgur.com/UF05Wmk.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51403#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list