option_active_plugins Filter disabling plugins
-
I placed a hooked function into an mu-plugin.
When I disable plugins on rest-api calls, those plugins get deactivated in wordpress globally also, not only during this specific request.
I also noticed multiple calls of
option_active_plugins. Then I only disabled plugins once, but with same result.Once I filter out any plugin from being loaded on specific page it gets deactivated globally.
Is there any way to overcome this issue?
Or is this complex due to the way how wordpress works?This is how the function logic looks like:
$plugins_not_needed = array ("plugin-folder-name/plugin.php") foreach ( $plugins_not_needed as $plugin ) { $key = array_search( $plugin, $plugins ); if ( false !== $key ) { unset( $plugins[ $key ] ); } }
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
The topic ‘option_active_plugins Filter disabling plugins’ is closed to new replies.