08-26-2022, 01:46 PM
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
<?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