Hi, to deactivate plugins for certain pages I added
add_filter( ‘option_active_plugins’, ‘disable_specific_plugin’ );
function disable_specific_plugin($plugins){ ………
to functions.php in /wp-content/mu-plugins/.
It works fine, I just wonder why this code is being executed so often. When for testing purposes I added some output, I noticed that depending on the page it’s being executed between 50 and 100 times. I would have expected it to be executed either once or once for each plugin. Is there an explanation for this (or maybe a way to avoid it and thus improve the performance of the site)? Thanks in advance.
