Guest User

Untitled

a guest
Jan 21st, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 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. $allowed_tags = array('tag1','tag2','tag3','tag4');
  33. if (has_tag($allowed_tags)){
  34. $new_tag= true;
  35. }
  36.  
  37. if ($new_tag){
  38. echo td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'header'));
  39.  
  40. }
  41. ?>
  42.  
  43.  
  44. </div>
Advertisement
Add Comment
Please, Sign In to add comment