Ticket #38540: 38540.diff
File 38540.diff, 1.3 KB (added by , 8 years ago) |
---|
-
src/wp-includes/theme.php
1763 1763 */ 1764 1764 function get_theme_starter_content() { 1765 1765 $theme_support = get_theme_support( 'starter-content' ); 1766 if ( ! empty( $theme_support ) ) {1766 if ( is_array( $theme_support ) && ! empty( $theme_support ) ) { 1767 1767 $config = $theme_support[0]; 1768 1768 } else { 1769 1769 $config = array(); -
tests/phpunit/tests/theme/getThemeStarterContent.php
1 <?php 2 3 /** 4 * @group themes 5 */ 6 class Tests_WP_Theme_Get_Theme_Starter_Content extends WP_UnitTestCase { 7 8 9 function test_add_theme_support_empty() { 10 add_theme_support( 'starter-content', array() ); 11 12 $starter_content = get_theme_starter_content(); 13 14 $this->assertEmpty( $starter_content ); 15 } 16 17 function test_add_theme_support_single_param() { 18 add_theme_support( 'starter-content' ); 19 20 $starter_content = get_theme_starter_content(); 21 22 $this->assertEmpty( $starter_content ); 23 } 24 } 25