$menuElement) {
$i++;
if (!empty($menuElement['skipTopMenu'])) {
continue;
}
if (!empty($menuElement['type']) === 'single' && $menuElement['type'] === 'single') {
$navdata .= sprintf(
'
%s',
empty($menuElement['class']) ? '' : h($menuElement['class']),
empty($menuElement['url']) ? '' : h($menuElement['url']),
empty($name) ? '' : h($name)
);
} else if (empty($menuElement['type']) || $menuElement['type'] === 'group') {
$navdataElements = '';
$first = true;
foreach ($menuElement as $subCategory => $subCategoryData) {
if (!empty($subCategoryData['skipTopMenu'])) {
continue;
}
if (!$first) {
$navdataElements .= '';
}
$first = false;
foreach ($subCategoryData['children'] as $child) {
if (!empty($child['skipTopMenu'])) {
continue;
}
$navdataElements .= sprintf(
'%s',
empty($child['class']) ? '' : h($child['class']),
empty($child['url']) ? '' : h($child['url']),
empty($child['label']) ? '' : h($child['label'])
);
}
}
$navdata .= sprintf(
'%s%s',
sprintf(
'%s',
'dropdown-label-' . h($i),
h($name)
),
sprintf(
'',
$navdataElements
)
);
}
}
$logoutButton = sprintf(
'%s',
__('Logout')
);
$navdata = sprintf(
'',
$navdata,
$logoutButton
);
$homeButton = sprintf(
'%s',
empty($data['home']['class']) ? '' : h($data['home']['class']),
empty($data['home']['url']) ? '' : h($data['home']['url']),
empty($data['home']['text']) ? '' : h($data['home']['text'])
);
echo sprintf(
'',
$homeButton,
'',
$navdata
);