Skip to content

Instantly share code, notes, and snippets.

@jayseventwo
Last active December 16, 2015 14:29
Show Gist options
  • Save jayseventwo/5449501 to your computer and use it in GitHub Desktop.
Save jayseventwo/5449501 to your computer and use it in GitHub Desktop.
Hide certain plugins from the plugins page in WordPress
function hideplugins() {
global $wp_list_table;
$hidearr = array('plugin-folder/plugin.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', hideplugins);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment