参考:https://cloud.tencent.com/developer/ask/124979
意图:从客户区域删除主菜单,
方法:请将此代码添加到下面的php文件中:WHMCS_dir/include/hooks(例如nmenu.php)
add_hook('ClientAreaNavbars', 1, function () { // Get the current navigation bars. $primaryNavbar = Menu::primaryNavbar(); $secondaryNavbar = Menu::secondaryNavbar(); $children = $primaryNavbar->getChildren(); if (!is_null($children)) { foreach ($children as $child) { $primaryNavbar->removeChild($child); } } $children = $secondaryNavbar->getChildren(); if (!is_null($children)) { foreach ($children as $child) { $secondaryNavbar->removeChild($child); } } });
【参考】
参考:https://cloud.tencent.com/developer/ask/175321
你需要使用ClientAreaRegister挂钩,它为你提供新创建的客户端的ID。 https://developers.whmcs.com/hooks-reference/client-area-interface/#clientarearegister
如果你需要有关如何实际使用的信息,则必须查看挂钩上的WHMCS文档https://developers.whmcs.com/hooks/