Options: Pass the `$passed_default` parameter to the `'default_option_{$option}` filter in `add_option()`.

This was missed in [38910].

Props joehoyle, lucasstark.
See #38176.
Fixes #38930.
Built from https://develop.svn.wordpress.org/trunk@39382


git-svn-id: http://core.svn.wordpress.org/trunk@39322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-11-30 21:22:41 +00:00
parent dd46ba58ea
commit 1c0e51452f
2 changed files with 2 additions and 2 deletions

View File

@ -421,7 +421,7 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' )
$notoptions = wp_cache_get( 'notoptions', 'options' );
if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) )
/** This filter is documented in wp-includes/option.php */
if ( apply_filters( 'default_option_' . $option, false, $option ) !== get_option( $option ) )
if ( apply_filters( 'default_option_' . $option, false, $option, false ) !== get_option( $option ) )
return false;
$serialized_value = maybe_serialize( $value );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39380';
$wp_version = '4.8-alpha-39382';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.