Last active
March 5, 2018 08:36
-
-
Save edheltzel/ca102077d39f42c84f16 to your computer and use it in GitHub Desktop.
Remove specific Plugin from the Plugin List inside of the Wordpress Dashboard
This file contains hidden or 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
| <?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]); | |
| } | |
| } | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it's great!but can the number of the plugins be changed?