Strategies to implement selective loading of plugins
Filter option_active_plugins. You can change the result of get_option() here without actually changing the database. if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) add_filter( ‘option_active_plugins’, ‘disable_plugins_temporary’ ); function disable_plugins_temporary( $plugins ) { // unset plugins you don’t need, then return $plugins; } Background wp_get_active_and_valid_plugins() calls get_option( ‘active_plugins’, array() ) to get the active plugins. In … Read more