April 17, 2014

How to hide WordPress plugins from list?

How to hide WordPress plugins from list?

Objective: We have to hide this plugin from activated plugins list.
e.g. Plugin Name: marketpress

function wdwd_plugins_filter() {
global $wp_list_table;
$hidearr = array('marketpress/marketpress.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', 'wdwd_plugins_filter' );

Last updated: April 17, 2014