Have you ever wanted to hide a plugin from the list of plugins in the WordPress admin? You may want to hide a plugin so the client doesn’t accidentally deactivate or delete it. Or maybe it’s just a utility plugin the a client doesn’t need to see or mess with the settings of. The code snippet below will completely hide a plugin from WordPress plugins list on the Admin side.

[php]
/* Hide from Plugins List */
function hide_plugin_srhtrick() {
global $wp_list_table;
$hidearr = array(‘new-royalslider/newroyalslider.php’);
$myplugins = $wp_list_table->items;
foreach ($myplugins as $key => $val) {
if (in_array($key,$hidearr)) {
unset($wp_list_table->items[$key]);
}
}
}
add_action(‘pre_current_active_plugins’, ‘hide_plugin_srhtrick’);
[/php]