Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove menu
#1
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


Attached Files
.zip   da.zip (Size: 350 bytes / Downloads: 0)
Gabriel
Technical Analyst I
WHMCS Services


Forum Jump:


Users browsing this thread: 1 Guest(s)