Created
September 12, 2013 20:56
-
-
Save sambody/6543680 to your computer and use it in GitHub Desktop.
Remove plugin completely from admin (hide it), to prevent deactivation.
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
// hide plugins in admin | |
add_filter( 'all_plugins', 'hide_plugins'); | |
function hide_plugins($plugins) | |
{ | |
// Hide hello dolly plugin | |
if(is_plugin_active('hello.php')) { | |
unset( $plugins['hello.php'] ); | |
} | |
// Hide disqus plugin | |
if(is_plugin_active('disqus-comment-system/disqus.php')) { | |
unset( $plugins['disqus-comment-system/disqus.php'] ); | |
} | |
return $plugins; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment