Changeset 38636 for trunk/src/wp-includes/functions.php
- Timestamp:
- 09/20/2016 09:38:08 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r38632 r38636 4310 4310 * @since 3.0.0 4311 4311 * 4312 * @global object $current_site 4313 * 4312 4314 * @param int $site_id Optional. Site ID to test. Defaults to current site. 4313 4315 * @return bool True if $site_id is the main site of the network, or if not … … 4315 4317 */ 4316 4318 function is_main_site( $site_id = null ) { 4317 if ( ! is_multisite() ) { 4319 // This is the current network's information; 'site' is old terminology. 4320 global $current_site; 4321 4322 if ( ! is_multisite() ) 4318 4323 return true; 4319 } 4320 4321 if ( ! $site_id ) { 4324 4325 if ( ! $site_id ) 4322 4326 $site_id = get_current_blog_id(); 4323 } 4324 return (int) $site_id === (int) get_current_site()->blog_id;4327 4328 return (int) $site_id === (int) $current_site->blog_id; 4325 4329 } 4326 4330
Note: See TracChangeset
for help on using the changeset viewer.