Skip to content

Instantly share code, notes, and snippets.

@dejanmarkovic
Forked from JPry/Disable Plugins.md
Created January 2, 2014 01:38
Show Gist options
  • Save dejanmarkovic/8213770 to your computer and use it in GitHub Desktop.
Save dejanmarkovic/8213770 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Disable all plugins
* Plugin URI: https://gist.github.com/JCPry/8026015
* Description: Short-circuits the function in WordPress that determines which plugins are activated, and tells WordPress that no plugins are activated
* Version: 1.0
* Author: Jeremy Pry
* Author URI: http://jeremypry.com/
*/
add_filter( 'pre_option_active_plugins', '__return_empty_array' );
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