portage/functions/mobile-menus.php

27 lines
904 B
PHP
Raw Normal View History

2021-08-01 17:32:46 +00:00
<?php
2021-08-01 17:45:36 +00:00
function portage_mobile_menus(){
2021-08-01 17:32:46 +00:00
echo '
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#aboveheadermenu").menumaker({
2021-08-01 17:45:36 +00:00
title: "' . get_theme_mod( 'portage_top_menu_name' ) . '",
breakpoint: ' . get_theme_mod( 'portage_top_menu_breakpoint' ) . ',
format: "' . get_theme_mod( 'portage_top_menu_type' ) . '"
2021-08-01 17:32:46 +00:00
});
jQuery("#belowheadermenu").menumaker({
2021-08-01 17:45:36 +00:00
title: "' . get_theme_mod( 'portage_main_menu_name' ) . '",
breakpoint: ' . get_theme_mod( 'portage_main_menu_breakpoint' ) . ',
format: "' . get_theme_mod( 'portage_main_menu_type' ) . '"
2021-08-01 17:32:46 +00:00
});
jQuery("#footermenu").menumaker({
2021-08-01 17:45:36 +00:00
title: "' . get_theme_mod( 'portage_footer_menu_name' ) . '",
breakpoint: ' . get_theme_mod( 'portage_footer_menu_breakpoint' ) . ',
format: "' . get_theme_mod( 'portage_footer_menu_type' ) . '"
2021-08-01 17:32:46 +00:00
});
});
</script>
';
}
2021-08-01 17:45:36 +00:00
add_action( 'wp_footer', 'portage_mobile_menus' );