if ( empty( $s ) ) { // Nothing to do.
} elseif ( preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/',
$s ) ||
preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.?$/',
$s ) ||
preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.?$/',
$s ) ||
preg_match( '/^[0-9]{1,3}\.$/',
$s ) ) { // IPv4 address.
$sql =
$wpdb->
prepare( "SELECT blog_id FROM {
$wpdb->registration_log
} WHERE {
$wpdb->registration_log
}.IP LIKE %s",
$wpdb->
esc_like( $s ) .
( !
empty( $wild ) ? '%' : ''
) );
$reg_blog_ids =
$wpdb->
get_col( $sql );
if ( $reg_blog_ids ) { $args['site__in'
] =
$reg_blog_ids;
} } elseif ( is_numeric( $s ) &&
empty( $wild ) ) { $args['ID'
] =
$s;
} else { $args['search'
] =
$s;