Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix: prevent deactivation of plugins when not in admin context
  • Loading branch information
dhruvikpatel18 committed Jun 5, 2025
commit d34306a97ae40d75f494f156d8b14c1f6a0a804d
4 changes: 4 additions & 0 deletions src/wp-admin/includes/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,10 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
* and the current site. Multisite only. Default null.
*/
function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) {
if ( ! is_admin() ) {
return;
}

if ( is_multisite() ) {
$network_current = get_site_option( 'active_sitewide_plugins', array() );
}
Expand Down
Loading