Changeset 54256 for trunk/src/wp-includes/class-wp-network.php
- Timestamp:
- 09/20/2022 02:24:08 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-network.php
r54133 r54256 256 256 $main_site_id = (int) $site->id; 257 257 } else { 258 $cache_key = 'network:' . $this->id . ':main_site'; 259 260 $main_site_id = wp_cache_get( $cache_key, 'site-options' ); 258 259 $main_site_id = get_network_option( $this->id, 'main_site' ); 261 260 if ( false === $main_site_id ) { 262 261 $_sites = get_sites( … … 271 270 $main_site_id = ! empty( $_sites ) ? array_shift( $_sites ) : 0; 272 271 273 wp_cache_add( $cache_key, $main_site_id, 'site-options');272 update_network_option( $this->id, 'main_site', $main_site_id ); 274 273 } 275 274 }
Note: See TracChangeset
for help on using the changeset viewer.