Advertisement
Guest User

Untitled

a guest
Jun 29th, 2021
34
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (!function_exists('appointment_services')) :
  2.  
  3. function appointment_services() {
  4. $theme = wp_get_theme();
  5. $appointment_options = appointment_theme_setup_data();
  6. $service_setting = wp_parse_args(get_option('appointment_options', array()), $appointment_options);
  7.  
  8. if($theme->name =='Appointment Red'){
  9. $appointment_child_default_data=appointment_red_default_data();
  10. $service_child_setting = wp_parse_args(get_option('appointment_options', array()), $appointment_child_default_data);
  11. }
  12. elseif($theme->name =='Shk Corporate'){
  13. $appointment_child_default_data=shk_corporate_default_data();
  14. $service_child_setting = wp_parse_args(get_option('appointment_options', array()), $appointment_child_default_data);
  15. }
  16. elseif($theme->name =='Appointment Green'){
  17. $appointment_child_default_data=appointment_green_default_data();
  18. $service_child_setting = wp_parse_args(get_option('appointment_options', array()), $appointment_child_default_data);
  19. }
  20. elseif($theme->name =='Appointment Blue'){
  21. $appointment_child_default_data=appointment_blue_default_data();
  22. $service_child_setting = wp_parse_args(get_option('appointment_options', array()), $appointment_child_default_data);
  23. }
  24. //print_r($service_child_setting);
  25. if ($service_setting['service_section_enabled'] == 0) {
  26. if($theme->name == 'Appointment'){ $servicestyle='Service-section';}
  27. else if($theme->name =='Shk Corporate' && $service_child_setting['service_blink_layout_setting']=='blink' ){ $servicestyle='service-section1';}
  28. else if($theme->name =='Appointment Blue' && $service_child_setting['service_slide_layout_setting']=='slide'){ $servicestyle='service-section2';}
  29. else if($theme->name =='Appointment Red' && $service_child_setting['service_layout_setting']=='box' ){ $servicestyle='service-section3';}
  30. else if($theme->name =='Appointment Green' && $service_child_setting['service_rotate_layout_section']=='rotate'){ $servicestyle='Service-section service6';}
  31. else if($theme->name =='Appointment Dark'){ $servicestyle='service-section2';}
  32. else if($theme->name =='Appointee'){ $servicestyle='Service-section service7';}
  33. else{
  34. $servicestyle='Service-section';
  35. }
  36. ?>
  37. <div class="<?php echo $servicestyle; ?>">
  38. <div class="container">
  39.  
  40. <div class="row">
  41. <div class="col-md-12">
  42.  
  43. <div class="section-heading-title">
  44. <h1> <?php echo wp_kses_post($service_setting['service_title']); ?></h1>
  45. <p><?php echo wp_kses_post($service_setting['service_description']); ?> </p>
  46. </div>
  47. </div>
  48. </div>
  49.  
  50. <div class="row">
  51. <?php if($service_setting['service_one_icon'] || $service_setting['service_one_title'] || $service_setting['service_one_description']){ ?>
  52. <div class="col-md-3">
  53. <div class="service-area">
  54. <div class="media">
  55. <?php if($service_setting['service_one_icon']):?>
  56. <div class="service-icon">
  57. <i class="fa <?php echo esc_attr($service_setting['service_one_icon']); ?>"></i>
  58. </div>
  59. <?php endif;
  60. if($service_setting['service_one_title'] || $service_setting['service_one_description']):?>
  61. <div class="media-body">
  62. <h3><?php echo wp_kses_post($service_setting['service_one_title']); ?></h3>
  63. <p><?php echo wp_kses_post($service_setting['service_one_description']); ?></p>
  64. </div>
  65. <?php endif;?>
  66. </div>
  67. </div>
  68. </div>
  69. <?php }
  70. if($service_setting['service_two_icon'] || $service_setting['service_two_title'] || $service_setting['service_two_description']){?>
  71. <div class="col-md-3">
  72. <div class="service-area">
  73. <div class="media">
  74. <?php if($service_setting['service_two_icon']):?>
  75. <div class="service-icon">
  76. <i class="fa <?php echo esc_attr($service_setting['service_two_icon']); ?>"></i>
  77. </div>
  78. <?php endif;
  79. if($service_setting['service_two_title'] || $service_setting['service_two_description']):?>
  80. <div class="media-body">
  81. <h3><?php echo wp_kses_post($service_setting['service_two_title']); ?></h3>
  82. <p><?php echo wp_kses_post($service_setting['service_two_description']); ?></p>
  83. </div>
  84. <?php endif;?>
  85. </div>
  86. </div>
  87. </div>
  88. <?php }
  89. if($service_setting['service_three_icon'] || $service_setting['service_three_title'] || $service_setting['service_three_description']){?>
  90. <div class="col-md-3">
  91. <div class="service-area">
  92. <div class="media">
  93. <?php if($service_setting['service_three_icon']):?>
  94. <div class="service-icon">
  95. <i class="fa <?php echo esc_attr($service_setting['service_three_icon']); ?>"></i>
  96. </div>
  97. <?php endif;
  98. if($service_setting['service_three_title'] || $service_setting['service_three_description']):?>
  99. <div class="media-body">
  100. <h3><?php echo wp_kses_post($service_setting['service_three_title']); ?></h3>
  101. <p><?php echo wp_kses_post($service_setting['service_three_description']); ?></p>
  102. </div>
  103. <?php endif;?>
  104. </div>
  105. </div>
  106. </div>
  107. <?php }
  108. if($service_setting['service_four_icon'] || $service_setting['service_four_title'] || $service_setting['service_four_description']){?>
  109. <div class="col-md-3">
  110. <div class="service-area">
  111. <div class="media">
  112. <?php if($service_setting['service_four_icon']):?>
  113. <div class="service-icon">
  114. <i class="fa <?php echo esc_attr($service_setting['service_four_icon']); ?>"></i>
  115. </div>
  116. <?php endif;
  117. if($service_setting['service_four_title'] || $service_setting['service_four_description']):?>
  118. <div class="media-body">
  119. <h3><?php echo wp_kses_post($service_setting['service_four_title']); ?></h3>
  120. <p><?php echo wp_kses_post($service_setting['service_four_description']); ?></p>
  121. </div>
  122. <?php endif;?>
  123. </div>
  124. </div>
  125. </div>
  126. <?php }
  127. if($service_setting['service_five_icon'] || $service_setting['service_five_title'] || $service_setting['service_five_description']){?>
  128. <div class="col-md-3">
  129. <div class="service-area">
  130. <div class="media">
  131. <?php if($service_setting['service_five_icon']):?>
  132. <div class="service-icon">
  133. <i class="fa <?php echo esc_attr($service_setting['service_five_icon']); ?>"></i>
  134. </div>
  135. <?php endif;
  136. if($service_setting['service_five_title'] || $service_setting['service_five_description']):?>
  137. <div class="media-body">
  138. <h3><?php echo wp_kses_post($service_setting['service_five_title']); ?></h3>
  139. <p><?php echo wp_kses_post($service_setting['service_five_description']); ?></p>
  140. </div>
  141. <?php endif;?>
  142. </div>
  143. </div>
  144. </div>
  145. <?php }
  146. if($service_setting['service_six_icon'] || $service_setting['service_six_title'] || $service_setting['service_six_description']){?>
  147. <div class="col-md-3">
  148. <div class="service-area">
  149. <div class="media">
  150. <?php if($service_setting['service_six_icon']):?>
  151. <div class="service-icon">
  152. <i class="fa <?php echo esc_attr($service_setting['service_six_icon']); ?>"></i>
  153. </div>
  154. <?php endif;
  155. if($service_setting['service_six_title'] || $service_setting['service_six_description']):?>
  156. <div class="media-body">
  157. <h3><?php echo wp_kses_post($service_setting['service_six_title']); ?></h3>
  158. <p><?php echo wp_kses_post($service_setting['service_six_description']); ?></p>
  159. </div>
  160. <?php endif;?>
  161. </div>
  162. </div>
  163. </div>
  164. <?php } ?>
  165. <div class="clearfix"></div>
  166. </div>
  167. </div>
  168. </div>
  169. <!-- /HomePage Service Section -->
  170. <?php
  171. }
  172. }
  173.  
  174. endif;
  175.  
  176. if (function_exists('appointment_services')) {
  177. $section_priority = apply_filters('appointment_section_priority', 12, 'appointment_services');
  178. add_action('appointment_sections', 'appointment_services', absint($section_priority));
  179. }
Advertisement
RAW Paste Data Copied
Advertisement