| 1 |
<?php |
| 2 |
// WPHester default service data |
| 3 |
if (!function_exists('spiceb_wphester_service_default_customize_register')) : |
| 4 |
|
| 5 |
function spiceb_wphester_service_default_customize_register($wp_customize) { |
| 6 |
|
| 7 |
$wphester_service_content_control = $wp_customize->get_setting('wphester_service_content'); |
| 8 |
if (!empty($wphester_service_content_control)) { |
| 9 |
$wphester_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_wphester_service_default_customize_register'); |
| 42 |
|
| 43 |
endif; |
| 44 |
|
| 45 |
// WPHester default Testimonial data |
| 46 |
if (!function_exists('spiceb_wphester_testimonial_default_customize_register')) : |
| 47 |
|
| 48 |
function spiceb_wphester_testimonial_default_customize_register($wp_customize) { |
| 49 |
|
| 50 |
$wphester_service_content_control = $wp_customize->get_setting('wphester_testimonial_content'); |
| 51 |
if (!empty($wphester_service_content_control)) { |
| 52 |
$wphester_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, temp consectetur adipisicing elit.', |
| 56 |
'clientname' => __('Amanda Smith', 'spicebox'), |
| 57 |
'designation' => __('Developer', 'spicebox'), |
| 58 |
'link' => '#', |
| 59 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/testimonial/user1.jpg', |
| 60 |
'open_new_tab' => 'no', |
| 61 |
'id' => 'customizer_repeater_77d7ea7f40b96', |
| 62 |
), |
| 63 |
array( |
| 64 |
'title' => 'Exellent Theme & Very Fast Support', |
| 65 |
'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, temp consectetur adipisicing elit.', |
| 66 |
'clientname' => __('Travis Cullan', 'spicebox'), |
| 67 |
'designation' => __('Team Leader', 'spicebox'), |
| 68 |
'link' => '#', |
| 69 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/testimonial/user2.jpg', |
| 70 |
'open_new_tab' => 'no', |
| 71 |
'id' => 'customizer_repeater_88d7ea7f40b97', |
| 72 |
), |
| 73 |
array( |
| 74 |
'title' => 'Exellent Theme & Very Fast Support', |
| 75 |
'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, temp consectetur adipisicing elit.', |
| 76 |
'clientname' => __('Victoria Wills', 'spicebox'), |
| 77 |
'designation' => __('Volunteer', 'spicebox'), |
| 78 |
'link' => '#', |
| 79 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/testimonial/user3.jpg', |
| 80 |
'id' => 'customizer_repeater_11d7ea7f40b98', |
| 81 |
'open_new_tab' => 'no', |
| 82 |
), |
| 83 |
)); |
| 84 |
} |
| 85 |
} |
| 86 |
|
| 87 |
add_action('customize_register', 'spiceb_wphester_testimonial_default_customize_register'); |
| 88 |
|
| 89 |
endif; |
| 90 |
|
| 91 |
// WPHester default Team data |
| 92 |
if (!function_exists('spiceb_wphester_team_default_customize_register')) : |
| 93 |
|
| 94 |
function spiceb_wphester_team_default_customize_register($wp_customize) { |
| 95 |
|
| 96 |
$wphester_team_content_control = $wp_customize->get_setting('wphester_team_content'); |
| 97 |
if (!empty($wphester_team_content_control)) { |
| 98 |
$wphester_team_content_control->default = json_encode(array( |
| 99 |
array( |
| 100 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/team1.jpg', |
| 101 |
'membername' => 'Danial Wilson', |
| 102 |
'designation' => esc_html__('Senior Manager', 'spicebox'), |
| 103 |
'open_new_tab' => 'no', |
| 104 |
'id' => 'customizer_repeater_26d7ea7f40c56', |
| 105 |
'social_repeater' => json_encode( |
| 106 |
array( |
| 107 |
array( |
| 108 |
'id' => 'customizer-repeater-social-repeater-37fb908374e06', |
| 109 |
'link' => 'facebook.com', |
| 110 |
'icon' => 'fa-brands fa-facebook-f', |
| 111 |
), |
| 112 |
array( |
| 113 |
'id' => 'customizer-repeater-social-repeater-47fb9144530fc', |
| 114 |
'link' => 'twitter.com', |
| 115 |
'icon' => 'fa-brands fa-x-twitter', |
| 116 |
), |
| 117 |
array( |
| 118 |
'id' => 'customizer-repeater-social-repeater-57fb9750e1e09', |
| 119 |
'link' => 'linkedin.com', |
| 120 |
'icon' => 'fa-brands fa-linkedin', |
| 121 |
), |
| 122 |
array( |
| 123 |
'id' => 'customizer-repeater-social-repeater-67fb0150e1e256', |
| 124 |
'link' => 'behance.com', |
| 125 |
'icon' => 'fa-brands fa-behance', |
| 126 |
), |
| 127 |
) |
| 128 |
), |
| 129 |
), |
| 130 |
array( |
| 131 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/team2.jpg', |
| 132 |
'membername' => 'Amanda Smith', |
| 133 |
'designation' => esc_html__('Founder & CEO', 'spicebox'), |
| 134 |
'open_new_tab' => 'no', |
| 135 |
'id' => 'customizer_repeater_56d1ea2f40c66', |
| 136 |
'social_repeater' => json_encode( |
| 137 |
array( |
| 138 |
array( |
| 139 |
'id' => 'customizer-repeater-social-repeater-57fb9133a7772', |
| 140 |
'link' => 'facebook.com', |
| 141 |
'icon' => 'fa-brands fa-facebook-f', |
| 142 |
), |
| 143 |
array( |
| 144 |
'id' => 'customizer-repeater-social-repeater-57fb9160rt683', |
| 145 |
'link' => 'twitter.com', |
| 146 |
'icon' => 'fa-brands fa-x-twitter', |
| 147 |
), |
| 148 |
array( |
| 149 |
'id' => 'customizer-repeater-social-repeater-57fb916zzooc9', |
| 150 |
'link' => 'linkedin.com', |
| 151 |
'icon' => 'fa-brands fa-linkedin', |
| 152 |
), |
| 153 |
array( |
| 154 |
'id' => 'customizer-repeater-social-repeater-57fb916qqwwc784', |
| 155 |
'link' => 'behance.com', |
| 156 |
'icon' => 'fa-brands fa-behance', |
| 157 |
), |
| 158 |
) |
| 159 |
), |
| 160 |
), |
| 161 |
array( |
| 162 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/team3.jpg', |
| 163 |
'membername' => 'Victoria Wills', |
| 164 |
'designation' => esc_html__('Web Master', 'spicebox'), |
| 165 |
'open_new_tab' => 'no', |
| 166 |
'id' => 'customizer_repeater_56d7ea7f40c76', |
| 167 |
'social_repeater' => json_encode( |
| 168 |
array( |
| 169 |
array( |
| 170 |
'id' => 'customizer-repeater-social-repeater-57fb917e4c69e', |
| 171 |
'link' => 'facebook.com', |
| 172 |
'icon' => 'fa-brands fa-facebook-f', |
| 173 |
), |
| 174 |
array( |
| 175 |
'id' => 'customizer-repeater-social-repeater-57fb91830825c', |
| 176 |
'link' => 'twitter.com', |
| 177 |
'icon' => 'fa-brands fa-x-twitter', |
| 178 |
), |
| 179 |
array( |
| 180 |
'id' => 'customizer-repeater-social-repeater-57fb918d65f2e', |
| 181 |
'link' => 'linkedin.com', |
| 182 |
'icon' => 'fa-brands fa-linkedin', |
| 183 |
), |
| 184 |
array( |
| 185 |
'id' => 'customizer-repeater-social-repeater-57fb918d65f2e8', |
| 186 |
'link' => 'behance.com', |
| 187 |
'icon' => 'fa-brands fa-behance', |
| 188 |
), |
| 189 |
) |
| 190 |
), |
| 191 |
), |
| 192 |
array( |
| 193 |
'image_url' => SPICEB_PLUGIN_URL . 'inc/busicare/images/team/team4.jpg', |
| 194 |
'membername' => 'Travis Marcus', |
| 195 |
'designation' => esc_html__('UI Developer', 'spicebox'), |
| 196 |
'open_new_tab' => 'no', |
| 197 |
'id' => 'customizer_repeater_56d7ea7f40c86', |
| 198 |
'social_repeater' => json_encode( |
| 199 |
array( |
| 200 |
array( |
| 201 |
'id' => 'customizer-repeater-social-repeater-57fb925cedcb2', |
| 202 |
'link' => 'facebook.com', |
| 203 |
'icon' => 'fa-brands fa-facebook-f', |
| 204 |
), |
| 205 |
array( |
| 206 |
'id' => 'customizer-repeater-social-repeater-57fb92615f030', |
| 207 |
'link' => 'twitter.com', |
| 208 |
'icon' => 'fa-brands fa-x-twitter', |
| 209 |
), |
| 210 |
array( |
| 211 |
'id' => 'customizer-repeater-social-repeater-57fb9266c223a', |
| 212 |
'link' => 'linkedin.com', |
| 213 |
'icon' => 'fa-brands fa-linkedin', |
| 214 |
), |
| 215 |
array( |
| 216 |
'id' => 'customizer-repeater-social-repeater-57fb9266c223a', |
| 217 |
'link' => 'behance.com', |
| 218 |
'icon' => 'fa-brands fa-behance', |
| 219 |
), |
| 220 |
) |
| 221 |
), |
| 222 |
), |
| 223 |
)); |
| 224 |
} |
| 225 |
} |
| 226 |
|
| 227 |
add_action('customize_register', 'spiceb_wphester_team_default_customize_register'); |
| 228 |
|
| 229 |
endif; |
| 230 |
|
| 231 |
function spiceb_wphester_sections_settings($wp_customize) { |
| 232 |
|
| 233 |
$selective_refresh = isset($wp_customize->selective_refresh) ? 'postMessage' : 'refresh'; |
| 234 |
/* Sections Settings */ |
| 235 |
$wp_customize->add_panel('section_settings', array( |
| 236 |
'priority' => 126, |
| 237 |
'capability' => 'edit_theme_options', |
| 238 |
'title' => esc_html__('Homepage Section Settings', 'spicebox'), |
| 239 |
)); |
| 240 |
} |
| 241 |
|
| 242 |
add_action('customize_register', 'spiceb_wphester_sections_settings'); |
| 243 |
|
| 244 |
/* * *********************** Slider Callback function ******************************** */ |
| 245 |
|
| 246 |
function spiceb_wphester_slider_callback($control) { |
| 247 |
if (true == $control->manager->get_setting('home_page_slider_enabled')->value()) { |
| 248 |
return true; |
| 249 |
} else { |
| 250 |
return false; |
| 251 |
} |
| 252 |
} |
| 253 |
|
| 254 |
/* * *********************** Service Callback function ******************************** */ |
| 255 |
|
| 256 |
function spiceb_wphester_service_callback($control) { |
| 257 |
if (true == $control->manager->get_setting('home_service_section_enabled')->value()) { |
| 258 |
return true; |
| 259 |
} else { |
| 260 |
return false; |
| 261 |
} |
| 262 |
} |
| 263 |
|
| 264 |
/* * *********************** Testimonial Callback function ******************************** */ |
| 265 |
|
| 266 |
function spiceb_wphester_testimonial_callback($control) { |
| 267 |
if (true == $control->manager->get_setting('testimonial_section_enable')->value()) { |
| 268 |
return true; |
| 269 |
} else { |
| 270 |
return false; |
| 271 |
} |
| 272 |
} |
| 273 |
|
| 274 |
/* * *********************** Latest News Callback function ******************************** */ |
| 275 |
|
| 276 |
function spiceb_wphester_news_callback($control) { |
| 277 |
if (true == $control->manager->get_setting('latest_news_section_enable')->value()) { |
| 278 |
return true; |
| 279 |
} else { |
| 280 |
return false; |
| 281 |
} |
| 282 |
} |
| 283 |
|
| 284 |
/* * *********************** CTA1 Callback function ******************************** */ |
| 285 |
|
| 286 |
function spiceb_wphester_team_callback($control) { |
| 287 |
if (true == $control->manager->get_setting('team_section_enable')->value()) { |
| 288 |
return true; |
| 289 |
} else { |
| 290 |
return false; |
| 291 |
} |
| 292 |
} |