113 || preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.?$/', $s ) |
113 || preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.?$/', $s ) |
114 || preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.?$/', $s ) |
114 || preg_match( '/^[0-9]{1,3}\.[0-9]{1,3}\.?$/', $s ) |
115 || preg_match( '/^[0-9]{1,3}\.$/', $s ) |
115 || preg_match( '/^[0-9]{1,3}\.$/', $s ) |
116 ) { |
116 ) { |
117 // IPv4 address. |
117 // IPv4 address. |
118 $sql = $wpdb->prepare( |
118 $reg_blog_ids = $wpdb->get_col( |
119 "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s", |
119 $wpdb->prepare( |
120 $wpdb->esc_like( $s ) . ( ! empty( $wild ) ? '%' : '' ) |
120 "SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s", |
|
121 $wpdb->esc_like( $s ) . ( ! empty( $wild ) ? '%' : '' ) |
|
122 ) |
121 ); |
123 ); |
122 |
|
123 $reg_blog_ids = $wpdb->get_col( $sql ); |
|
124 |
124 |
125 if ( $reg_blog_ids ) { |
125 if ( $reg_blog_ids ) { |
126 $args['site__in'] = $reg_blog_ids; |
126 $args['site__in'] = $reg_blog_ids; |
127 } |
127 } |
128 } elseif ( is_numeric( $s ) && empty( $wild ) ) { |
128 } elseif ( is_numeric( $s ) && empty( $wild ) ) { |
609 */ |
609 */ |
610 do_action( 'manage_sites_custom_column', $column_name, $blog['blog_id'] ); |
610 do_action( 'manage_sites_custom_column', $column_name, $blog['blog_id'] ); |
611 } |
611 } |
612 |
612 |
613 /** |
613 /** |
614 * @global string $mode List table view mode. |
614 * Generates the list table rows. |
|
615 * |
|
616 * @since 3.1.0 |
615 */ |
617 */ |
616 public function display_rows() { |
618 public function display_rows() { |
617 foreach ( $this->items as $blog ) { |
619 foreach ( $this->items as $blog ) { |
618 $blog = $blog->to_array(); |
620 $blog = $blog->to_array(); |
619 $class = ''; |
621 $class = ''; |