Guest User

Untitled

a guest
Nov 12th, 2015
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. <?php
  2. //@todo verifica daca ai ad daca nu pune clasa
  3.  
  4. $td_ad_array = td_util::get_option('td_ads');
  5. $td_no_ad_class = '';
  6.  
  7. if(!empty($td_ad_array['header'])) {
  8. if (empty($td_ad_array['header']['ad_code'])) {
  9. $td_no_ad_class = ' td-ad';
  10. } else {
  11.  
  12. if (empty($td_ad_array['header']['disable_m'])) {
  13. $td_no_ad_class .= ' td-ad-m';
  14. }
  15.  
  16.  
  17. if (empty($td_ad_array['header']['disable_tp'])) {
  18. $td_no_ad_class .= ' td-ad-tp';
  19. }
  20.  
  21. if (empty($td_ad_array['header']['disable_p'])) {
  22. $td_no_ad_class .= ' td-ad-p';
  23. }
  24. }
  25. }
  26. ?>
  27.  
  28. <div class="td-header-ad-wrap <?php echo $td_no_ad_class;?>">
  29. <?php
  30.  
  31. // show the header ad spot
  32. //echo td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'header'));
  33.  
  34. if(is_front_page()) {
  35. echo do_shortcode('[td_block_ad_box spot_id="custom_ad_4"]');
  36. } else{
  37. echo td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'header'));
  38. }
  39. ?>
  40.  
  41.  
  42. </div>
Advertisement
Add Comment
Please, Sign In to add comment