Guest User

Untitled

a guest
Oct 7th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.78 KB | None | 0 0
  1. <?php
  2.  
  3. /* ----------------------------------------------------------------------------
  4. The main menu of the theme - the mobile menu is not here, it is in mobile-menu.php
  5. */
  6.  
  7. ?>
  8. <!-- header menu -->
  9.  
  10. <div class="td-menu-placeholder">
  11.  
  12. <div class="td-menu-background">
  13. <div class="container td-menu-wrap">
  14.  
  15.  
  16.  
  17. <div class="row-fluid td-menu-header">
  18.  
  19. <div class="span12">
  20. <?php
  21. $tds_header_style = td_util::get_option('tds_header_style');
  22. if ($tds_header_style != '3' && $tds_header_style != '6') { //do not show small logo on full width pages
  23. ?>
  24. <div class="mobile-logo-wrap">
  25. <?php
  26. //read the logo + retina logo
  27. $td_customLogo = td_util::get_option('tds_logo_upload');
  28. $td_customLogoR = td_util::get_option('tds_logo_upload_r');
  29.  
  30. $td_logo_text = td_util::get_option('tds_logo_text');
  31. $td_tagline_text = td_util::get_option('tds_tagline_text');
  32.  
  33. $td_logo_alt = td_util::get_option('tds_logo_alt');
  34. $td_logo_title = td_util::get_option('tds_logo_title');
  35.  
  36. if (!empty($td_logo_title)) {
  37. $td_logo_title = ' title="' . $td_logo_title . '"';
  38. }
  39.  
  40. if (td_util::get_option('tds_logo_menu_upload') == '') {
  41. if (!empty($td_customLogoR)) {
  42. //if retina
  43. ?>
  44. <a itemprop="url" href="<?php echo home_url(); ?>">
  45. <img width="300" class="td-retina-data" data-retina="<?php echo htmlentities($td_customLogoR) ?>" src="<?php echo $td_customLogo?>" alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/>
  46. </a>
  47. <meta itemprop="name" content="<?php bloginfo('name')?>">
  48. <?php
  49. } else {
  50. //not retina
  51. if (!empty($td_customLogo)) {
  52. ?>
  53. <a itemprop="url" href="<?php echo home_url(); ?>"><img width="300" src="<?php echo $td_customLogo?>" alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/></a>
  54. <meta itemprop="name" content="<?php bloginfo('name')?>">
  55. <?php
  56. }
  57. }
  58. } else {
  59. locate_template('parts/logo-mobile.php', true, false);
  60. }
  61. ?>
  62. </div>
  63. <?php } ?>
  64.  
  65.  
  66. <div id="td-top-mobile-toggle">
  67. <ul class="sf-menu">
  68. <li>
  69. <a href="#">
  70. <span class="menu_icon td-sp td-sp-ico-menu"></span>
  71. </a>
  72. </li>
  73. </ul>
  74. </div>
  75.  
  76. <div id="td-top-menu" role="navigation" itemscope="itemscope" itemtype="<?php echo td_global::$http_or_https?>://schema.org/SiteNavigationElement">
  77.  
  78. <?php
  79.  
  80. wp_nav_menu(array(
  81. 'theme_location' => 'header-menu',
  82. 'menu_class'=> 'sf-menu',
  83. 'fallback_cb' => 'td_wp_page_menu',
  84. 'walker' => new td_tagdiv_walker_nav_menu()
  85. ));
  86.  
  87. //if no menu
  88. function td_wp_page_menu() {
  89. //this is the default menu
  90. echo '<ul class="sf-menu">';
  91. echo '<li class="menu-item-first"><a href="' . home_url() . '/wp-admin/nav-menus.php?action=locations">Click here - to select or create a menu</a></li>';
  92. echo '</ul>';
  93. }
  94.  
  95.  
  96.  
  97.  
  98. ?>
  99. </div>
  100.  
  101.  
  102.  
  103. </div>
  104.  
  105.  
  106.  
  107.  
  108. </div> <!-- /.row-fluid -->
  109. </div> <!-- /.td-menu-wrap -->
  110. </div> <!-- /.td-menu-background -->
  111. </div> <!-- /.td-menu-placeholder -->
Advertisement
Add Comment
Please, Sign In to add comment