Skip to content

Commit

Permalink
Cache clear when theme is network disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnynews committed Jan 9, 2024
1 parent 7622585 commit 6fb81ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wp-includes/class-wp-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -2048,6 +2048,10 @@ public static function network_disable_theme( $stylesheets ) {
$allowed_themes = get_site_option( 'allowedthemes' );
foreach ( $stylesheets as $stylesheet ) {
if ( isset( $allowed_themes[ $stylesheet ] ) ) {
$theme = wp_get_theme( $stylesheet );
if ( $theme->exists() ) {
$theme->cache_delete();
}
unset( $allowed_themes[ $stylesheet ] );
}
}
Expand Down

0 comments on commit 6fb81ac

Please sign in to comment.