Make WordPress Core


Ignore:
Timestamp:
10/04/2012 12:40:09 PM (14 years ago)
Author:
ryan
Message:

Reduce use of global. Use get_blog_details() instead. fixes #22090

File:
1 edited

Legend:

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

    r22092 r22108  
    119119 * @since MU
    120120 *
    121  * @param int|string|array $fields A blog ID, a blog slug, or an array of fields to query against.
     121 * @param int|string|array $fields A blog ID, a blog slug, or an array of fields to query against. Optional. If not specified the current blog ID is used.
    122122 * @param bool $get_all Whether to retrieve all details or only the details in the blogs table. Default is true.
    123123 * @return object Blog details.
    124124 */
    125 function get_blog_details( $fields, $get_all = true ) {
     125function get_blog_details( $fields = null, $get_all = true ) {
    126126        global $wpdb;
    127127
     
    167167                }
    168168        } else {
    169                 if ( !is_numeric( $fields ) )
     169                if ( ! $fields )
     170                        $blog_id = get_current_blog_id();
     171                elseif ( ! is_numeric( $fields ) )
    170172                        $blog_id = get_id_from_blogname( $fields );
    171173                else
Note: See TracChangeset for help on using the changeset viewer.