In update_option(), call the update_option hook before the DB update.
Merges [25925] to the 3.7 branch. Reverses a regression from [25664]. props calin. fixes #25705. Built from https://develop.svn.wordpress.org/branches/3.7@25926 git-svn-id: http://core.svn.wordpress.org/branches/3.7@25885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
45cb40226f
commit
6098b84f76
|
@ -236,6 +236,7 @@ function update_option( $option, $value ) {
|
|||
|
||||
$serialized_value = maybe_serialize( $value );
|
||||
|
||||
do_action( 'update_option', $option, $old_value, $value );
|
||||
$result = $wpdb->update( $wpdb->options, array( 'option_value' => $serialized_value ), array( 'option_name' => $option ) );
|
||||
if ( ! $result )
|
||||
return false;
|
||||
|
@ -246,7 +247,6 @@ function update_option( $option, $value ) {
|
|||
wp_cache_set( 'notoptions', $notoptions, 'options' );
|
||||
}
|
||||
|
||||
do_action( 'update_option', $option, $old_value, $value );
|
||||
if ( ! defined( 'WP_INSTALLING' ) ) {
|
||||
$alloptions = wp_load_alloptions();
|
||||
if ( isset( $alloptions[$option] ) ) {
|
||||
|
|
Loading…
Reference in New Issue