add_action( 'wp', 'custom_user_exclude_ip_restrictions_check_user' );
function 'custom_user_exclude_ip_restrictions_check_user() {
$current_user = wp_get_current_user();
if( is_object($current_user) ) {
$exclude = get_user_meta( $current_user->ID, 'exclude_ip_restriction', true );
if( isset($exclude) && $exclude == 'on' ) {
add_filter( 'ws_plugin__s2member_disable_all_ip_restrictions', 'custom_user_exclude_ip_restrictions_filter' );
}
}
}
function custom_user_exclude_ip_restrictions_filter() {
return true;
}
if (!apply_filters ("ws_plugin__s2member_disable_all_ip_restrictions", false, get_defined_vars ())
/* Also allow specific exclusions here. */ && !apply_filters ("ws_plugin__s2member_disable_specific_ip_restriction", false, get_defined_vars ())
/* And enabled by site owner? */ && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"] /* And a valid ``$restriction``? */ && $restriction && is_string ($restriction)
Statistics: Posted by foliovision — January 18th, 2012, 9:51 am
Statistics: Posted by foliovision — January 18th, 2012, 9:15 am
$restriction = strtolower("JohnDoe22");
delete_transient (md5 ("s2member_ip_restrictions_" . $restriction . "_breached"));
Statistics: Posted by Jason Caldwell — August 27th, 2010, 2:26 pm
Statistics: Posted by Nemrod Kedem — August 24th, 2010, 2:30 pm