Changeset 27664
- Timestamp:
- 03/24/2014 01:00:17 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-settings.php
r27663 r27664 173 173 if ( $current_blog->domain === $current_site->domain && $current_blog->path === $current_site->path ) { 174 174 $current_site->blog_id = $current_blog->blog_id; 175 } else { 176 // @todo we should be able to cache the blog ID of a network's main site easily. 175 } elseif ( ! $current_site->blog_id = wp_cache_get( 'network:' . $current_site->id . ':main_site', 'site-options' ) ) { 177 176 $current_site->blog_id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s", 178 177 $current_site->domain, $current_site->path ) ); 178 wp_cache_add( 'network:' . $current_site->id . ':main_site', $current_site->blog_id, 'site-options' ); 179 179 } 180 180 }
Note: See TracChangeset
for help on using the changeset viewer.