-
Home
-
Limit Login Attempts (Spam Protection)
- Tips
How to Hide Limit Login Attempts (Spam Protection) Admin Menus
function plt_hide_wp_limit_failed_login_attempts_menus() {
//Hide "Login Attempts".
remove_menu_page('WPLFLA');
//Hide "Login Attempts → Statistics".
remove_submenu_page('WPLFLA', 'WPLFLA');
//Hide "Login Attempts → Options".
remove_submenu_page('WPLFLA', 'WPLFLASettings');
//Hide "Login Attempts → Settings".
remove_submenu_page('WPLFLA', 'WPLFLARANGEIP');
}
add_action('admin_menu', 'plt_hide_wp_limit_failed_login_attempts_menus', 11);
Where do I put this code?
How to Hide Limit Login Attempts (Spam Protection) Dashboard Widgets
function plt_hide_wp_limit_failed_login_attempts_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Top 10 Blocked IPs" widget.
remove_meta_box('Top_IPs_Blocked', 'dashboard', 'normal');
//Remove the "Top 10 Failed Logins" widget.
remove_meta_box('Top_Failed_Logins', 'dashboard', 'normal');
//Remove the "Top 10 Blocked Countries" widget.
remove_meta_box('Top_Countries_Blocked', 'dashboard', 'normal');
//Remove the "Recently Blocked Attacks" widget.
remove_meta_box('Recently_Blocked_Attacks', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_wp_limit_failed_login_attempts_dashboard_widgets', 20);