From 1c0e51452f567d4c42f6c21cc9377b0dfcc30ac1 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 30 Nov 2016 21:22:41 +0000 Subject: [PATCH] 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 --- 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 bf47fb4b1c..34302fd7f5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.