Changeset 39383
- Timestamp:
- 11/30/2016 09:31:38 PM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-includes/option.php
r39335 r39383 422 422 if ( !is_array( $notoptions ) || !isset( $notoptions[$option] ) ) 423 423 /** This filter is documented in wp-includes/option.php */ 424 if ( apply_filters( 'default_option_' . $option, false, $option ) !== get_option( $option ) )424 if ( apply_filters( 'default_option_' . $option, false, $option, false ) !== get_option( $option ) ) 425 425 return false; 426 426 -
branches/4.7/tests/phpunit/tests/option/registration.php
r38910 r39383 63 63 64 64 /** 65 * @ticket 38930 66 */ 67 public function test_add_option_with_no_options_cache() { 68 register_setting( 'test_group', 'test_default', array( 69 'default' => 'My Default :)', 70 )); 71 wp_cache_delete( 'notoptions', 'options' ); 72 $this->assertTrue( add_option( 'test_default', 'hello' ) ); 73 $this->assertEquals( 'hello', get_option( 'test_default' ) ); 74 } 75 76 /** 65 77 * @expectedDeprecated register_setting 66 78 */
Note: See TracChangeset
for help on using the changeset viewer.