Filter simple_history/show_adminbar_menu to hide it from the toolbar dropdown?

[ad_1]

In your examples you show the following snippet to only show Simple History to specific users.

I wonder if you can address also the Simple History menu item in the admin toolbar?

something like simle_history/show_adminbar_menu maybe?

// Allow only the users specified in $allowed_users to show the history page, the history widget on the dashboard, or the history settings page
add_filter( 'simple_history/show_dashboard_page', 'function_show_history_dashboard_or_page' );
add_filter( 'simple_history/show_dashboard_widget', 'function_show_history_dashboard_or_page' );
add_filter( 'simple_history/show_settings_page', 'function_show_history_dashboard_or_page' );
function function_show_history_dashboard_or_page( $show ) {

...
}

best regards
Markus

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer