Guest User

Untitled

a guest
Apr 13th, 2020
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.26 KB | None | 0 0
  1. <?php
  2.  
  3. // Mobile Theme logo + retina logo
  4. $td_header_logo_mob = td_util::get_option('tds_logo_menu_upload_mob');
  5. $td_header_logoR_mob = td_util::get_option('tds_logo_menu_upload_r_mob');
  6.  
  7. // read the mobile logo + retina logo
  8. $td_mobile_customLogo = td_util::get_option('tds_logo_menu_upload');
  9. $td_mobile_customLogoR = td_util::get_option('tds_logo_menu_upload_r');
  10.  
  11. // read the header logo + retina logo
  12. $td_header_logo = td_util::get_option('tds_logo_upload');
  13. $td_header_logoR = td_util::get_option('tds_logo_upload_r');
  14.  
  15. // read the header text logo + tagline
  16. $td_logo_text = stripslashes(td_util::get_option('tds_logo_text'));
  17. $td_tagline_text = stripslashes(td_util::get_option('tds_tagline_text'));
  18.  
  19. // Mobile Theme text logo + tagline
  20. //$td_logo_text_mob = stripslashes(td_util::get_option('tds_logo_text_mob'));
  21. //$td_tagline_text_mob = stripslashes(td_util::get_option('tds_tagline_text_mob'));
  22.  
  23. $td_logo_alt = td_util::get_option('tds_logo_alt');
  24. $td_logo_title = td_util::get_option('tds_logo_title');
  25.  
  26. // Mobile Theme alt & title
  27. $td_logo_alt_mob = td_util::get_option('tds_logo_alt_mob');
  28. $td_logo_title_mob = td_util::get_option('tds_logo_title_mob');
  29.  
  30. // specific Mobile Theme options
  31. if(!empty($td_header_logo_mob)) {
  32. $td_mobile_customLogo = $td_header_logo_mob;
  33. }
  34. if(!empty($td_header_logoR_mob)) {
  35. $td_mobile_customLogoR = $td_header_logoR_mob;
  36. }
  37. //if(!empty($td_logo_text_mob)) {
  38. // $td_logo_text = $td_logo_text_mob;
  39. //}
  40. //if(!empty($td_tagline_text_mob)) {
  41. // $td_tagline_text = $td_tagline_text_mob;
  42. //}
  43. if (!empty($td_logo_alt_mob)) {
  44. $td_logo_alt = $td_logo_alt_mob;
  45. }
  46. if (!empty($td_logo_title_mob)) {
  47. $td_logo_title = ' title="' . $td_logo_title_mob . '"';
  48. } elseif (!empty($td_logo_title)) {
  49. $td_logo_title = ' title="' . $td_logo_title . '"';
  50. }
  51.  
  52.  
  53. if (!empty($td_mobile_customLogo)) {
  54.  
  55. // mobile logo here
  56. if (!empty($td_mobile_customLogoR)) {
  57. //if retina
  58. ?>
  59.  
  60. <a class="td-mobile-logo" href="<?php echo esc_url(home_url('/')); ?>">
  61. <img class="td-retina-data"
  62. data-retina="<?php echo esc_attr($td_mobile_customLogoR) ?>"
  63. src="<?php echo $td_mobile_customLogo ?>"
  64. alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/>
  65. </a>
  66. <?php
  67. } else {
  68. //not retina
  69. if (!empty($td_mobile_customLogo)) {
  70. ?>
  71. <a class="td-mobile-logo" href="<?php echo esc_url(home_url('/')); ?>">
  72. <img src="<?php echo $td_mobile_customLogo ?>" alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/>
  73. </a>
  74. <?php
  75. }
  76. }
  77.  
  78. } else {
  79.  
  80. // header logo here
  81. if (!empty($td_header_logoR)) {
  82. //if retina
  83. ?>
  84.  
  85. <a class="td-header-logo" href="<?php echo esc_url(home_url('/')); ?>">
  86. <img class="td-retina-data"
  87. data-retina="<?php echo esc_attr($td_header_logoR) ?>"
  88. src="<?php echo $td_header_logo ?>"
  89. alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/>
  90. </a>
  91. <?php
  92. } else {
  93. //not retina
  94. if (!empty($td_header_logo)) {
  95. ?>
  96. <a class="td-header-logo" href="<?php echo esc_url(home_url('/')); ?>">
  97. <img src="<?php echo $td_header_logo ?>" alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/>
  98. </a>
  99. <?php
  100. } else {
  101.  
  102. if (is_home() || is_front_page()) {
  103. ?>
  104. <div class="td-logo-text-wrap">
  105. <h1 class="td-logo-text-container">
  106. <a class="td-logo-wrap" href="<?php echo esc_url(home_url('/')); ?>">
  107. <span class="td-logo-text"><?php if (!$td_logo_text) {
  108. echo TD_THEME_NAME;
  109. } else {
  110. echo $td_logo_text;
  111. } ?></span>
  112. <span class="td-tagline-text"><?php if (!$td_tagline_text) {
  113. echo "DISCOVER THE ART OF PUBLISHING";
  114. } else {
  115. echo $td_tagline_text;
  116. } ?></span>
  117. </a>
  118. </h1>
  119. </div>
  120. <?php
  121. }else{
  122. ?>
  123. <div class="td-logo-text-wrap">
  124. <span class="td-logo-text-container">
  125. <a class="td-logo-wrap" href="<?php echo esc_url(home_url('/')); ?>">
  126. <span class="td-logo-text"><?php if (!$td_logo_text) {
  127. echo TD_THEME_NAME;
  128. } else {
  129. echo $td_logo_text;
  130. } ?></span>
  131. <span class="td-tagline-text"><?php if (!$td_tagline_text) {
  132. echo "DISCOVER THE ART OF PUBLISHING";
  133. } else {
  134. echo $td_tagline_text;
  135. } ?></span>
  136. </a>
  137. </span>
  138. </div>
  139. <?php
  140. }
  141. }
  142. }
  143. }
Advertisement
Add Comment
Please, Sign In to add comment