Advertisement
Guest User

Untitled

a guest
Aug 1st, 2020
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.20 KB | None | 0 0
  1. <?php
  2. /* Shortcode for frontpage section
  3. Pricing section: [innofit_price]
  4. */
  5.  
  6. function innofit_pricing_shortcode() {
  7.  
  8.  
  9.  
  10. /* Function for pricing section*/
  11.  
  12. $pricing_options = get_theme_mod('innofit_pricing_content');
  13. $pricing_section_enable = get_theme_mod('pricing_section_enable','on');
  14. $home_pricing_section_title = get_theme_mod('home_pricing_section_title',__('Affordable pricing','innofit-plus'));
  15. $home_pricing_section_discription = get_theme_mod('home_pricing_section_discription',__('Great price plans for you','innofit-plus'));
  16. ob_start();
  17. ?>
  18. <!--Pricing Table & Call to Action Section-->
  19. <section class="combined-wrapper">
  20.  
  21. <!--Pricing-->
  22. <section class="pricing" id="pricing">
  23.  
  24. <?php if(($home_pricing_section_title) || ($home_pricing_section_discription)!='' ) { ?>
  25. <div class="row">
  26. <div class="col-md-12">
  27. <div class="section-header">
  28. <p class="section-subtitle"><?php echo $home_pricing_section_title;?></p>
  29. <h1 class="section-title"><?php echo $home_pricing_section_discription?></h1>
  30. </div>
  31. </div>
  32. </div>
  33. <?php } ?>
  34. <div class="row">
  35.  
  36. <?php
  37.  
  38. $pricing_options = json_decode($pricing_options);
  39. if( $pricing_options!='' )
  40. {
  41. foreach($pricing_options as $pricing_item){
  42.  
  43. $title = ! empty( $pricing_item->title ) ? apply_filters( 'innofit_translate_single_string', $pricing_item->title, 'Pricing section' ) : '';
  44. $price = ! empty( $pricing_item->price ) ? apply_filters( 'innofit_translate_single_string', $pricing_item->price, 'Pricing section' ) : '';
  45.  
  46. $features = ! empty( $pricing_item->features ) ? apply_filters( 'innofit_translate_single_string', $pricing_item->features, 'Team section' ) : '';
  47.  
  48. $price_button = ! empty( $pricing_item->button_text ) ? apply_filters( 'innofit_translate_single_string', $pricing_item->button_text, 'Team section' ) : '';
  49.  
  50. $price_btn_link = ! empty( $pricing_item->link ) ? apply_filters( 'innofit_translate_single_string', $pricing_item->link, 'Team section' ) : '';
  51.  
  52. $open_new_tab = $pricing_item->open_new_tab;
  53.  
  54. $price_heighlight = $pricing_item->price_heighlight;
  55. ?>
  56.  
  57.  
  58.  
  59.  
  60. <div class="col-md-4 col-sm-6 col-xs-12">
  61. <?php if($price_heighlight == 'customizer_repeater_price_heighlight'){?>
  62. <div class="pricing-style-1">
  63. <?php } else { ?>
  64. <div class="pricing-style-1 m-top-53">
  65. <?php } ?>
  66. <?php if($title!=''){?>
  67. <div class="pricing-title-bg <?php if($price_heighlight == 'customizer_repeater_price_heighlight'){ echo 'default'; }?>">
  68.  
  69. <h5 class="pricing-title <?php if($price_heighlight == 'customizer_repeater_price_heighlight'){ echo 'text-white'; }?> "><?php echo $title; ?></h5>
  70.  
  71. </div>
  72. <?php }?>
  73.  
  74. <div class="pricing-details">
  75. <div class="pricing-plans">
  76. <h1 class="price"><?php echo $price; ?></h1>
  77. </div>
  78. <?php echo $features; ?>
  79.  
  80. <?php if($price_button!='' ) { ?>
  81. <div class="ptop-15 pbottom-5 text-center">
  82. <a href="<?php echo $price_btn_link ;?>" <?php if($open_new_tab== 'yes' || $open_new_tab== '1') { echo "target='_blank'"; } ?> class="btn-ex-small btn-border <?php if($price_heighlight == 'customizer_repeater_price_heighlight') {echo 'btn-bg-default'; }?>">
  83. <?php echo $price_button ?>
  84. </a>
  85. </div>
  86. <?php } ?>
  87. </div>
  88. </div>
  89. </div>
  90. <?php } } else { ?>
  91.  
  92.  
  93. <div class="col-md-4 col-sm-6 col-xs-12">
  94. <div class="pricing-style-1 m-top-53">
  95. <div class="pricing-title-bg">
  96. <h5 class="pricing-title"><?php _e('Basic plan','innofit-plus'); ?></h5>
  97. </div>
  98. <div class="pricing-details">
  99. <div class="pricing-plans">
  100. <h1 class="price"><span class="currency"><?php echo '$'; ?></span><?php _e('25','innofit-plus'); ?><small>/ <?php _e('Mon','innofit-plus'); ?></small></h1>
  101. </div>
  102. <div class="price-list-item">
  103. <ul class="price-list-style">
  104. <li><?php _e('6GB Space','innofit-plus');?></li>
  105. <li><?php _e('Security and admin controls','innofit-plus');?></li>
  106. <li><?php _e('24/7 phone and email support','innofit-plus');?></li>
  107. </ul>
  108. </div>
  109. <div class="ptop-15 pbottom-5 text-center"><a href="#" class="btn-ex-small btn-border"><?php _e('Get Started','innofit-plus'); ?></a></div>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="col-md-4 col-sm-6 col-xs-12">
  114. <div class="pricing-style-1">
  115. <div class="pricing-title-bg default">
  116. <h5 class="pricing-title text-white"><?php _e('Standard plan','innofit-plus'); ?></h5>
  117. </div>
  118. <div class="pricing-details">
  119. <div class="pricing-plans">
  120. <h1 class="price"><span class="currency"><?php echo '$' ;?></span><?php _e('49','innofit-plus');?><small>/ <?php _e('Mon','innofit-plus');?></small></h1>
  121. </div>
  122. <div class="price-list-item">
  123. <ul class="price-list-style">
  124. <li> <?php _e('10GB Space','innofit-plus');?></li>
  125. <li><?php _e('Security and admin controls','innofit-plus');?></li>
  126. <li><?php _e('24/7 phone and email support','innofit-plus');?></li>
  127. <li><?php _e('Popular Choice','innofit-plus');?></li>
  128. </ul>
  129. </div>
  130. <div class="ptop-15 pbottom-5 text-center"><a href="#" class="btn-ex-small border btn-bg-default"><?php _e('Get Started','innofit-plus');?></a></div>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="col-md-4 col-sm-6 col-xs-12">
  135. <div class="pricing-style-1 m-top-53">
  136. <div class="pricing-title-bg">
  137. <h5 class="pricing-title"><?php _e('Professional plan','innofit-plus');?></h5>
  138. </div>
  139. <div class="pricing-details">
  140. <div class="pricing-plans">
  141. <h1 class="price"><span class="currency"><?php echo '$'; ?></span><?php _e('69','innofit-plus');?><small>/ <?php _e('Mon','innofit-plus');?></small></h1>
  142. </div>
  143. <div class="price-list-item">
  144. <ul class="price-list-style">
  145. <li><?php _e('Unlimited space','innofit-plus');?></li>
  146. <li><?php _e('Quality & Customer Experience','innofit-plus');?></li>
  147. <li><?php _e('Phone and email support','innofit-plus');?></li>
  148. </ul>
  149. </div>
  150. <div class="ptop-15 pbottom-5 text-center"><a href="#" class="btn-ex-small btn-border"><?php _e('Get Started','innofit-plus');?></a></div>
  151. </div>
  152. </div>
  153. </div>
  154. <?php } ?>
  155. </div>
  156.  
  157.  
  158. </section>
  159. <!--/Pricing-->
  160. <?php
  161. $cta_section_enable = get_theme_mod('cta_section_enable','on');
  162. $home_call_out_title = get_theme_mod('home_call_out_title', __('We create beautiful WordPress themes for you!','innofit-plus'));
  163. $home_call_out_desc = get_theme_mod('home_call_out_desc',__('Choose a package that suits all your needs to build a website.','innofit-plus'));
  164. $home_call_out_btn_text = get_theme_mod('home_call_out_btn_text',__('Buy Innofit','innofit-plus'));
  165. $callout_button_link = get_theme_mod('home_call_out_btn_link','#');
  166. $home_call_out_btn_link_target = get_theme_mod('home_call_out_btn_link_target',true);
  167. ?>
  168. <!--Call to Action-->
  169. <section class="call-to-action mtop-space-150 bg-default" id="call-to-action">
  170.  
  171. <div class="row">
  172. <div class="col-md-9 col-sm-9 col-xs-12">
  173. <div class="text-left">
  174. <h4 class="title text-white"><?php echo $home_call_out_title; ?></h4>
  175. <p class="text-white"><?php echo $home_call_out_desc;?></p>
  176. </div>
  177. </div>
  178. <div class="col-md-3 col-sm-3 col-xs-12">
  179. <div class="ptop-15 pbottom-5 text-right">
  180. <?php if($home_call_out_btn_text!='') {?>
  181. <a <?php if($callout_button_link !='' ) { ?> href="<?php echo $callout_button_link; ?>" class="btn-small btn-border btn-cta btn-shadow-lg" <?php if($home_call_out_btn_link_target== true) { echo "target='_blank'"; } } ?>><?php echo $home_call_out_btn_text; ?>
  182. </a>
  183. <?php } ?>
  184. </div>
  185. </div>
  186. </div>
  187.  
  188. </section>
  189. <!--/Call to Action-->
  190.  
  191. </section>
  192. <!--/End of Pricing Table & Call to Action Section-->
  193.  
  194.  
  195.  
  196. <?php
  197. return ob_get_clean();
  198. }
  199.  
  200. add_shortcode('innofit_price', 'innofit_pricing_shortcode');
  201. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement