summaryrefslogtreecommitdiffstats
path: root/wp-includes/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/functions.php')
-rw-r--r--wp-includes/functions.php5
1 files changed, 4 insertions, 1 deletions
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;