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
This commit is contained in:
parent
a56fc1fba0
commit
137d716ebb
@ -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.
|
// Force refresh of theme update information.
|
||||||
delete_site_transient( 'update_themes' );
|
delete_site_transient( 'update_themes' );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user