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. Built from https://develop.svn.wordpress.org/trunk@37203 git-svn-id: http://core.svn.wordpress.org/trunk@37169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6279ca91de
commit
f74e50d1dd
|
@ -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' );
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.6-alpha-37202';
|
||||
$wp_version = '4.6-alpha-37203';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue