From 2b6348978ec434e2fa4114085783cf9ada097b22 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 3 Jul 2008 17:00:59 +0000 Subject: WP Merge to rev 8249 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1347 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'wp-includes/functions.php') diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c488fdd..0fe154d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -515,8 +515,11 @@ function update_option( $option_name, $newvalue ) { $safe_option_name = $wpdb->escape( $option_name ); $newvalue = sanitize_option( $option_name, $newvalue ); - // If the new and old values are the same, no need to update. $oldvalue = get_option( $safe_option_name ); + + $newvalue = apply_filters( 'pre_update_option_' . $option_name, $newvalue, $oldvalue ); + + // If the new and old values are the same, no need to update. if ( $newvalue === $oldvalue ) return false; -- cgit