Is it possible to get activate plugin list in wordpress and remove it from admin menu bar ?. i want to remove all activate plugin links from adminu bar .
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Findout the page and replace your_plugin_page
.
<?php
function remove_menus(){
remove_menu_page( 'your_plugin_page.php' ); //probably where the plugin settings are available
}
add_action( 'admin_menu', 'remove_menus' );
?>
This will list out all activated plugins:-
$apl=get_option('active_plugins');
$plugins=get_plugins();
$activated_plugins=array();
foreach ($apl as $p){
if(isset($plugins[$p])){
array_push($activated_plugins, $plugins[$p]);
}
}
now you need to get all the pages .Not a perfect solution , but I hope it will be helpful.