Make WordPress Core

Ticket #25705: update_option.diff

File update_option.diff, 752 bytes (added by calin, 11 years ago)
  • wp-includes/option.php

    diff -Naur a/wp-includes/option.php b/wp-includes/option.php
    a b  
    236236
    237237        $serialized_value = maybe_serialize( $value );
    238238
     239        do_action( 'update_option', $option, $old_value, $value );
    239240        $result = $wpdb->update( $wpdb->options, array( 'option_value' => $serialized_value ), array( 'option_name' => $option ) );
    240241        if ( ! $result )
    241242                return false;
     
    246247                wp_cache_set( 'notoptions', $notoptions, 'options' );
    247248        }
    248249
    249         do_action( 'update_option', $option, $old_value, $value );
    250250        if ( ! defined( 'WP_INSTALLING' ) ) {
    251251                $alloptions = wp_load_alloptions();
    252252                if ( isset( $alloptions[$option] ) ) {