Make WordPress Core

Ticket #36761: 36761.patch

File 36761.patch, 1.0 KB (added by dlh, 8 years ago)
  • src/wp-includes/option.php

     
    295295                return false;
    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 ) {
    301301                        $autoload = 'yes';
     
    416416        $notoptions = wp_cache_get( 'notoptions', 'options' );
    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
    422422        $serialized_value = maybe_serialize( $value );