Skip to content

Instantly share code, notes, and snippets.

@edheltzel
Last active March 5, 2018 08:36
Show Gist options
  • Select an option

  • Save edheltzel/ca102077d39f42c84f16 to your computer and use it in GitHub Desktop.

Select an option

Save edheltzel/ca102077d39f42c84f16 to your computer and use it in GitHub Desktop.
Remove specific Plugin from the Plugin List inside of the Wordpress Dashboard
<?php
/* Remove specific plugin from the Plugin List
* update plugin-directory/plugin-file.php whatever plugin
*/
add_action('pre_current_active_plugins', 'rdm_hide_plugin');
function rdm_hide_plugin() {
global $wp_list_table;
$hidearr = array('plugin-directory/plugin-file.php');
$myplugins = $wp_list_table->items;
foreach ($myplugins as $key => $val) {
if (in_array($key,$hidearr)) {
unset($wp_list_table->items[$key]);
}
}
}
?>
@HunterLou

Copy link
Copy Markdown

it's great!but can the number of the plugins be changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment