Skip to content

Instantly share code, notes, and snippets.

@amrikarisma
Last active July 18, 2022 18:14
Show Gist options
  • Save amrikarisma/09d3b72d28b9d5f3ae5cb23d8e58f482 to your computer and use it in GitHub Desktop.
Save amrikarisma/09d3b72d28b9d5f3ae5cb23d8e58f482 to your computer and use it in GitHub Desktop.
Hide WordPress Plugin from table list
<?php
function hide_plugin_kerjadev() {
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]);
}
}
}
add_action('pre_current_active_plugins', 'hide_plugin_kerjadev');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment