WordPress.org

Make WordPress Core

Changeset 25487


Ignore:
Timestamp:
09/19/2013 01:19:56 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Use wp_parse_id_list() to parse the 'network_id' parameter in wp_get_sites().

props jamescollins.
see #14511.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r25446 r25487  
    20332033
    20342034    if ( isset( $args['network_id'] ) && ( is_array( $args['network_id'] ) || is_numeric( $args['network_id'] ) ) ) {
    2035         $network_ids = array_map('intval', (array) $args['network_id'] );
    2036         $network_ids = implode( ',', $network_ids );
     2035        $network_ids = implode( ',', wp_parse_id_list( $args['network_id'] ) );
    20372036        $query .= "AND site_id IN ($network_ids) ";
    20382037    }
Note: See TracChangeset for help on using the changeset viewer.