Guest User

menu-mobile.php

a guest
Mar 21st, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. <div class="td-menu-background"></div>
  2. <div id="td-mobile-nav">
  3. <div class="td-mobile-container">
  4. <!-- mobile menu top section -->
  5. <div class="td-menu-socials-wrap">
  6. <!-- socials -->
  7. <div class="td-menu-socials">
  8. <?php
  9. //get the socials that are set by user
  10. $td_get_social_network = td_util::get_option('td_social_networks');
  11.  
  12. if(!empty($td_get_social_network)) {
  13. foreach($td_get_social_network as $social_id => $social_link) {
  14. if(!empty($social_link)) {
  15. echo td_social_icons::get_icon($social_link, $social_id, true);
  16. }
  17. }
  18. }
  19. ?>
  20. </div>
  21. <!-- close button -->
  22. <div class="td-mobile-close">
  23. <a href="#"><i class="td-icon-close-mobile"></i></a>
  24. </div>
  25. </div>
  26.  
  27. <!-- login section -->
  28. <?php if (td_util::get_option('tds_login_sign_in_widget') == 'show') { ?>
  29. <div class="td-menu-login-section">
  30. <?php
  31. if ( is_user_logged_in() ) {
  32. locate_template('parts/logged.php', true);
  33. } else {
  34. locate_template('parts/login.php', true);
  35. }
  36. ?>
  37. </div>
  38. <?php } ?>
  39.  
  40. <!-- menu section -->
  41. <div class="td-mobile-content">
  42. <?php
  43. wp_nav_menu(array(
  44. 'theme_location' => 'custom-menu',
  45. 'menu_class'=> 'td-mobile-main-menu',
  46. 'fallback_cb' => 'td_wp_no_mobile_menu',
  47. 'link_after' => '<i class="td-icon-menu-right td-element-after"></i>',
  48. 'walker' => new td_walker_mobile_menu()
  49. ));
  50.  
  51. //if no menu
  52. function td_wp_no_mobile_menu() {
  53. //this is the default menu
  54. echo '<ul class="">';
  55. echo '<li class="menu-item-first"><a href="' . esc_url(home_url( '/' )) . 'wp-admin/nav-menus.php">Click here - to use the wp menu builder</a></li>';
  56. echo '</ul>';
  57. }
  58.  
  59. ?>
  60. </div>
  61. </div>
  62.  
  63. <!-- register/login section -->
  64. <?php if (td_util::get_option('tds_login_sign_in_widget') == 'show') { ?>
  65. <div id="login-form-mobile" class="td-register-section">
  66. <?php locate_template('parts/register.php', true); ?>
  67. </div>
  68. <?php } ?>
  69. </div>
Advertisement
Add Comment
Please, Sign In to add comment