Updated to some extend for adminbar menu of AF
Conditional applied to fetch theme name from header