-
Home
-
WP Activity Log
- Tips
How to Hide WP Activity Log Admin Menus
function plt_hide_wp_security_audit_log_menus() {
//Hide "Dashboard →".
remove_submenu_page('index.php', 'wsal-setup');
//Hide "WP Activity Log".
remove_menu_page('wsal-auditlog');
//Hide "WP Activity Log → Log viewer".
remove_submenu_page('wsal-auditlog', 'wsal-auditlog');
//Hide "WP Activity Log → Premium Features a[href*="wsal-views-premium-features"] svg{ fill:rgba(240,246,252,.7) !important; display: inline-block; position: relative; left: 0px; top: 3px; } a[href*="wsal-views-premium-features"]:hover svg, a[href*="wsal-views-premium-features"]:focus svg{ fill:#72aee6 !important; } .current a[href*="wsal-views-premium-features"] svg, .current a[href*="wsal-views-premium-features"]:hover svg, .current a[href*="wsal-views-premium-features"]:focus svg{ fill:#fff !important; } @media only screen and (max-width: 960px) and (min-width: 782px) { a[href*="wsal-views-premium-features"] svg{ display: none; } }".
remove_submenu_page('wsal-auditlog', 'wsal-wsal-views-premium-features');
//Hide "WP Activity Log → Notifications".
remove_submenu_page('wsal-auditlog', 'wsal-notifications');
//Hide "WP Activity Log → Settings".
remove_submenu_page('wsal-auditlog', 'wsal-settings');
//Hide "WP Activity Log → Enable/Disable Events".
remove_submenu_page('wsal-auditlog', 'wsal-togglealerts');
//Hide "WP Activity Log → Help Contact Us".
remove_submenu_page('wsal-auditlog', 'wsal-help');
//Hide "WP Activity Log → Upgrade to Premium".
remove_submenu_page('wsal-auditlog', 'upgrade');
}
add_action('admin_menu', 'plt_hide_wp_security_audit_log_menus', 11);
Where do I put this code?
How to Hide the "Latest Events | WP Activity Log" Dashboard Widget
function plt_hide_wp_security_audit_log_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Latest Events | WP Activity Log" widget.
remove_meta_box('wsal', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_wp_security_audit_log_dashboard_widgets', 20);