pre_update_option_* filter from DD32. fixes #7233
git-svn-id: https://develop.svn.wordpress.org/trunk@8247 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e1d642299e
commit
64f744edc9
@ -490,8 +490,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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user