From 1c034393f019ab593d4ec9200094d52422196b50 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Tue, 25 Oct 2016 19:22: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. git-svn-id: https://develop.svn.wordpress.org/trunk@38916 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/option.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 5311df507a..abc7b6f91d 100644 --- a/src/wp-includes/option.php +++ b/src/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';