Changeset 37477
- Timestamp:
- 05/20/2016 10:03:52 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/date.php
r37342 r37477 492 492 'post_date', 'post_date_gmt', 'post_modified', 493 493 'post_modified_gmt', 'comment_date', 'comment_date_gmt', 494 'user_registered', 494 'user_registered', 'registered', 'last_updated', 495 495 ); 496 496 … … 526 526 'user_registered', 527 527 ), 528 $wpdb->blogs => array( 529 'registered', 530 'last_updated', 531 ), 528 532 ); 529 533 -
trunk/src/wp-includes/ms-blogs.php
r37468 r37477 521 521 522 522 /** 523 * Adds any sites from the given ids to the cache that do not already exist in cache. 524 * 525 * @since 4.6.0 526 * @access private 527 * 528 * @see update_site_cache() 529 * 530 * @global wpdb $wpdb WordPress database abstraction object. 531 * 532 * @param array $ids ID list. 533 */ 534 function _prime_site_caches( $ids ) { 535 global $wpdb; 536 537 $non_cached_ids = _get_non_cached_ids( $ids, 'sites' ); 538 if ( ! empty( $non_cached_ids ) ) { 539 $fresh_sites = $wpdb->get_results( sprintf( "SELECT * FROM $wpdb->blogs WHERE blog_id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) ); 540 541 update_site_cache( $fresh_sites ); 542 } 543 } 544 545 /** 546 * Updates sites in cache. 547 * 548 * @since 4.6.0 549 * 550 * @param array $sites Array of site objects, passed by reference. 551 */ 552 function update_site_cache( &$sites ) { 553 if ( ! $sites ) { 554 return; 555 } 556 557 foreach ( $sites as $site ) { 558 wp_cache_add( $site->blog_id, $site, 'sites' ); 559 wp_cache_add( $site->blog_id . 'short', $site, 'blog-details' ); 560 } 561 } 562 563 /** 523 564 * Retrieve option value for a given blog id based on name of option. 524 565 * -
trunk/src/wp-settings.php
r37428 r37477 100 100 // Initialize multisite if enabled. 101 101 if ( is_multisite() ) { 102 require( ABSPATH . WPINC . '/class-wp-site-query.php' ); 102 103 require( ABSPATH . WPINC . '/ms-blogs.php' ); 103 104 require( ABSPATH . WPINC . '/ms-settings.php' );
Note: See TracChangeset
for help on using the changeset viewer.