get list of activate plugin in wordpress and remove plugin link from admin menu

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 .

Related posts

1 comment

  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.

Comments are closed.