Skip to content

Instantly share code, notes, and snippets.

@sheabunge
Created July 25, 2013 00:31
Show Gist options
  • Save sheabunge/6075849 to your computer and use it in GitHub Desktop.
Save sheabunge/6075849 to your computer and use it in GitHub Desktop.
When installing Capsule on a WordPress multisite network, the network active plugins can interfere with Capsule and stop it from working. This snippet, when installed as a mu-plugin, will disable all network active plugins for sites that use the Capsule theme.
<?php
/**
* Plugin Name: Disable Sitewide Plugins
* Author: Shea Bunge
* Author URI: http://bungeshea.com
* Version: 0.1
*/
if ( 'capsule' === get_option( 'template' ) ) {
add_filter( 'pre_site_option_active_sitewide_plugins', '__return_empty_array' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment