Clarify code in wp_load_alloptions(). Props joelhardi. Fixes #14896
git-svn-id: https://develop.svn.wordpress.org/trunk@15634 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
523e35615c
commit
a6d9954621
@ -411,10 +411,11 @@ function wp_load_alloptions() {
|
|||||||
$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" );
|
$alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" );
|
||||||
$wpdb->suppress_errors($suppress);
|
$wpdb->suppress_errors($suppress);
|
||||||
$alloptions = array();
|
$alloptions = array();
|
||||||
foreach ( (array) $alloptions_db as $o )
|
foreach ( (array) $alloptions_db as $o ) {
|
||||||
$alloptions[$o->option_name] = $o->option_value;
|
$alloptions[$o->option_name] = $o->option_value;
|
||||||
if ( !defined( 'WP_INSTALLING' ) || !is_multisite() )
|
}
|
||||||
wp_cache_add( 'alloptions', $alloptions, 'options' );
|
if ( !defined( 'WP_INSTALLING' ) || !is_multisite() )
|
||||||
|
wp_cache_add( 'alloptions', $alloptions, 'options' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $alloptions;
|
return $alloptions;
|
||||||
|
Loading…
Reference in New Issue
Block a user