plugins – Changing labels of status filters for post grid
Question
Is there a way to change filter labels for custom post type? For example, change Drafts (2)
to Disabled (2)
without localization plugins like Loco Translate?
I’ve tried apply_filters( "views_{$this->screen->id}", $views );
filter, but array already contains links with html. Regex doesn’t looks “the right way”.
Array
(
[all] => <a href="edit.php?post_type=sha-wlc" class="current" aria-current="page">All <span class="count">(13)</span></a>
[publish] => <a href="edit.php?post_status=publish&post_type=sha-wlc">Published <span class="count">(11)</span></a>
[draft] => <a href="edit.php?post_status=draft&post_type=sha-wlc">Drafts <span class="count">(2)</span></a>
[trash] => <a href="edit.php?post_status=trash&post_type=sha-wlc">Trash <span class="count">(1)</span></a>
)
0
9 months
2022-05-06T14:18:21-05:00
2022-05-06T14:18:21-05:00 0 Answers
0 views
0
Leave an answer