コード例 #1
0
 function column_status($item)
 {
     $ip = $item['ip_or_host'];
     //Check if this IP address is locked
     $is_locked = AIOWPSecurity_Utility::check_locked_ip($ip);
     if ($is_locked) {
         return 'temporarily blocked';
     } else {
         return '';
     }
 }
コード例 #2
0
 function column_status($item)
 {
     global $aio_wp_security;
     $ip = $item['ip_or_host'];
     //Check if this IP address is locked
     $is_locked = AIOWPSecurity_Utility::check_locked_ip($ip);
     $blacklisted_string = $aio_wp_security->configs->get_value('aiowps_banned_ip_addresses');
     $banned = strpos($blacklisted_string, $ip);
     if ($banned !== false) {
         return 'blacklisted';
     } else {
         if ($is_locked) {
             return 'temporarily blocked';
         } else {
             return '';
         }
     }
 }
 function do_404_lockout_tasks()
 {
     global $aio_wp_security;
     $redirect_url = $aio_wp_security->configs->get_value('aiowps_404_lock_redirect_url');
     //This is the redirect URL for blocked users
     $visitor_ip = AIOWPSecurity_Utility_IP::get_user_ip_address();
     $is_locked = AIOWPSecurity_Utility::check_locked_ip($visitor_ip);
     if ($is_locked) {
         //redirect blocked user to configured URL
         AIOWPSecurity_Utility::redirect_to_url($redirect_url);
     } else {
         //allow through
     }
 }