How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Support adding JavaScript code to Client Area Menus



It is requested to edit the Interacting with menus to support adding JavaScript code.

https://docs.whmcs.com/Editing_Client_Area_Menus#Hooks

example:

use WHMCS\View\Menu\Item as MenuItem;

# 添加侧栏文档:https://docs.whmcs.com/Client_Area_Sidebars_Cheatsheet#Adding_an_Additional_Sidebar_Menu_Item
add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar)
{
if (!is_null($primarySidebar->getChild('My Domains Status Filter'))) {
$primarySidebar->getChild('My Domains Status Filter')
->addChild('Other Status')
->setLabel('Other Status')
->setUri("javascript:clickLeft('otherstatus')")
->setIcon('fa-globe')
->setOrder(50);
}
});

Post the first comment

Login to post a comment.