Changeset 37313
- Timestamp:
- 04/26/2016 08:28:46 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r37308 r37313 1546 1546 * for post thumbnails. 1547 1547 */ 1548 if ( is_array( $args[0] ) && is_array( $_wp_theme_features['post-thumbnails'][0] ) ) { 1549 $post_types = array_unique( array_merge( $args[0], $_wp_theme_features['post-thumbnails'][0] ) ); 1550 1551 $args = array( $post_types ); 1548 if ( is_array( $args[0] ) && isset( $_wp_theme_features['post-thumbnails'] ) ) { 1549 $args[0] = array_unique( array_merge( $_wp_theme_features['post-thumbnails'][0], $args[0] ) ); 1552 1550 } 1553 1551 -
trunk/tests/phpunit/tests/theme/support.php
r37309 r37313 45 45 46 46 public function test_post_thumbnails_flat_array_of_post_types() { 47 remove_theme_support( 'post-thumbnails' ); 48 47 49 add_theme_support( 'post-thumbnails', array( 'post', 'page' ) ); 48 $this->assertTrue( current_theme_supports( 'post-thumbnails' ) );49 50 $this->assertTrue( current_theme_supports( 'post-thumbnails', 'post' ) ); 50 51 $this->assertFalse( current_theme_supports( 'post-thumbnails', 'book' ) ); … … 68 69 add_theme_support( 'post-thumbnails' ); 69 70 $this->assertTrue( current_theme_supports( 'post-thumbnails', 'book' ) ); 71 72 // Reset post-thumbnails theme support. 73 remove_theme_support( 'post-thumbnails' ); 74 $this->assertFalse( current_theme_supports( 'post-thumbnails' ) ); 70 75 } 71 76
Note: See TracChangeset
for help on using the changeset viewer.