Themes: Revert [42788] as it breaks a lot of things.

See #43228


git-svn-id: https://develop.svn.wordpress.org/trunk@42816 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2018-03-09 16:59:57 +00:00
parent 9427bc4979
commit 5816caddcf
2 changed files with 0 additions and 22 deletions

View File

@ -413,8 +413,6 @@ function register_theme_directory( $directory ) {
$wp_theme_directories[] = $untrailed;
}
wp_clean_themes_cache();
return true;
}

View File

@ -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 );
}
}