Use wp_cache_add() instead of wp_cache_set() when we don't want an unconditional set.
props jeremyfelt. see #27003. Built from https://develop.svn.wordpress.org/trunk@27665 git-svn-id: http://core.svn.wordpress.org/trunk@27508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e14237a109
commit
64f7d4168f
|
@ -75,7 +75,7 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) {
|
|||
$one_network = $wpdb->get_row( "SELECT * FROM $wpdb->site LIMIT 2" ); // [sic]
|
||||
if ( 1 === $wpdb->num_rows ) {
|
||||
$current_site = wp_get_network( $one_network );
|
||||
wp_cache_set( 'current_network', $current_site, 'site-options' );
|
||||
wp_cache_add( 'current_network', $current_site, 'site-options' );
|
||||
} elseif ( 0 === $wpdb->num_rows ) {
|
||||
ms_not_installed();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue