$topVal){ foreach($topVal as $key=>$val){ if($val['activated']==1){ $arr[$field][$key]['date_requested']=$val['date_requested']; $arr[$field][$key]['activated']=$val['activated']; $arr[$field][$key]['ipkey']=$val['ipkey']; $arr[$field][$key]['date_activated']=$val['date_activated']; } } } update_option( $wpaip_options['whitelist'] , $arr ); } //Remove whitlisted ip. function remove_whitlisted_ip(){ global $wpaip_options, $current_user; $user = $current_user->user_login; $ip = $_SERVER['REMOTE_ADDR']; $known[ $user ][ $ip ]['date_requested'] = date(WPAIP_DATE_FORMAT); $known[ $user ][ $ip ]['date_activated'] = date(WPAIP_DATE_FORMAT); $known[ $user ][ $ip ]['activated'] = true; update_option( $wpaip_options['whitelist'] , $known ); } // Init plugin options to white list our options function wpaip_options_init(){ register_setting( 'authorizeipaddress_options', 'authorizeipaddress', 'wpaip_options_validate'); } // Add menu page function wpaip_options_add_page() { add_options_page('Authorize IP Address Options', 'Authorize IP Address', 'manage_options', 'authorizeipaddress', 'wpaip_options_do_page'); } // Draw the menu page itself function wpaip_options_do_page() { global $wpaip_options; if(isset($_POST['outstanding'])){ remove_outstanding(); } if(isset($_POST['whitelist'])){ remove_whitlisted_ip(); } ?>

Authorize IP Address

Authorize IP Address allows each user to maintain a whitelist of IP addresses allowed to login to the site.

Enable Authorize IP Address? />
Notify Both Blog Admin & User? " />

Whitelisted IP Addresses

$arr1) { foreach ($arr1 as $ip => $arr2) { if ($arr2['activated'] == true) { echo ""; echo ""; } }} ?>
Username IP Address Date Activated Remove Manual
Username IP Address Date Activated Remove Manual
$user$ip{$arr2['date_activated']}

Outstanding IP Activations

$arr1) { foreach ($arr1 as $ip => $arr2) { if ($arr2['activated'] == false) { echo ""; }}} ?>
Username IP Address Request Date Activation Key Approve IP Address
Username IP Address Request Date Activation Key Approve IP Address
$user$ip{$arr2['date_requested']}{$arr2['ipkey']}

About Authorize IP Address

This plugin is maintained by Toni Jovevski.
$topVal){ foreach($topVal as $key=>$val){ if($key!=$_REQUEST['ip'] && $field!=$_REQUEST['user']){ $arr[$field][$key]['date_requested']=$val['date_requested']; $arr[$field][$key]['activated']=$val['activated']; $arr[$field][$key]['ipkey']=$val['ipkey']; $arr[$field][$key]['date_activated']=$val['date_activated']; } } } update_option( $wpaip_options['whitelist'] , $arr ); } add_action( 'wp_ajax_manual_deletewhitelist', 'manual_deletewhitelist' ); // Sanitize and validate input. Accepts an array, return a sanitized array. function wpaip_options_validate($input) { $input['enabled'] = ( $input['enabled'] == 1 ? 1 : 0 ); $input['notify_both'] = ( $input['notify_both'] == 1 ? 1 : 0 ); return $input; }