WordPress.org

Make WordPress Core

Changeset 37367


Ignore:
Timestamp:
05/05/2016 08:23:43 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Options: After [33738], consistently pass option name as the second parameter to the 'default_option_' . $option filter in add_option() and update_option().

Props dlh.
Fixes #36761.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/option.php

    r37264 r37367  
    296296
    297297    /** This filter is documented in wp-includes/option.php */
    298     if ( apply_filters( 'default_option_' . $option, false ) === $old_value ) {
     298    if ( apply_filters( 'default_option_' . $option, false, $option ) === $old_value ) {
    299299        // Default setting for new options is 'yes'.
    300300        if ( null === $autoload ) {
     
    417417    if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) )
    418418        /** This filter is documented in wp-includes/option.php */
    419         if ( apply_filters( 'default_option_' . $option, false ) !== get_option( $option ) )
     419        if ( apply_filters( 'default_option_' . $option, false, $option ) !== get_option( $option ) )
    420420            return false;
    421421
Note: See TracChangeset for help on using the changeset viewer.