If you use the markCurrentItem: true
option, the script will automatically add the “current” class to the proper item so you won’t need to do it server-side with PHP:
http://www.smartmenus.org/docs/#markCurrentItem
As for the “has-submenu” class – it is automatically added to the parent items’ A elements when the script initializes the menu tree so you don’t have to worry about it.