Skip to content

Commit 7dff371

Browse files
Coding Standards: Remove a one-time variable in WP_MS_Sites_List_Table::prepare_items().
This allows the `$wpdb::prepare()` call to be picked up correctly by PHPCS. Follow-up to [28712], [55656]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@60069 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c1f7f8a commit 7dff371

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/wp-admin/includes/class-wp-ms-sites-list-table.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ public function prepare_items() {
115115
|| preg_match( '/^[0-9]{1,3}\.$/', $s )
116116
) {
117117
// IPv4 address.
118-
$sql = $wpdb->prepare(
119-
"SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s",
120-
$wpdb->esc_like( $s ) . ( ! empty( $wild ) ? '%' : '' )
118+
$reg_blog_ids = $wpdb->get_col(
119+
$wpdb->prepare(
120+
"SELECT blog_id FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.IP LIKE %s",
121+
$wpdb->esc_like( $s ) . ( ! empty( $wild ) ? '%' : '' )
122+
)
121123
);
122124

123-
$reg_blog_ids = $wpdb->get_col( $sql );
124-
125125
if ( $reg_blog_ids ) {
126126
$args['site__in'] = $reg_blog_ids;
127127
}

0 commit comments

Comments
 (0)