Make WordPress Core

Ticket #27112: option.php.diff

File option.php.diff, 556 bytes (added by westonruter, 11 years ago)

Add pre_update_option filter to update_option()

  • src/wp-includes/option.php

     
    226226        $value = sanitize_option( $option, $value );
    227227        $old_value = get_option( $option );
    228228        $value = apply_filters( 'pre_update_option_' . $option, $value, $old_value );
     229        $value = apply_filters( 'pre_update_option', $value, $option, $old_value );
    229230
    230231        // If the new and old values are the same, no need to update.
    231232        if ( $value === $old_value )