Changeset 37652 for trunk/src/wp-includes/ms-blogs.php
- Timestamp:
- 06/08/2016 02:47:48 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-blogs.php
r37618 r37652 480 480 * @global WP_Site $current_blog The current site. 481 481 * 482 * @param WP_Site|int $site Site to retrieve. 483 * @param string $output Optional. Type of output to return. OBJECT or ARRAY_A or ARRAY_N constants. 482 * @param WP_Site|int $site Site to retrieve. 484 483 * @return WP_Site|array|null Depends on $output value. 485 484 */ 486 function get_site( &$site = null , $output = OBJECT) {485 function get_site( &$site = null ) { 487 486 global $current_blog; 488 487 if ( empty( $site ) && isset( $current_blog ) ) { … … 510 509 */ 511 510 $_site = apply_filters( 'get_site', $_site ); 512 513 if ( $output == OBJECT ) {514 return $_site;515 } elseif ( $output == ARRAY_A ) {516 return $_site->to_array();517 } elseif ( $output == ARRAY_N ) {518 return array_values( $_site->to_array() );519 }520 511 521 512 return $_site;
Note: See TracChangeset
for help on using the changeset viewer.