Make update_option() consistent with add_option() for how serializable data is stored in the object cache.
props rmccue. fixes #23381. git-svn-id: http://core.svn.wordpress.org/trunk@24760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
df0ac70aff
commit
062928d842
|
@ -247,10 +247,10 @@ function update_option( $option, $newvalue ) {
|
||||||
if ( ! defined( 'WP_INSTALLING' ) ) {
|
if ( ! defined( 'WP_INSTALLING' ) ) {
|
||||||
$alloptions = wp_load_alloptions();
|
$alloptions = wp_load_alloptions();
|
||||||
if ( isset( $alloptions[$option] ) ) {
|
if ( isset( $alloptions[$option] ) ) {
|
||||||
$alloptions[$option] = $_newvalue;
|
$alloptions[$option] = $newvalue;
|
||||||
wp_cache_set( 'alloptions', $alloptions, 'options' );
|
wp_cache_set( 'alloptions', $alloptions, 'options' );
|
||||||
} else {
|
} else {
|
||||||
wp_cache_set( $option, $_newvalue, 'options' );
|
wp_cache_set( $option, $newvalue, 'options' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue