diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 9780519856..02bf0299bf 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -948,10 +948,6 @@ function wp_get_active_and_valid_themes() { return $themes; } - if ( ! wp_using_themes() ) { - return $themes; - } - if ( TEMPLATEPATH !== STYLESHEETPATH ) { $themes[] = STYLESHEETPATH; } diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php index 7e183c995d..1113a87eea 100644 --- a/tests/phpunit/includes/bootstrap.php +++ b/tests/phpunit/includes/bootstrap.php @@ -252,7 +252,6 @@ $phpmailer = new MockPHPMailer( true ); if ( ! defined( 'WP_DEFAULT_THEME' ) ) { define( 'WP_DEFAULT_THEME', 'default' ); } -define( 'WP_USE_THEMES', true ); $wp_theme_directories = array(); if ( file_exists( DIR_TESTDATA . '/themedir1' ) ) { diff --git a/tests/phpunit/tests/load/wpGetActiveAndValidThemes.php b/tests/phpunit/tests/load/wpGetActiveAndValidThemes.php deleted file mode 100644 index f6519486f8..0000000000 --- a/tests/phpunit/tests/load/wpGetActiveAndValidThemes.php +++ /dev/null @@ -1,30 +0,0 @@ -assertEquals( - array( - TEMPLATEPATH, - ), - wp_get_active_and_valid_themes() - ); - - // Disabling 'wp_using_themes' should return an empty array. - add_filter( 'wp_using_themes', '__return_false' ); - $this->assertEquals( - array(), - wp_get_active_and_valid_themes() - ); - } -}