Ticket #31047: 31047.patch
File 31047.patch, 928 bytes (added by , 10 years ago) |
---|
-
src/wp-includes/option.php
268 268 if ( $value === $old_value ) 269 269 return false; 270 270 271 if ( false=== $old_value )271 if ( apply_filters( 'default_option_' . $option, false ) === $old_value ) 272 272 return add_option( $option, $value ); 273 273 274 274 $serialized_value = maybe_serialize( $value ); … … 369 369 // Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query 370 370 $notoptions = wp_cache_get( 'notoptions', 'options' ); 371 371 if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) ) 372 if ( false!== get_option( $option ) )372 if ( apply_filters( 'default_option_' . $option, false ) !== get_option( $option ) ) 373 373 return false; 374 374 375 375 $serialized_value = maybe_serialize( $value );