The following is a screenshot of the users list table in the dashboard. I'd like to customize highlighted part:
I know how do it in the posts list table using the method explained in this WordPress Answer.
I tried to use filter views_edit-user
but nothing happened. I also tried to Google it but it seems this filter doesn't have documentation or is not really a WordPress filter.
How to customize that admin section using add_action
or add_filter
?
The hook for that screen is based on 'views_' . $this->screen->id
, so it should be:
add_filter( 'views_users', 'modify_views_users_so_15295853' );
function modify_views_users_so_15295853( $views )
{
// Manipulate $views
return $views;
}
The content of $views
in my system is:
Array
(
[all] => <a href='users.php' class="current">All <span class="count">(7)</span></a>
[administrator] => <a href='users.php?role=administrator'>Administrator <span class="count">(1)</span></a>
[editor] => <a href='users.php?role=editor'>Editor <span class="count">(1)</span></a>
[subscriber] => <a href='users.php?role=subscriber'>Subscriber <span class="count">(5)</span></a>
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With