WordPress.org

Make WordPress Core

Changeset 8247


Ignore:
Timestamp:
07/03/2008 03:51:53 PM (10 years ago)
Author:
ryan
Message:

pre_update_option_* filter from DD32. fixes #7233

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r8216 r8247  
    491491    $newvalue = sanitize_option( $option_name, $newvalue );
    492492
     493    $oldvalue = get_option( $safe_option_name );
     494
     495    $newvalue = apply_filters( 'pre_update_option_' . $option_name, $newvalue, $oldvalue );
     496
    493497    // If the new and old values are the same, no need to update.
    494     $oldvalue = get_option( $safe_option_name );
    495498    if ( $newvalue === $oldvalue )
    496499        return false;
Note: See TracChangeset for help on using the changeset viewer.