evolve_content_boxes

Front Page Content Boxes.

Description

evolve_content_boxes(); 

Usage

  1. if ( !function_exists( 'evolve_content_boxes' ) ) { 
  2. require_once '/library/functions/basic-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = evolve_content_boxes(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/library/functions/basic-functions.php  
  1. function evolve_content_boxes() { 
  2.  
  3. $evolve_content_boxes = evolve_get_option('evl_content_boxes', '1'); 
  4. $evolve_content_box1_enable = evolve_get_option('evl_content_box1_enable', '1'); 
  5. if ($evolve_content_box1_enable === false) { 
  6. $evolve_content_box1_enable = ''; 
  7. $evolve_content_box2_enable = evolve_get_option('evl_content_box2_enable', '1'); 
  8. if ($evolve_content_box2_enable === false) { 
  9. $evolve_content_box2_enable = ''; 
  10. $evolve_content_box3_enable = evolve_get_option('evl_content_box3_enable', '1'); 
  11. if ($evolve_content_box3_enable === false) { 
  12. $evolve_content_box3_enable = ''; 
  13. $evolve_content_box4_enable = evolve_get_option('evl_content_box4_enable', '1'); 
  14. if ($evolve_content_box4_enable === false) { 
  15. $evolve_content_box4_enable = ''; 
  16. if ($evolve_content_boxes == "1") { 
  17.  
  18. echo "<div class='home-content-boxes'><div class='row'>"; 
  19.  
  20. $evolve_content_box1_title = evolve_get_option('evl_content_box1_title', 'Beautifully Simple'); 
  21. if ($evolve_content_box1_title === false) { 
  22. $evolve_content_box1_title = ''; 
  23. $evolve_content_box1_desc = evolve_get_option('evl_content_box1_desc', 'Clean modern theme with smooth and pixel perfect design focused on details'); 
  24. if ($evolve_content_box1_desc === false) { 
  25. $evolve_content_box1_desc = ''; 
  26. $evolve_content_box1_button = evolve_get_option('evl_content_box1_button', '<a class="read-more btn t4p-button" href="#">Learn more</a>'); 
  27. if ($evolve_content_box1_button === false) { 
  28. $evolve_content_box1_button = ''; 
  29. $evolve_content_box1_icon = evolve_get_option('evl_content_box1_icon', 'fa-cube'); 
  30. if ($evolve_content_box1_icon === false) { 
  31. $evolve_content_box1_icon = ''; 
  32.  
  33. /** 
  34. * Count how many boxes are enabled on frontpage 
  35. * Apply proper responsivity class 
  36. * @since 3.1.5 
  37. */ 
  38. $BoxCount = 0; // Box Counter 
  39.  
  40. if ($evolve_content_box1_enable == true) { 
  41. $BoxCount ++; 
  42. if ($evolve_content_box2_enable == true) { 
  43. $BoxCount ++; 
  44. if ($evolve_content_box3_enable == true) { 
  45. $BoxCount ++; 
  46. if ($evolve_content_box4_enable == true) { 
  47. $BoxCount ++; 
  48.  
  49. switch ($BoxCount): 
  50. case $BoxCount == 1: 
  51. $BoxClass = 'col-md-12'; 
  52. break; 
  53.  
  54. case $BoxCount == 2: 
  55. $BoxClass = 'col-md-6'; 
  56. break; 
  57.  
  58. case $BoxCount == 3: 
  59. $BoxClass = 'col-md-4'; 
  60. break; 
  61.  
  62. case $BoxCount == 4: 
  63. $BoxClass = 'col-md-3'; 
  64. break; 
  65.  
  66. default: 
  67. $BoxClass = 'col-md-3'; 
  68. endswitch; 
  69.  
  70. if ($evolve_content_box1_enable == true) { 
  71.  
  72. echo "<div class='col-sm-12 $BoxClass content-box content-box-1'>"; 
  73.  
  74. echo "<i class='fa " . $evolve_content_box1_icon . "'></i>"; 
  75.  
  76. echo "<h2>" . esc_attr($evolve_content_box1_title) . "</h2>"; 
  77.  
  78. echo "<p>" . do_shortcode($evolve_content_box1_desc) . "</p>"; 
  79.  
  80. echo "<div class='cntbox_btn sbtn1'>" . do_shortcode($evolve_content_box1_button) . "</div>"; 
  81.  
  82. echo "</div>"; 
  83.  
  84. $evolve_content_box2_title = evolve_get_option('evl_content_box2_title', 'Easy Customizable'); 
  85. if ($evolve_content_box2_title === false) { 
  86. $evolve_content_box2_title = ''; 
  87. $evolve_content_box2_desc = evolve_get_option('evl_content_box2_desc', 'Over a hundred theme options ready to make your website unique'); 
  88. if ($evolve_content_box2_desc === false) { 
  89. $evolve_content_box2_desc = ''; 
  90. $evolve_content_box2_button = evolve_get_option('evl_content_box2_button', '<a class="read-more btn t4p-button" href="#">Learn more</a>'); 
  91. if ($evolve_content_box2_button === false) { 
  92. $evolve_content_box2_button = ''; 
  93. $evolve_content_box2_icon = evolve_get_option('evl_content_box2_icon', 'fa-circle-o-notch'); 
  94. if ($evolve_content_box2_icon === false) { 
  95. $evolve_content_box2_icon = ''; 
  96.  
  97. if ($evolve_content_box2_enable == true) { 
  98.  
  99. echo "<div class='col-sm-12 $BoxClass content-box content-box-2'>"; 
  100.  
  101. echo "<i class='fa " . $evolve_content_box2_icon . "'></i>"; 
  102.  
  103. echo "<h2>" . esc_attr($evolve_content_box2_title) . "</h2>"; 
  104.  
  105. echo "<p>" . do_shortcode($evolve_content_box2_desc) . "</p>"; 
  106.  
  107. echo "<div class='cntbox_btn sbtn2'>" . do_shortcode($evolve_content_box2_button) . "</div>"; 
  108.  
  109. echo "</div>"; 
  110.  
  111.  
  112. $evolve_content_box3_title = evolve_get_option('evl_content_box3_title', 'Contact Form Ready'); 
  113. if ($evolve_content_box3_title === false) { 
  114. $evolve_content_box3_title = ''; 
  115. $evolve_content_box3_desc = evolve_get_option('evl_content_box3_desc', 'Built-In Contact Page with Google Maps is a standard for this theme'); 
  116. if ($evolve_content_box3_desc === false) { 
  117. $evolve_content_box3_desc = ''; 
  118. $evolve_content_box3_button = evolve_get_option('evl_content_box3_button', '<a class="read-more btn t4p-button" href="#">Learn more</a>'); 
  119. if ($evolve_content_box3_button === false) { 
  120. $evolve_content_box3_button = ''; 
  121. $evolve_content_box3_icon = evolve_get_option('evl_content_box3_icon', 'fa-send'); 
  122. if ($evolve_content_box3_icon === false) { 
  123. $evolve_content_box3_icon = ''; 
  124.  
  125. if ($evolve_content_box3_enable == true) { 
  126.  
  127. echo "<div class='col-sm-12 $BoxClass content-box content-box-3'>"; 
  128.  
  129. echo "<i class='fa " . $evolve_content_box3_icon . "'></i>"; 
  130.  
  131. echo "<h2>" . esc_attr($evolve_content_box3_title) . "</h2>"; 
  132.  
  133. echo "<p>" . do_shortcode($evolve_content_box3_desc) . "</p>"; 
  134.  
  135. echo "<div class='cntbox_btn sbtn3'>" . do_shortcode($evolve_content_box3_button) . "</div>"; 
  136.  
  137. echo "</div>"; 
  138.  
  139. $evolve_content_box4_title = evolve_get_option('evl_content_box4_title', 'Modern Blog Layouts'); 
  140. if ($evolve_content_box4_title === false) { 
  141. $evolve_content_box4_title = ''; 
  142. $evolve_content_box4_desc = evolve_get_option('evl_content_box4_desc', 'Up to 3 Blog Layouts, responsive on all media devices'); 
  143. if ($evolve_content_box4_desc === false) { 
  144. $evolve_content_box4_desc = ''; 
  145. $evolve_content_box4_button = evolve_get_option('evl_content_box4_button', '<a class="read-more btn t4p-button" href="#">Learn more</a>'); 
  146. if ($evolve_content_box4_button === false) { 
  147. $evolve_content_box4_button = ''; 
  148. $evolve_content_box4_icon = evolve_get_option('evl_content_box4_icon', 'fa-tablet'); 
  149. if ($evolve_content_box4_icon === false) { 
  150. $evolve_content_box4_icon = ''; 
  151.  
  152. if ($evolve_content_box4_enable == true) { 
  153.  
  154. echo "<div class='col-sm-12 $BoxClass content-box content-box-4'>"; 
  155.  
  156. echo "<i class='fa " . $evolve_content_box4_icon . "'></i>"; 
  157.  
  158. echo "<h2>" . esc_attr($evolve_content_box4_title) . "</h2>"; 
  159.  
  160. echo "<p>" . do_shortcode($evolve_content_box4_desc) . "</p>"; 
  161.  
  162. echo "<div class='cntbox_btn sbtn4'>" . do_shortcode($evolve_content_box4_button) . "</div>"; 
  163.  
  164. echo "</div>"; 
  165. echo "</div></div><div class='clearfix'></div>";