Make WordPress Core

Changeset 38916


Ignore:
Timestamp:
10/25/2016 07:22:32 PM (8 years ago)
Author:
jeremyfelt
Message:

Options: Make $passed_default available in remaining default_option_{$option} filter.

Pass false as the $passed_default value when the default_option_{$option} filter is applied in update_option as no default is ever passed.

This resolves an error in tests where the 3rd parameter is not available to filter_default_option().

Fixes #38176.

File:
1 edited

Legend:

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

    r38910 r38916  
    301301
    302302    /** This filter is documented in wp-includes/option.php */
    303     if ( apply_filters( 'default_option_' . $option, false, $option ) === $old_value ) {
     303    if ( apply_filters( 'default_option_' . $option, false, $option, false ) === $old_value ) {
    304304        // Default setting for new options is 'yes'.
    305305        if ( null === $autoload ) {
Note: See TracChangeset for help on using the changeset viewer.