From 08ff35374b13d0865e79b4f542ffa74a5d1376ae Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 30 Nov 2016 21:32:34 +0000 Subject: [PATCH] Options: Pass the `$passed_default` parameter to the `default_option_{$option}` filter in `add_option()`. This was missed in [38910]. Merge of [39382] to the 4.7 branch. Props joehoyle, lucasstark. See #38176, #38930. Built from https://develop.svn.wordpress.org/branches/4.7@39383 git-svn-id: http://core.svn.wordpress.org/branches/4.7@39323 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/option.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/option.php b/wp-includes/option.php index 82625f764e..05c6cc7421 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 7512ccec4b..4bfacdec93 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-RC1-39381'; +$wp_version = '4.7-RC1-39383'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.