diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php index 662df894b3..ecbedec482 100644 --- a/src/wp-includes/theme.php +++ b/src/wp-includes/theme.php @@ -413,8 +413,6 @@ function register_theme_directory( $directory ) { $wp_theme_directories[] = $untrailed; } - wp_clean_themes_cache(); - return true; } diff --git a/tests/phpunit/tests/theme/themeDir.php b/tests/phpunit/tests/theme/themeDir.php index 4e915aeb40..2cab375b1a 100644 --- a/tests/phpunit/tests/theme/themeDir.php +++ b/tests/phpunit/tests/theme/themeDir.php @@ -293,24 +293,4 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase { rmdir( WP_CONTENT_DIR . '/themes/foo' ); rmdir( WP_CONTENT_DIR . '/themes/foo-themes' ); } - - /** - * @ticket 43228 - */ - function test_theme_dir_caches() { - @mkdir( WP_CONTENT_DIR . '/themes/foo' ); - @mkdir( WP_CONTENT_DIR . '/themes/foo/bar' ); - - $old_roots = get_theme_roots(); - - register_theme_directory( WP_CONTENT_DIR . '/themes/foo' ); - - $new_roots = get_theme_roots(); - - rmdir( WP_CONTENT_DIR . '/themes/foo/bar' ); - rmdir( WP_CONTENT_DIR . '/themes/foo' ); - - $this->assertNotEquals( $new_roots, $old_roots ); - $this->assertArrayHasKey( 'foo', $new_roots ); - } }