-
Home
-
tinyShield – Simple. Focused. Security.
- Tips
How to Hide tinyShield - Simple. Focused. Security. Admin Menus
function plt_hide_tinyshield_menus() {
//Hide "tinyShield".
remove_menu_page('tinyshield.php');
//Hide "tinyShield → Activity Log".
remove_submenu_page('tinyshield.php', 'tinyshield.php');
//Hide "tinyShield → Permanent Allowlist".
remove_submenu_page('tinyshield.php', 'tinyshield.php&tab=perm-allowlist');
//Hide "tinyShield → Permanent Blocklist".
remove_submenu_page('tinyshield.php', 'tinyshield.php&tab=perm-blocklist');
//Hide "tinyShield → Allowlist".
remove_submenu_page('tinyshield.php', 'tinyshield.php&tab=allowlist');
//Hide "tinyShield → Blocklist".
remove_submenu_page('tinyshield.php', 'tinyshield.php&tab=blocklist');
//Hide "tinyShield → Settings".
remove_submenu_page('tinyshield.php', 'tinyshield.php&tab=settings');
}
add_action('admin_menu', 'plt_hide_tinyshield_menus', 11);
Where do I put this code?
How to Hide the "tinyShield Overview" Dashboard Widget
function plt_hide_tinyshield_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "tinyShield Overview" widget.
remove_meta_box('tinyshield_dashboard_widget', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_tinyshield_dashboard_widgets', 20);