From 137d716ebbd42d37b84827ce2a686bc0a67cef80 Mon Sep 17 00:00:00 2001 From: Jeremy Felt Date: Thu, 14 Apr 2016 03:49:01 +0000 Subject: [PATCH] Multisite: Remove theme from network allowed themes when deleted Previously, a deleted theme would remain in the list of allowed themes until manually cleared. This uses `WP_Theme::network_disable_theme()`, added in [37202]. Fixes #34182. git-svn-id: https://develop.svn.wordpress.org/trunk@37203 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/theme.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index e469f5c14c..52bf5745c3 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -83,6 +83,11 @@ function delete_theme($stylesheet, $redirect = '') { } } + // Remove the theme from allowed themes on the network. + if ( is_multisite() ) { + WP_Theme::network_disable_theme( $stylesheet ); + } + // Force refresh of theme update information. delete_site_transient( 'update_themes' );