Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.93 KB | None | 0 0
  1.         <?php
  2.  
  3.         if( have_rows('ts_pricing', 'options') ):
  4.  
  5.           $pricing = get_field('ts_pricing', 'options');
  6.           $currency = "GB";
  7.           $index = array_search($currency, array_column($pricing, 'currency'));
  8.           ?>
  9.  
  10.           <?php if(isset($index)): ?>
  11.             <div class="tabs-panel is-active" id="pricing-photo">
  12.                 <img src="<?php echo $pricing[$index]['photo_pricing']; ?>" />
  13.             </div>
  14.             <div class="tabs-panel" id="pricing-video">
  15.                 <img src="<?php echo $pricing[$index]['video_pricing']; ?>" class="tae"/>
  16.             </div>
  17.           <?php
  18.               else:
  19.                 $defaul_pricing = get_field('p_default_pricing', 'options');
  20.           ?>
  21.                   <div class="tabs-panel is-active" id="pricing-photo">
  22.                     <img src="<?php echo $defaul_pricing['photo_pricing']; ?>" />
  23.                   </div>
  24.                   <div class="tabs-panel" id="pricing-video">
  25.                     <img src="<?php echo $defaul_pricing['video_pricing']; ?>" />
  26.                   </div>
  27.           <?php endif;
  28.  
  29.           else :
  30.  
  31.           endif;
  32.           ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement