Themes: Ensure the theme roots cache is cleared when registering a theme directory.

Props soulseekah, johnbillion

Fixes #43228

Built from https://develop.svn.wordpress.org/trunk@42788


git-svn-id: http://core.svn.wordpress.org/trunk@42618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2018-03-05 22:14:30 +00:00
parent c9b07e6411
commit ea6360b47c
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-alpha-42787'; $wp_version = '5.0-alpha-42788';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.