mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@39382 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user