Don't pass serialized values to hooks in options API. see #10788 see #12416

git-svn-id: http://svn.automattic.com/wordpress/trunk@13508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-02-28 19:32:17 +00:00
parent 601c2f4dfc
commit 3bf738fcc2
1 changed files with 2 additions and 2 deletions

View File

@ -512,7 +512,7 @@ function update_option( $option, $newvalue ) {
$_newvalue = $newvalue;
$newvalue = maybe_serialize( $newvalue );
do_action( 'update_option', $option, $oldvalue, $newvalue ); // $newvalue may be serialized.
do_action( 'update_option', $option, $oldvalue, $_newvalue );
if ( ! defined( 'WP_INSTALLING' ) ) {
$alloptions = wp_load_alloptions();
if ( isset( $alloptions[$option] ) ) {
@ -579,7 +579,7 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' )
$_value = $value;
$value = maybe_serialize( $value );
$autoload = ( 'no' === $autoload ) ? 'no' : 'yes';
do_action( 'add_option', $option, $value );
do_action( 'add_option', $option, $_value );
if ( ! defined( 'WP_INSTALLING' ) ) {
if ( 'yes' == $autoload ) {
$alloptions = wp_load_alloptions();