'',
'mobile-toggle-type-1' => '',
'mobile-toggle-type-2' => '',
'mobile-toggle-type-3' => '',
];
}
}
if (! function_exists('blocksy_main_menu_fallback')) {
function blocksy_main_menu_fallback($args) {
extract($args);
$list_pages_args = [
'sort_column' => 'menu_order, post_title',
'menu_id' => 'primary-menu',
'menu_class' => 'primary-menu menu',
'container' => 'ul',
'echo' => false,
'link_before' => '',
'link_after' => '',
'before' => '
',
'item_spacing' => 'discard',
'walker' => new Blocksy_Walker_Page(),
'title_li' => ''
];
if (isset($args['blocksy_mega_menu'])) {
$list_pages_args['blocksy_mega_menu'] = $args['blocksy_mega_menu'];
}
if (isset($args['blocksy_advanced_item'])) {
$list_pages_args['blocksy_advanced_item'] = $args['blocksy_advanced_item'];
}
if (isset($args['skip_ghost'])) {
$list_pages_args['skip_ghost'] = $args['skip_ghost'];
}
$menu = wp_list_pages($list_pages_args);
if (! isset($child_indicator_type)) {
$child_indicator_type = 'default';
}
$svg = '';
$before_link = '';
$link_button = '';
if ($child_indicator_type !== 'skip') {
if (
! (
isset($args['child_indicator_wrapper'])
&&
$args['child_indicator_wrapper']
)
) {
$svg = blocksy_html_tag(
'span',
[
'class' => 'ct-toggle-dropdown-desktop',
'role' => 'button'
],
blocksy_menu_get_child_svgs()[$child_indicator_type]
);
if (! isset($args['skip_ghost'])) {
$link_button = blocksy_html_tag(
'button',
[
'class' => 'ct-toggle-dropdown-desktop-ghost',
'aria-label' => __('Expand dropdown menu', 'blocksy'),
'aria-haspopup' => 'true',
'aria-expanded' => 'false',
'role' => 'menuitem'
],
''
);
}
} else {
$link_button = blocksy_html_tag(
'button',
[
'class' => 'ct-toggle-dropdown-mobile',
'aria-label' => __('Expand dropdown menu', 'blocksy'),
'aria-haspopup' => 'true',
'aria-expanded' => 'false'
],
blocksy_menu_get_child_svgs()['mobile-toggle-' . $child_indicator_type]
) . '';
$before_link = '