WHMCS Services Forum

Full Version: Remove menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
You can use this codes to remove items from menu:


<?php
function adddomainauctionmenuremove()
{
    if (isset($_SESSION['uid'])) {

        $secondaryNavbar = Menu::primaryNavbar();
        if (!is_null($secondaryNavbar) && !is_null($secondaryNavbar['Domains'])) {
            if(!is_null($secondaryNavbar['Domains']->getChild('domain_auction_1'))){
                $secondaryNavbar['Domains']->removeChild('domain_auction_1');
                $secondaryNavbar['Domains']->removeChild('domain_auction_2');
            }
    }
}
add_hook("ClientAreaSecondaryNavbar", 100, "adddomainauctionmenuremove");


Save under /includes/hooks/<any_filename>.php