Changeset 49344
- Timestamp:
- 10/27/2020 07:58:10 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r49214 r49344 2482 2482 * @since 5.5.0 The `core-block-patterns` feature was added and is enabled by default. 2483 2483 * @since 5.5.0 The `custom-logo` feature now also accepts 'unlink-homepage-logo'. 2484 * @since 5.6.0 The `post-formats` feature now returns doing it wrong if no array is passed 2484 2485 * 2485 2486 * @global array $_wp_theme_features … … 2524 2525 2525 2526 $args[0] = array_intersect( $args[0], array_keys( $post_formats ) ); 2527 } else { 2528 _doing_it_wrong( "add_theme_support( 'post-formats' )", __( 'You need to pass an array of types.' ), '5.6.0' ); 2529 return false; 2526 2530 } 2527 2531 break; -
trunk/tests/phpunit/tests/post/formats.php
r48937 r49344 7 7 function setUp() { 8 8 parent::setUp(); 9 } 10 11 /** 12 * @ticket 51390 13 */ 14 function test_post_format_doing_it_wrong() { 15 $this->setExpectedIncorrectUsage( "add_theme_support( 'post-formats' )" ); 16 17 // The second parameter should be an array. 18 $this->assertFalse( add_theme_support( 'post-formats' ) ); 9 19 } 10 20
Note: See TracChangeset
for help on using the changeset viewer.