From 8972cb70b6ca1f7519ce1d768ebea07173b0fe54 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Tue, 25 Oct 2016 19:23:32 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@38916 git-svn-id: http://core.svn.wordpress.org/trunk@38859 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 5311df507a..abc7b6f91d 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -300,7 +300,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, $option ) === $old_value ) { + if ( apply_filters( 'default_option_' . $option, false, $option, false ) === $old_value ) { // Default setting for new options is 'yes'. if ( null === $autoload ) { $autoload = 'yes'; diff --git a/wp-includes/version.php b/wp-includes/version.php index 30ac1bd612..61e8c316e4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38915'; +$wp_version = '4.7-alpha-38916'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.