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.
Built from https://develop.svn.wordpress.org/trunk@37367


git-svn-id: http://core.svn.wordpress.org/trunk@37333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-05-05 20:24:29 +00:00
parent 2459e4e880
commit b65cbd6003
2 changed files with 3 additions and 3 deletions

View File

@ -295,7 +295,7 @@ function update_option( $option, $value, $autoload = null ) {
return false;
/** This filter is documented in wp-includes/option.php */
if ( apply_filters( 'default_option_' . $option, false ) === $old_value ) {
if ( apply_filters( 'default_option_' . $option, false, $option ) === $old_value ) {
// Default setting for new options is 'yes'.
if ( null === $autoload ) {
$autoload = 'yes';
@ -416,7 +416,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 ) !== get_option( $option ) )
if ( apply_filters( 'default_option_' . $option, false, $option ) !== get_option( $option ) )
return false;
$serialized_value = maybe_serialize( $value );

View File

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