From b65cbd6003e41e5696f3b73b50e948221f1354f2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 5 May 2016 20:24:29 +0000 Subject: [PATCH] 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 --- wp-includes/option.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/option.php b/wp-includes/option.php index 253713f4bc..7a93f3f888 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index cc6455404b..90089b6a68 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.