Created
November 7, 2013 16:48
-
-
Save ryanjbonnell/7357775 to your computer and use it in GitHub Desktop.
Disable WordPress Plugins in Local Environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Disable Plugins in Local Environment | |
* Plugin URI: | |
* Description: Blacklist of Plugins to Disable When Working Locally | |
* Version: 0.1 | |
* Author: Ryan J. Bonnell | |
* Author URI: https://gist.github.com/ryanjbonnell/ | |
* License: WTFPL | |
* License URI: http://www.wtfpl.net/txt/copying/ | |
*/ | |
if ( defined( 'WP_ENV_LOCAL' ) && WP_ENV_LOCAL ) { | |
$disabled_plugins = array( | |
'backupwordpress/backupwordpress.php', | |
'term-menu-order/term-menu-order.php', | |
'jetpack/jetpack.php', | |
); | |
require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); | |
deactivate_plugins( $disabled_plugins ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment