Filter simple_history/show_adminbar_menu to hide it from the toolbar dropdown?
-
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? https://cln.sh/W2z8pR8t
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 ) { ... }
https://github.com/bonny/WordPress-Simple-History/blob/main/examples/examples.php
best regards
Markus
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Filter simple_history/show_adminbar_menu to hide it from the toolbar dropdown?’ is closed to new replies.