Changeset 38388 for trunk/src/wp-includes/functions.php
- Timestamp:
- 08/26/2016 09:34:36 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r38386 r38388 4276 4276 * @since 3.0.0 4277 4277 * 4278 * @global object $current_site4279 *4280 4278 * @param int $site_id Optional. Site ID to test. Defaults to current site. 4281 4279 * @return bool True if $site_id is the main site of the network, or if not … … 4283 4281 */ 4284 4282 function is_main_site( $site_id = null ) { 4285 // This is the current network's information; 'site' is old terminology. 4286 global $current_site; 4287 4288 if ( ! is_multisite() ) 4283 if ( ! is_multisite() ) { 4289 4284 return true; 4290 4291 if ( ! $site_id ) 4285 } 4286 4287 if ( ! $site_id ) { 4292 4288 $site_id = get_current_blog_id(); 4293 4294 return (int) $site_id === (int) $current_site->blog_id;4289 } 4290 return (int) $site_id === (int) get_current_site()->blog_id; 4295 4291 } 4296 4292
Note: See TracChangeset
for help on using the changeset viewer.