From ee60500f1f5c53960fcbf12facaf77487d9ebb5d Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 25 Mar 2006 21:46:53 +0000 Subject: [PATCH] update_option() action fix. fixes #2553 git-svn-id: http://svn.automattic.com/wordpress/trunk@3659 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index ec8a192e1b..283375013a 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -365,6 +365,7 @@ function update_option($option_name, $newvalue) { return true; } + $_newvalue = $newvalue; if ( is_array($newvalue) || is_object($newvalue) ) $newvalue = serialize($newvalue); @@ -374,7 +375,7 @@ function update_option($option_name, $newvalue) { $option_name = $wpdb->escape($option_name); $wpdb->query("UPDATE $wpdb->options SET option_value = '$newvalue' WHERE option_name = '$option_name'"); if ( $wpdb->rows_affected == 1 ) { - do_action("update_option_{$option_name}", $oldvalue, $newvalue); + do_action("update_option_{$option_name}", array('old'=>$oldvalue, 'new'=>$_newvalue)); return true; } return false;