| 1 |
<?php |
| 2 |
// Spiko default service data |
| 3 |
if (!function_exists('spiceb_spiko_service_default_customize_register')) : |
| 4 |
|
| 5 |
function spiceb_spiko_service_default_customize_register($wp_customize) { |
| 6 |
|
| 7 |
$spiko_service_content_control = $wp_customize->get_setting('spiko_service_content'); |
| 8 |
if (!empty($spiko_service_content_control)) { |
| 9 |
$spiko_service_content_control->default = json_encode(array( |
| 10 |
array( |
| 11 |
'icon_value' => 'fa-headphones', |
| 12 |
'title' => esc_html__('Suspendisse Tristique', 'spicebox'), |
| 13 |
'text' => esc_html__('Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.', 'spicebox'), |
| 14 |
'choice' => 'customizer_repeater_icon', |
| 15 |
'link' => '#', |
| 16 |
'open_new_tab' => 'no', |
| 17 |
'id' => 'customizer_repeater_56d7ea7f40b56', |
| 18 |
), |
| 19 |
array( |
| 20 |
'icon_value' => 'fa-mobile', |
| 21 |
'title' => esc_html__('Blandit-Gravida', 'spicebox'), |
| 22 |
'text' => esc_html__('Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.', 'spicebox'), |
| 23 |
'choice' => 'customizer_repeater_icon', |
| 24 |
'link' => '#', |
| 25 |
'open_new_tab' => 'no', |
| 26 |
'id' => 'customizer_repeater_56d7ea7f40b66', |
| 27 |
), |
| 28 |
array( |
| 29 |
'icon_value' => 'fa fa-cogs', |
| 30 |
'title' => esc_html__('Justo Bibendum', 'spicebox'), |
| 31 |
'text' => esc_html__('Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.', 'spicebox'), |
| 32 |
'choice' => 'customizer_repeater_icon', |
| 33 |
'link' => '#', |
| 34 |
'open_new_tab' => 'no', |
| 35 |
'id' => 'customizer_repeater_56d7ea7f40b86', |
| 36 |
), |
| 37 |
)); |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
add_action('customize_register', 'spiceb_spiko_service_default_customize_register'); |
| 42 |
|
| 43 |
endif; |
| 44 |
|
| 45 |
// Spiko default Testimonial data |
| 46 |
if (!function_exists('spiceb_spiko_testimonial_default_customize_register')) : |
| 47 |
|
| 48 |
function spiceb_spiko_testimonial_default_customize_register($wp_customize) { |
| 49 |
|
| 50 |
$spiko_service_content_control = $wp_customize->get_setting('spiko_testimonial_content'); |
| 51 |
if (!empty($spiko_service_content_control)) { |
| 52 |
$spiko_service_content_control->default = json_encode(array( |
| 53 |
array( |
| 54 |
'title' => 'Exellent Theme & Very Fast Support', |
| 55 |
'text' => 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem ipsum dolor sit amet,<br> temp consectetur adipisicing elit.', |
| 56 |
'clientname' => __('Amanda Smith', 'spicebox'), |
| 57 |
'designation' => __('Developer', 'spicebox'), |
| 58 |
'home_testimonial_star' => '4.5', |
| 59 |
'link' => '#', |
| 60 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/testimonial/user1.jpg', |
| 61 |
'open_new_tab' => 'no', |
| 62 |
'id' => 'customizer_repeater_77d7ea7f40b96', |
| 63 |
'home_slider_caption' => 'customizer_repeater_star_4.5', |
| 64 |
), |
| 65 |
array( |
| 66 |
'title' => 'Exellent Theme & Very Fast Support', |
| 67 |
'text' => 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem ipsum dolor sit amet,<br> temp consectetur adipisicing elit.', |
| 68 |
'clientname' => __('Travis Cullan', 'spicebox'), |
| 69 |
'designation' => __('Team Leader', 'spicebox'), |
| 70 |
'home_testimonial_star' => '5', |
| 71 |
'link' => '#', |
| 72 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/testimonial/user2.jpg', |
| 73 |
'open_new_tab' => 'no', |
| 74 |
'id' => 'customizer_repeater_88d7ea7f40b97', |
| 75 |
'home_slider_caption' => 'customizer_repeater_star_5', |
| 76 |
), |
| 77 |
array( |
| 78 |
'title' => 'Exellent Theme & Very Fast Support', |
| 79 |
'text' => 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem ipsum dolor sit amet,<br> temp consectetur adipisicing elit.', |
| 80 |
'clientname' => __('Victoria Wills', 'spicebox'), |
| 81 |
'designation' => __('Volunteer', 'spicebox'), |
| 82 |
'home_testimonial_star' => '3.5', |
| 83 |
'link' => '#', |
| 84 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/testimonial/user3.jpg', |
| 85 |
'id' => 'customizer_repeater_11d7ea7f40b98', |
| 86 |
'open_new_tab' => 'no', |
| 87 |
'home_slider_caption' => 'customizer_repeater_star_3.5', |
| 88 |
), |
| 89 |
)); |
| 90 |
} |
| 91 |
} |
| 92 |
|
| 93 |
add_action('customize_register', 'spiceb_spiko_testimonial_default_customize_register'); |
| 94 |
|
| 95 |
endif; |
| 96 |
|
| 97 |
// Spiko default Team data |
| 98 |
if (!function_exists('spiceb_spiko_team_default_customize_register')) : |
| 99 |
|
| 100 |
function spiceb_spiko_team_default_customize_register($wp_customize) { |
| 101 |
|
| 102 |
$spiko_team_content_control = $wp_customize->get_setting('spiko_team_content'); |
| 103 |
if (!empty($spiko_team_content_control)) { |
| 104 |
$spiko_team_content_control->default = json_encode(array( |
| 105 |
array( |
| 106 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/team1.jpg', |
| 107 |
'image_url2' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/item-bg1.jpg', |
| 108 |
'membername' => 'Danial Wilson', |
| 109 |
'designation' => esc_html__('Senior Manager', 'spicebox'), |
| 110 |
'text' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quae, dolores dicta. Blanditiis rem amet repellat, dolores nihil quae in mollitia asperiores ut rerum repellendus, voluptatum eum, officia laudantium quaerat?', |
| 111 |
'open_new_tab' => 'no', |
| 112 |
'id' => 'customizer_repeater_26d7ea7f40c56', |
| 113 |
'social_repeater' => json_encode( |
| 114 |
array( |
| 115 |
array( |
| 116 |
'id' => 'customizer-repeater-social-repeater-37fb908374e06', |
| 117 |
'link' => 'facebook.com', |
| 118 |
'icon' => 'fa-brands fa-facebook-f', |
| 119 |
), |
| 120 |
array( |
| 121 |
'id' => 'customizer-repeater-social-repeater-47fb9144530fc', |
| 122 |
'link' => 'twitter.com', |
| 123 |
'icon' => 'fa-brands fa-x-twitter', |
| 124 |
), |
| 125 |
array( |
| 126 |
'id' => 'customizer-repeater-social-repeater-57fb9750e1e09', |
| 127 |
'link' => 'linkedin.com', |
| 128 |
'icon' => 'fa-brands fa-linkedin', |
| 129 |
), |
| 130 |
array( |
| 131 |
'id' => 'customizer-repeater-social-repeater-67fb0150e1e256', |
| 132 |
'link' => 'behance.com', |
| 133 |
'icon' => 'fa-brands fa-behance', |
| 134 |
), |
| 135 |
) |
| 136 |
), |
| 137 |
), |
| 138 |
array( |
| 139 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/team2.jpg', |
| 140 |
'image_url2' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/item-bg2.jpg', |
| 141 |
'membername' => 'Amanda Smith', |
| 142 |
'designation' => esc_html__('Founder & CEO', 'spicebox'), |
| 143 |
'text' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quae, dolores dicta. Blanditiis rem amet repellat, dolores nihil quae in mollitia asperiores ut rerum repellendus, voluptatum eum, officia laudantium quaerat?', |
| 144 |
'open_new_tab' => 'no', |
| 145 |
'id' => 'customizer_repeater_56d1ea2f40c66', |
| 146 |
'social_repeater' => json_encode( |
| 147 |
array( |
| 148 |
array( |
| 149 |
'id' => 'customizer-repeater-social-repeater-57fb9133a7772', |
| 150 |
'link' => 'facebook.com', |
| 151 |
'icon' => 'fa-brands fa-facebook-f', |
| 152 |
), |
| 153 |
array( |
| 154 |
'id' => 'customizer-repeater-social-repeater-57fb9160rt683', |
| 155 |
'link' => 'twitter.com', |
| 156 |
'icon' => 'fa-brands fa-x-twitter', |
| 157 |
), |
| 158 |
array( |
| 159 |
'id' => 'customizer-repeater-social-repeater-57fb916zzooc9', |
| 160 |
'link' => 'linkedin.com', |
| 161 |
'icon' => 'fa-brands fa-linkedin', |
| 162 |
), |
| 163 |
array( |
| 164 |
'id' => 'customizer-repeater-social-repeater-57fb916qqwwc784', |
| 165 |
'link' => 'behance.com', |
| 166 |
'icon' => 'fa-brands fa-behance', |
| 167 |
), |
| 168 |
) |
| 169 |
), |
| 170 |
), |
| 171 |
array( |
| 172 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/team3.jpg', |
| 173 |
'image_url2' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/item-bg1.jpg', |
| 174 |
'membername' => 'Victoria Wills', |
| 175 |
'designation' => esc_html__('Web Master', 'spicebox'), |
| 176 |
'text' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quae, dolores dicta. Blanditiis rem amet repellat, dolores nihil quae in mollitia asperiores ut rerum repellendus, voluptatum eum, officia laudantium quaerat?', |
| 177 |
'open_new_tab' => 'no', |
| 178 |
'id' => 'customizer_repeater_56d7ea7f40c76', |
| 179 |
'social_repeater' => json_encode( |
| 180 |
array( |
| 181 |
array( |
| 182 |
'id' => 'customizer-repeater-social-repeater-57fb917e4c69e', |
| 183 |
'link' => 'facebook.com', |
| 184 |
'icon' => 'fa-brands fa-facebook-f', |
| 185 |
), |
| 186 |
array( |
| 187 |
'id' => 'customizer-repeater-social-repeater-57fb91830825c', |
| 188 |
'link' => 'twitter.com', |
| 189 |
'icon' => 'fa-brands fa-x-twitter', |
| 190 |
), |
| 191 |
array( |
| 192 |
'id' => 'customizer-repeater-social-repeater-57fb918d65f2e', |
| 193 |
'link' => 'linkedin.com', |
| 194 |
'icon' => 'fa-brands fa-linkedin', |
| 195 |
), |
| 196 |
array( |
| 197 |
'id' => 'customizer-repeater-social-repeater-57fb918d65f2e8', |
| 198 |
'link' => 'behance.com', |
| 199 |
'icon' => 'fa-brands fa-behance', |
| 200 |
), |
| 201 |
) |
| 202 |
), |
| 203 |
), |
| 204 |
array( |
| 205 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/team4.jpg', |
| 206 |
'image_url2' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/item-bg2.jpg', |
| 207 |
'membername' => 'Travis Marcus', |
| 208 |
'designation' => esc_html__('UI Developer', 'spicebox'), |
| 209 |
'text' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quae, dolores dicta. Blanditiis rem amet repellat, dolores nihil quae in mollitia asperiores ut rerum repellendus, voluptatum eum, officia laudantium quaerat?', |
| 210 |
'open_new_tab' => 'no', |
| 211 |
'id' => 'customizer_repeater_56d7ea7f40c86', |
| 212 |
'social_repeater' => json_encode( |
| 213 |
array( |
| 214 |
array( |
| 215 |
'id' => 'customizer-repeater-social-repeater-57fb925cedcb2', |
| 216 |
'link' => 'facebook.com', |
| 217 |
'icon' => 'fa-brands fa-facebook-f', |
| 218 |
), |
| 219 |
array( |
| 220 |
'id' => 'customizer-repeater-social-repeater-57fb92615f030', |
| 221 |
'link' => 'twitter.com', |
| 222 |
'icon' => 'fa-brands fa-x-twitter', |
| 223 |
), |
| 224 |
array( |
| 225 |
'id' => 'customizer-repeater-social-repeater-57fb9266c223a', |
| 226 |
'link' => 'linkedin.com', |
| 227 |
'icon' => 'fa-brands fa-linkedin', |
| 228 |
), |
| 229 |
array( |
| 230 |
'id' => 'customizer-repeater-social-repeater-57fb9266c223a', |
| 231 |
'link' => 'behance.com', |
| 232 |
'icon' => 'fa-brands fa-behance', |
| 233 |
), |
| 234 |
) |
| 235 |
), |
| 236 |
), |
| 237 |
)); |
| 238 |
} |
| 239 |
} |
| 240 |
|
| 241 |
add_action('customize_register', 'spiceb_spiko_team_default_customize_register'); |
| 242 |
|
| 243 |
endif; |
| 244 |
|
| 245 |
function spiceb_spiko_sections_settings($wp_customize) { |
| 246 |
|
| 247 |
$selective_refresh = isset($wp_customize->selective_refresh) ? 'postMessage' : 'refresh'; |
| 248 |
/* Sections Settings */ |
| 249 |
$wp_customize->add_panel('section_settings', array( |
| 250 |
'priority' => 126, |
| 251 |
'capability' => 'edit_theme_options', |
| 252 |
'title' => esc_html__('Homepage Section Settings', 'spicebox'), |
| 253 |
)); |
| 254 |
} |
| 255 |
|
| 256 |
add_action('customize_register', 'spiceb_spiko_sections_settings'); |
| 257 |
|
| 258 |
/* * *********************** Slider Callback function ******************************** */ |
| 259 |
|
| 260 |
function spiceb_spiko_slider_callback($control) { |
| 261 |
if (true == $control->manager->get_setting('home_page_slider_enabled')->value()) { |
| 262 |
return true; |
| 263 |
} else { |
| 264 |
return false; |
| 265 |
} |
| 266 |
} |
| 267 |
|
| 268 |
/* * *********************** Service Callback function ******************************** */ |
| 269 |
|
| 270 |
function spiceb_spiko_service_callback($control) { |
| 271 |
if (true == $control->manager->get_setting('home_service_section_enabled')->value()) { |
| 272 |
return true; |
| 273 |
} else { |
| 274 |
return false; |
| 275 |
} |
| 276 |
} |
| 277 |
|
| 278 |
/* * *********************** Testimonial Callback function ******************************** */ |
| 279 |
|
| 280 |
function spiceb_spiko_testimonial_callback($control) { |
| 281 |
if (true == $control->manager->get_setting('testimonial_section_enable')->value()) { |
| 282 |
return true; |
| 283 |
} else { |
| 284 |
return false; |
| 285 |
} |
| 286 |
} |
| 287 |
|
| 288 |
/* * *********************** Latest News Callback function ******************************** */ |
| 289 |
|
| 290 |
function spiceb_spiko_news_callback($control) { |
| 291 |
if (true == $control->manager->get_setting('latest_news_section_enable')->value()) { |
| 292 |
return true; |
| 293 |
} else { |
| 294 |
return false; |
| 295 |
} |
| 296 |
} |
| 297 |
|
| 298 |
/* * *********************** CTA1 Callback function ******************************** */ |
| 299 |
|
| 300 |
function spiceb_spiko_team_callback($control) { |
| 301 |
if (true == $control->manager->get_setting('team_section_enable')->value()) { |
| 302 |
return true; |
| 303 |
} else { |
| 304 |
return false; |
| 305 |
} |
| 306 |
} |
| 307 |
|
| 308 |
add_action('wp_head','spicebox_spiko_sections_script'); |
| 309 |
function spicebox_spiko_sections_script(){?> |
| 310 |
<script type="text/javascript"> |
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
</script> |
| 315 |
<?php |
| 316 |
} |