Spice Box - Version 0.2.2

Version Description

  • String update
Download this release

Release Info

Developer spicethemes
Plugin Icon wp plugin Spice Box
Version 0.2.2
Comparing to
See all releases

Version 0.2.2

inc/spicepress/customizer.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! function_exists( 'spiceb_customize_register' ) ) :
3
+ /**
4
+ * Spicepress Customize Register
5
+ */
6
+
7
+ function spiceb_customize_register( $wp_customize ) {
8
+ $spicepress_features_content_control = $wp_customize->get_setting( 'spicepress_service_content' );
9
+ if ( ! empty( $spicepress_features_content_control ) ) {
10
+ $spicepress_features_content_control->default = spiceb_spicepress_get_service_default();
11
+ }
12
+ }
13
+
14
+ add_action( 'customize_register', 'spiceb_customize_register' );
15
+ endif;
16
+ ?>
inc/spicepress/features/feature-portfolio-section.php ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function spiceb_spicepress_project_customizer( $wp_customize ) {
3
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
4
+ /* Portfolio Section */
5
+ $wp_customize->add_section( 'portfolio_section' , array(
6
+ 'title' => __('Portfolio settings', 'spicepress'),
7
+ 'panel' => 'section_settings',
8
+ 'priority' => 4,
9
+ ) );
10
+
11
+ // Enable portfolio more btn
12
+ $wp_customize->add_setting( 'portfolio_section_enable' , array( 'default' => 'on') );
13
+ $wp_customize->add_control( 'portfolio_section_enable' , array(
14
+ 'label' => __( 'Enable Home Portfolio section', 'spicepress' ),
15
+ 'section' => 'portfolio_section',
16
+ 'type' => 'radio',
17
+ 'choices' => array(
18
+ 'on'=>__('ON', 'spicepress'),
19
+ 'off'=>__('OFF', 'spicepress')
20
+ )
21
+ ));
22
+
23
+ // portfolio section title
24
+ $wp_customize->add_setting( 'home_portfolio_section_title',array(
25
+ 'capability' => 'edit_theme_options',
26
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
27
+ 'default' => __('Our Portfolio','spicepress'),
28
+ 'transport' => $selective_refresh,
29
+ ));
30
+ $wp_customize->add_control( 'home_portfolio_section_title',array(
31
+ 'label' => __('Title','spicepress'),
32
+ 'section' => 'portfolio_section',
33
+ 'type' => 'text',
34
+ ));
35
+
36
+ //portfolio section discription
37
+ $wp_customize->add_setting( 'home_portfolio_section_discription',array(
38
+ 'capability' => 'edit_theme_options',
39
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
40
+ 'default' => 'Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.',
41
+ 'transport' => $selective_refresh,
42
+ ));
43
+ $wp_customize->add_control( 'home_portfolio_section_discription',array(
44
+ 'label' => __('Description','spicepress'),
45
+ 'section' => 'portfolio_section',
46
+ 'type' => 'textarea',
47
+ ));
48
+
49
+
50
+ //Portfolio one image
51
+ $wp_customize->add_setting( 'portfolio_one_thumb',array('default' => SPICEB_PLUGIN_URL .'/inc/spicepress/images/portfolio/item1.jpg',
52
+ 'sanitize_callback' => 'esc_url_raw', 'transport' => $selective_refresh, ));
53
+
54
+ $wp_customize->add_control(
55
+ new WP_Customize_Image_Control(
56
+ $wp_customize,
57
+ 'portfolio_one_thumb',
58
+ array(
59
+ 'label' => __('Image','spicebox'),
60
+ 'section' => 'example_section_one',
61
+ 'settings' =>'portfolio_one_thumb',
62
+ 'section' => 'portfolio_section',
63
+ 'type' => 'upload',
64
+ )
65
+ )
66
+ );
67
+
68
+
69
+ //Portfolio one Title
70
+ $wp_customize->add_setting(
71
+ 'portfolio_one_title', array(
72
+ 'default' => __('Art Office Design','spicebox'),
73
+ 'capability' => 'edit_theme_options',
74
+ 'sanitize_callback' => 'sanitize_text_field',
75
+ 'transport' => $selective_refresh,
76
+ ));
77
+ $wp_customize->add_control('portfolio_one_title', array(
78
+ 'label' => __('Title', 'spicebox'),
79
+ 'section' => 'portfolio_section',
80
+ 'type' => 'text',
81
+ ));
82
+
83
+ //Portfolio one description
84
+ $wp_customize->add_setting(
85
+ 'portfolio_one_desc', array(
86
+ 'default' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit..',
87
+ 'capability' => 'edit_theme_options',
88
+ 'sanitize_callback' => 'sanitize_text_field',
89
+ 'transport' => $selective_refresh,
90
+ ));
91
+ $wp_customize->add_control('portfolio_one_desc', array(
92
+ 'label' => __('Description', 'spicebox'),
93
+ 'section' => 'portfolio_section',
94
+ 'type' => 'text',
95
+ ));
96
+
97
+
98
+
99
+ //Portfolio two image
100
+ $wp_customize->add_setting( 'portfolio_two_thumb',array('default' => SPICEB_PLUGIN_URL .'/inc/spicepress/images/portfolio/item2.jpg',
101
+ 'sanitize_callback' => 'esc_url_raw','transport' => $selective_refresh,));
102
+
103
+ $wp_customize->add_control(
104
+ new WP_Customize_Image_Control(
105
+ $wp_customize,
106
+ 'portfolio_two_thumb',
107
+ array(
108
+ 'label' => __('Image','spicebox'),
109
+ 'section' => 'example_section_one',
110
+ 'settings' =>'portfolio_two_thumb',
111
+ 'section' => 'portfolio_section',
112
+ 'type' => 'upload',
113
+ )
114
+ )
115
+ );
116
+
117
+
118
+ //Portfolio two Title
119
+ $wp_customize->add_setting(
120
+ 'portfolio_two_title', array(
121
+ 'default' => __('Graphics Design','spicebox'),
122
+ 'capability' => 'edit_theme_options',
123
+ 'sanitize_callback' => 'sanitize_text_field',
124
+ 'transport' => $selective_refresh,
125
+ ));
126
+ $wp_customize->add_control('portfolio_two_title', array(
127
+ 'label' => __('Title', 'spicebox'),
128
+ 'section' => 'portfolio_section',
129
+ 'type' => 'text',
130
+ ));
131
+
132
+ //Portfolio two description
133
+ $wp_customize->add_setting(
134
+ 'portfolio_two_desc', array(
135
+ 'default' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit..',
136
+ 'capability' => 'edit_theme_options',
137
+ 'sanitize_callback' => 'sanitize_text_field',
138
+ 'transport' => $selective_refresh,
139
+ ));
140
+ $wp_customize->add_control('portfolio_two_desc', array(
141
+ 'label' => __('Description', 'spicebox'),
142
+ 'section' => 'portfolio_section',
143
+ 'type' => 'text',
144
+ ));
145
+
146
+ //Portfolio three image
147
+ $wp_customize->add_setting( 'portfolio_three_thumb',array('default' => SPICEB_PLUGIN_URL .'/inc/spicepress/images/portfolio/item3.jpg',
148
+ 'sanitize_callback' => 'esc_url_raw',
149
+ 'transport' => $selective_refresh,
150
+ ));
151
+
152
+ $wp_customize->add_control(
153
+ new WP_Customize_Image_Control(
154
+ $wp_customize,
155
+ 'portfolio_three_thumb',
156
+ array(
157
+ 'label' => __('Image','spicebox'),
158
+ 'section' => 'example_section_one',
159
+ 'settings' =>'portfolio_three_thumb',
160
+ 'section' => 'portfolio_section',
161
+ 'type' => 'upload',
162
+ )
163
+ )
164
+ );
165
+
166
+ //Portfolio three Title
167
+ $wp_customize->add_setting(
168
+ 'portfolio_three_title', array(
169
+ 'default' => __('WordPress Themes','spicebox'),
170
+ 'capability' => 'edit_theme_options',
171
+ 'sanitize_callback' => 'sanitize_text_field',
172
+ 'transport' => $selective_refresh,
173
+ ));
174
+ $wp_customize->add_control('portfolio_three_title', array(
175
+ 'label' => __('Title', 'spicebox'),
176
+ 'section' => 'portfolio_section',
177
+ 'type' => 'text',
178
+ ));
179
+
180
+ //Portfolio three description
181
+ $wp_customize->add_setting(
182
+ 'portfolio_three_desc', array(
183
+ 'default' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit..',
184
+ 'capability' => 'edit_theme_options',
185
+ 'sanitize_callback' => 'sanitize_text_field',
186
+ 'transport' => $selective_refresh,
187
+ ));
188
+ $wp_customize->add_control('portfolio_three_desc', array(
189
+ 'label' => __('Description', 'spicebox'),
190
+ 'section' => 'portfolio_section',
191
+ 'type' => 'text',
192
+ ));
193
+
194
+
195
+
196
+ }
197
+ add_action( 'customize_register', 'spiceb_spicepress_project_customizer' );
198
+
199
+
200
+ /**
201
+ * Add selective refresh for Front page section section controls.
202
+ */
203
+ function spiceb_spicepress_register_home_project_section_partials( $wp_customize ){
204
+
205
+
206
+ //Portfolio section
207
+ $wp_customize->selective_refresh->add_partial( 'home_portfolio_section_title', array(
208
+ 'selector' => '.portfolio-section .section-header .widget-title',
209
+ 'settings' => 'home_portfolio_section_title',
210
+ 'render_callback' => 'spiceb_spicepress_portfolio_section_title_render_callback',
211
+
212
+ ) );
213
+
214
+ $wp_customize->selective_refresh->add_partial( 'home_portfolio_section_discription', array(
215
+ 'selector' => '.portfolio-section .section-header p',
216
+ 'settings' => 'home_portfolio_section_discription',
217
+ 'render_callback' => 'spiceb_spicepress_portfolio_section_discription_render_callback',
218
+
219
+ ) );
220
+
221
+
222
+ $wp_customize->selective_refresh->add_partial( 'portfolio_one_title', array(
223
+ 'selector' => '.port1 .entry-header .entry-title > a',
224
+ 'settings' => 'portfolio_one_title',
225
+ 'render_callback' => 'spiceb_spicepress_portfolio_one_title_render_callback',
226
+
227
+ ) );
228
+
229
+ $wp_customize->selective_refresh->add_partial( 'portfolio_one_desc', array(
230
+ 'selector' => '.port1 .entry-content p',
231
+ 'settings' => 'portfolio_one_desc',
232
+ 'render_callback' => 'spiceb_spicepress_portfolio_one_desc_render_callback',
233
+
234
+ ) );
235
+
236
+ $wp_customize->selective_refresh->add_partial( 'portfolio_one_thumb', array(
237
+ 'selector' => '.port1 .post-thumbnail',
238
+ 'settings' => 'portfolio_one_thumb',
239
+
240
+ ) );
241
+
242
+ $wp_customize->selective_refresh->add_partial( 'portfolio_two_title', array(
243
+ 'selector' => '.port2 .entry-header .entry-title > a',
244
+ 'settings' => 'portfolio_two_title',
245
+ 'render_callback' => 'spiceb_spicepress_portfolio_two_title_render_callback',
246
+
247
+ ) );
248
+
249
+ $wp_customize->selective_refresh->add_partial( 'portfolio_two_desc', array(
250
+ 'selector' => '.port2 .entry-content p',
251
+ 'settings' => 'portfolio_two_desc',
252
+ 'render_callback' => 'spiceb_spicepress_portfolio_two_desc_render_callback',
253
+
254
+ ) );
255
+
256
+ $wp_customize->selective_refresh->add_partial( 'portfolio_two_thumb', array(
257
+ 'selector' => '.port2 .post-thumbnail',
258
+ 'settings' => 'portfolio_two_thumb',
259
+
260
+ ) );
261
+
262
+
263
+ $wp_customize->selective_refresh->add_partial( 'portfolio_three_title', array(
264
+ 'selector' => '.port3 .entry-header .entry-title > a',
265
+ 'settings' => 'portfolio_three_title',
266
+ 'render_callback' => 'spiceb_spicepress_portfolio_three_title_render_callback',
267
+
268
+ ) );
269
+
270
+ $wp_customize->selective_refresh->add_partial( 'portfolio_three_desc', array(
271
+ 'selector' => '.port3 .entry-content p',
272
+ 'settings' => 'portfolio_three_desc',
273
+ 'render_callback' => 'spiceb_spicepress_portfolio_three_desc_render_callback',
274
+
275
+ ) );
276
+
277
+ $wp_customize->selective_refresh->add_partial( 'portfolio_three_thumb', array(
278
+ 'selector' => '.port3 .post-thumbnail',
279
+ 'settings' => 'portfolio_three_thumb',
280
+
281
+ ) );
282
+
283
+ }
284
+
285
+ add_action( 'customize_register', 'spiceb_spicepress_register_home_project_section_partials' );
286
+
287
+
288
+ function spiceb_spicepress_portfolio_section_title_render_callback() {
289
+ return get_theme_mod( 'home_portfolio_section_title' );
290
+ }
291
+
292
+ function spiceb_spicepress_portfolio_section_discription_render_callback() {
293
+ return get_theme_mod( 'home_portfolio_section_discription' );
294
+ }
295
+
296
+
297
+ function spiceb_spicepress_portfolio_one_title_render_callback() {
298
+ return get_theme_mod( 'portfolio_one_title' );
299
+ }
300
+
301
+
302
+ function spiceb_spicepress_portfolio_one_desc_render_callback() {
303
+ return get_theme_mod( 'portfolio_one_desc' );
304
+ }
305
+
306
+
307
+ function spiceb_spicepress_portfolio_one_thumb_render_callback() {
308
+ return get_theme_mod( 'portfolio_one_thumb' );
309
+ }
310
+
311
+
312
+
313
+ function spiceb_spicepress_portfolio_two_title_render_callback() {
314
+ return get_theme_mod( 'portfolio_two_title' );
315
+ }
316
+
317
+
318
+ function spiceb_spicepress_portfolio_two_desc_render_callback() {
319
+ return get_theme_mod( 'portfolio_two_desc' );
320
+ }
321
+
322
+
323
+ function spiceb_spicepress_portfolio_two_thumb_render_callback() {
324
+ return get_theme_mod( 'portfolio_two_thumb' );
325
+ }
326
+
327
+
328
+ function spiceb_spicepress_portfolio_three_title_render_callback() {
329
+ return get_theme_mod( 'portfolio_three_title' );
330
+ }
331
+
332
+
333
+ function spiceb_spicepress_portfolio_three_desc_render_callback() {
334
+ return get_theme_mod( 'portfolio_three_desc' );
335
+ }
336
+
337
+
338
+ function spiceb_spicepress_portfolio_three_thumb_render_callback() {
339
+ return get_theme_mod( 'portfolio_three_thumb' );
340
+ }
341
+ ?>
inc/spicepress/features/feature-service-section.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! function_exists( 'spiceb_spicepress_service_customize_register' ) ) :
3
+ function spiceb_spicepress_service_customize_register($wp_customize){
4
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
5
+
6
+ /* Services section */
7
+ $wp_customize->add_section( 'services_section' , array(
8
+ 'title' => __('Service settings', 'spicepress'),
9
+ 'panel' => 'section_settings',
10
+ 'priority' => 1,
11
+ ) );
12
+
13
+
14
+ // Enable service more btn
15
+ $wp_customize->add_setting( 'home_service_section_enabled' , array( 'default' => 'on') );
16
+ $wp_customize->add_control( 'home_service_section_enabled' , array(
17
+ 'label' => __( 'Enable Services on homepage', 'spicepress' ),
18
+ 'section' => 'services_section',
19
+ 'type' => 'radio',
20
+ 'choices' => array(
21
+ 'on'=>__('ON', 'spicepress'),
22
+ 'off'=>__('OFF', 'spicepress')
23
+ )
24
+ ));
25
+
26
+
27
+ // Service section title
28
+ $wp_customize->add_setting( 'home_service_section_title',array(
29
+ 'capability' => 'edit_theme_options',
30
+ 'default' => __('What we Offer?','spicepress'),
31
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
32
+ 'transport' => $selective_refresh,
33
+ ));
34
+ $wp_customize->add_control( 'home_service_section_title',array(
35
+ 'label' => __('Title','spicepress'),
36
+ 'section' => 'services_section',
37
+ 'type' => 'text',
38
+ ));
39
+
40
+ //room section discription
41
+ $wp_customize->add_setting( 'home_service_section_discription',array(
42
+ 'capability' => 'edit_theme_options',
43
+ 'default' => 'Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.',
44
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
45
+ 'transport' => $selective_refresh,
46
+ ));
47
+ $wp_customize->add_control( 'home_service_section_discription',array(
48
+ 'label' => __('Description','spicepress'),
49
+ 'section' => 'services_section',
50
+ 'type' => 'textarea',
51
+ ));
52
+
53
+ if ( class_exists( 'Spicepress_Repeater' ) ) {
54
+ $wp_customize->add_setting( 'spicepress_service_content', array(
55
+ ) );
56
+
57
+ $wp_customize->add_control( new Spicepress_Repeater( $wp_customize, 'spicepress_service_content', array(
58
+ 'label' => esc_html__( 'Service content', 'spicepress' ),
59
+ 'section' => 'services_section',
60
+ 'priority' => 10,
61
+ 'add_field_label' => esc_html__( 'Add new Service', 'spicepress' ),
62
+ 'item_name' => esc_html__( 'Service', 'spicepress' ),
63
+ 'customizer_repeater_icon_control' => true,
64
+ 'customizer_repeater_title_control' => true,
65
+ 'customizer_repeater_text_control' => true,
66
+ 'customizer_repeater_link_control' => true,
67
+ 'customizer_repeater_checkbox_control' => true,
68
+ 'customizer_repeater_image_control' => true,
69
+ ) ) );
70
+ }
71
+
72
+ }
73
+
74
+ add_action( 'customize_register', 'spiceb_spicepress_service_customize_register' );
75
+ endif;
76
+
77
+
78
+ /**
79
+ * Add selective refresh for Front page section section controls.
80
+ */
81
+ function spiceb_spicepress_register_home_service_section_partials( $wp_customize ){
82
+
83
+ //Slider section
84
+ $wp_customize->selective_refresh->add_partial( 'spicepress_service_content', array(
85
+ 'selector' => '.service-section #service_content_section',
86
+ 'settings' => 'spicepress_service_content',
87
+
88
+ ) );
89
+
90
+
91
+ //Slider section
92
+ $wp_customize->selective_refresh->add_partial( 'home_service_section_title', array(
93
+ 'selector' => '.service-section .section-header .widget-title',
94
+ 'settings' => 'home_service_section_title',
95
+ 'render_callback' => 'spiceb_spicepress_service_section_title_render_callback',
96
+
97
+ ) );
98
+
99
+ $wp_customize->selective_refresh->add_partial( 'home_service_section_discription', array(
100
+ 'selector' => '.service-section .section-header p',
101
+ 'settings' => 'home_service_section_discription',
102
+ 'render_callback' => 'spiceb_spicepress_service_section_discription_render_callback',
103
+
104
+ ) );
105
+
106
+ }
107
+
108
+ add_action( 'customize_register', 'spiceb_spicepress_register_home_service_section_partials' );
109
+
110
+
111
+ function spiceb_spicepress_service_section_title_render_callback() {
112
+ return get_theme_mod( 'home_service_section_title' );
113
+ }
114
+
115
+ function spiceb_spicepress_service_section_discription_render_callback() {
116
+ return get_theme_mod( 'home_service_section_discription' );
117
+ }
118
+ ?>
inc/spicepress/features/feature-slider-section.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! function_exists( 'spiceb_spicepress_slider_customize_register' ) ) :
2
+ function spiceb_spicepress_slider_customize_register($wp_customize){
3
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
4
+
5
+ /* Slider Section */
6
+ $wp_customize->add_section( 'slider_section' , array(
7
+ 'title' => __('Slider settings', 'spicepress'),
8
+ 'panel' => 'section_settings',
9
+ 'priority' => 1,
10
+ ) );
11
+
12
+ // Enable slider
13
+ $wp_customize->add_setting( 'home_page_slider_enabled' , array( 'default' => 'on') );
14
+ $wp_customize->add_control( 'home_page_slider_enabled' , array(
15
+ 'label' => __( 'Enable slider', 'spicepress' ),
16
+ 'section' => 'slider_section',
17
+ 'type' => 'radio',
18
+ 'choices' => array(
19
+ 'on'=>__('ON', 'spicepress'),
20
+ 'off'=>__('OFF', 'spicepress')
21
+ )
22
+ ));
23
+
24
+
25
+ //Slider Image
26
+ $wp_customize->add_setting( 'home_slider_image',array('default' => SPICEB_PLUGIN_URL .'inc/spicepress/images/slider/slider.jpg',
27
+ 'sanitize_callback' => 'esc_url_raw', 'transport' => $selective_refresh,));
28
+
29
+ $wp_customize->add_control(
30
+ new WP_Customize_Image_Control(
31
+ $wp_customize,
32
+ 'home_slider_image',
33
+ array(
34
+ 'type' => 'upload',
35
+ 'label' => __('Image','spicepress'),
36
+ 'settings' =>'home_slider_image',
37
+ 'section' => 'slider_section',
38
+
39
+ )
40
+ )
41
+ );
42
+
43
+
44
+ // Slider title
45
+ $wp_customize->add_setting( 'home_slider_title',array(
46
+ 'default' => __('Welcome to SpicePress Theme','spicepress'),
47
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
48
+ 'transport' => $selective_refresh,
49
+ ));
50
+ $wp_customize->add_control( 'home_slider_title',array(
51
+ 'label' => __('Title','spicepress'),
52
+ 'section' => 'slider_section',
53
+ 'type' => 'text',
54
+ ));
55
+
56
+ //Slider discription
57
+ $wp_customize->add_setting( 'home_slider_discription',array(
58
+ 'default' => 'Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.',
59
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
60
+ 'transport' => $selective_refresh,
61
+ ));
62
+ $wp_customize->add_control( 'home_slider_discription',array(
63
+ 'label' => __('Description','spicepress'),
64
+ 'section' => 'slider_section',
65
+ 'type' => 'textarea',
66
+ ));
67
+
68
+
69
+ // Slider button text
70
+ $wp_customize->add_setting( 'home_slider_btn_txt',array(
71
+ 'default' => __('Read more','spicepress'),
72
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
73
+ 'transport' => $selective_refresh,
74
+ ));
75
+ $wp_customize->add_control( 'home_slider_btn_txt',array(
76
+ 'label' => __('Button Text','spicepress'),
77
+ 'section' => 'slider_section',
78
+ 'type' => 'text',
79
+ ));
80
+
81
+ // Slider button link
82
+ $wp_customize->add_setting( 'home_slider_btn_link',array(
83
+ 'default' => __('#','spicepress'),
84
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
85
+ 'transport' => $selective_refresh,
86
+ ));
87
+ $wp_customize->add_control( 'home_slider_btn_link',array(
88
+ 'label' => __('Button Link','spicepress'),
89
+ 'section' => 'slider_section',
90
+ 'type' => 'text',
91
+ ));
92
+
93
+ // Slider button target
94
+ $wp_customize->add_setting(
95
+ 'home_slider_btn_target',
96
+ array(
97
+ 'default' => false,
98
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
99
+ ));
100
+ $wp_customize->add_control('home_slider_btn_target', array(
101
+ 'label' => __('Open link in new tab', 'spicepress'),
102
+ 'section' => 'slider_section',
103
+ 'type' => 'checkbox',
104
+ ));
105
+
106
+
107
+
108
+ }
109
+
110
+ add_action( 'customize_register', 'spiceb_spicepress_slider_customize_register' );
111
+ endif;
112
+
113
+
114
+ /**
115
+ * Add selective refresh for Front page section section controls.
116
+ */
117
+ function spiceb_spicepress_register_home_slider_section_partials( $wp_customize ){
118
+
119
+
120
+
121
+ $wp_customize->selective_refresh->add_partial( 'home_slider_image', array(
122
+ 'selector' => '.slider .item',
123
+ 'settings' => 'home_slider_image',
124
+
125
+ ) );
126
+
127
+ //Slider section
128
+ $wp_customize->selective_refresh->add_partial( 'home_slider_title', array(
129
+ 'selector' => '.format-standard .slide-text-bg1 h1',
130
+ 'settings' => 'home_slider_title',
131
+ 'render_callback' => 'spiceb_spicepress_slider_section_title_render_callback',
132
+
133
+ ) );
134
+
135
+ $wp_customize->selective_refresh->add_partial( 'home_slider_discription', array(
136
+ 'selector' => '.format-standard .slide-text-bg1 p',
137
+ 'settings' => 'home_slider_discription',
138
+ 'render_callback' => 'spiceb_spicepress_slider_section_discription_render_callback',
139
+
140
+ ) );
141
+
142
+ $wp_customize->selective_refresh->add_partial( 'home_slider_btn_txt', array(
143
+ 'selector' => '.slide-btn-sm',
144
+ 'settings' => 'home_slider_btn_txt',
145
+ 'render_callback' => 'spiceb_spicepress_slider_btn_render_callback',
146
+
147
+ ) );
148
+ }
149
+
150
+ add_action( 'customize_register', 'spiceb_spicepress_register_home_slider_section_partials' );
151
+
152
+
153
+ function spiceb_spicepress_slider_section_title_render_callback() {
154
+ return get_theme_mod( 'home_slider_title' );
155
+ }
156
+
157
+ function spiceb_spicepress_slider_section_discription_render_callback() {
158
+ return get_theme_mod( 'home_slider_discription' );
159
+ }
160
+
161
+ function spiceb_spicepress_slider_btn_render_callback() {
162
+ return get_theme_mod( 'home_slider_btn_txt' );
163
+ }
164
+
165
+ function spiceb_spicepress_home_page_sanitize_text( $input ) {
166
+
167
+ return wp_kses_post( force_balance_tags( $input ) );
168
+
169
+ }
inc/spicepress/features/feature-testimonial-section.php ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! function_exists( 'spiceb_spicepress_testimonial_customize_register' ) ) :
3
+ function spiceb_spicepress_testimonial_customize_register($wp_customize){
4
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
5
+
6
+ /* Testimonial Section */
7
+ $wp_customize->add_section( 'testimonial_section' , array(
8
+ 'title' => __('Testimonial settings', 'spicepress'),
9
+ 'panel' => 'section_settings',
10
+ 'priority' => 7,
11
+ ) );
12
+
13
+ // Enable testimonial section
14
+ $wp_customize->add_setting( 'testimonial_section_enable' , array( 'default' => 'on') );
15
+ $wp_customize->add_control( 'testimonial_section_enable' , array(
16
+ 'label' => __( 'Enable Home Testimonial section', 'spicepress' ),
17
+ 'section' => 'testimonial_section',
18
+ 'type' => 'radio',
19
+ 'choices' => array(
20
+ 'on'=>__('ON', 'spicepress'),
21
+ 'off'=>__('OFF', 'spicepress')
22
+ )
23
+ ));
24
+
25
+ //Testimonial Background Image
26
+ $wp_customize->add_setting( 'testimonial_callout_background',array('default' => SPICEB_PLUGIN_URL .'/inc/spicepress/images/testimonial/testimonial-bg.jpg',
27
+ 'sanitize_callback' => 'esc_url_raw', 'transport' => $selective_refresh,));
28
+
29
+
30
+ $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'testimonial_callout_background', array(
31
+ 'label' => __( 'Background Image', 'spicepress' ),
32
+ 'section' => 'testimonial_section',
33
+ 'settings' => 'testimonial_callout_background',
34
+ ) ) );
35
+
36
+ // testimonial section title
37
+ $wp_customize->add_setting( 'home_testimonial_section_title',array(
38
+ 'capability' => 'edit_theme_options',
39
+ 'default' => __('What People Say','spicepress'),
40
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
41
+ 'transport' => $selective_refresh,
42
+ ));
43
+ $wp_customize->add_control( 'home_testimonial_section_title',array(
44
+ 'label' => __('Title','spicepress'),
45
+ 'section' => 'testimonial_section',
46
+ 'type' => 'text',
47
+ ));
48
+
49
+ //testimonial section discription
50
+ $wp_customize->add_setting( 'home_testimonial_section_discription',array(
51
+ 'capability' => 'edit_theme_options',
52
+ 'default'=> 'Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.',
53
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
54
+ 'transport' => $selective_refresh,
55
+ ));
56
+ $wp_customize->add_control( 'home_testimonial_section_discription',array(
57
+ 'label' => __('Description','spicepress'),
58
+ 'section' => 'testimonial_section',
59
+ 'type' => 'textarea',
60
+ ));
61
+
62
+ //testimonial one image
63
+ $wp_customize->add_setting( 'home_testimonial_thumb',array('default' => SPICEB_PLUGIN_URL .'/inc/spicepress/images/testimonial/testi1.jpg',
64
+ 'sanitize_callback' => 'esc_url_raw', 'transport' => $selective_refresh,));
65
+
66
+ $wp_customize->add_control(
67
+ new WP_Customize_Image_Control(
68
+ $wp_customize,
69
+ 'home_testimonial_thumb',
70
+ array(
71
+ 'label' => __('Image','spicebox'),
72
+ 'section' => 'example_section_one',
73
+ 'settings' =>'home_testimonial_thumb',
74
+ 'section' => 'testimonial_section',
75
+ 'type' => 'upload',
76
+ )
77
+ )
78
+ );
79
+
80
+ //testimonial description
81
+ $wp_customize->add_setting( 'home_testimonial_desc',array(
82
+ 'capability' => 'edit_theme_options',
83
+ 'default' => 'Sed ut Perspiciatis Unde Omnis Iste Sed ut perspiciatis unde omnis iste natu error sit voluptatem accu tium neque fermentum veposu miten a tempor nise. Duis autem vel eum iriure dolor in hendrerit in vulputate velit consequat reprehender in voluptate velit esse cillum duis dolor fugiat nulla pariatur.',
84
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
85
+ 'transport' => $selective_refresh,
86
+ ));
87
+ $wp_customize->add_control( 'home_testimonial_desc',array(
88
+ 'label' => __('Description','spicepress'),
89
+ 'section' => 'testimonial_section',
90
+ 'type' => 'text',
91
+ ));
92
+
93
+
94
+ // testimonial section title
95
+ $wp_customize->add_setting( 'home_testimonial_title',array(
96
+ 'capability' => 'edit_theme_options',
97
+ 'default' => __('Alice Culan','spicepress'),
98
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
99
+ 'transport' => $selective_refresh,
100
+ ));
101
+ $wp_customize->add_control( 'home_testimonial_title',array(
102
+ 'label' => __('Title','spicepress'),
103
+ 'section' => 'testimonial_section',
104
+ 'type' => 'text',
105
+ ));
106
+
107
+
108
+ $wp_customize->add_setting( 'home_testimonial_designation',array(
109
+ 'capability' => 'edit_theme_options',
110
+ 'default' => __('UI Developer','spicepress'),
111
+ 'sanitize_callback' => 'spiceb_spicepress_home_page_sanitize_text',
112
+ 'transport' => $selective_refresh,
113
+ ));
114
+ $wp_customize->add_control( 'home_testimonial_designation',array(
115
+ 'label' => __('Designation','spicepress'),
116
+ 'section' => 'testimonial_section',
117
+ 'type' => 'text',
118
+ ));
119
+
120
+
121
+ }
122
+
123
+ add_action( 'customize_register', 'spiceb_spicepress_testimonial_customize_register' );
124
+ endif;
125
+
126
+
127
+ /**
128
+ * Add selective refresh for Front page section section controls.
129
+ */
130
+ function spiceb_spicepress_register_home_testimonial_section_partials( $wp_customize ){
131
+
132
+
133
+
134
+ //Testimonial
135
+ $wp_customize->selective_refresh->add_partial( 'home_testimonial_section_title', array(
136
+ 'selector' => '.testimonial-section .section-header h1',
137
+ 'settings' => 'home_testimonial_section_title',
138
+ 'render_callback' => 'spiceb_spicepress_testimonial_section_title_render_callback',
139
+
140
+ ) );
141
+
142
+ $wp_customize->selective_refresh->add_partial( 'home_testimonial_section_discription', array(
143
+ 'selector' => '.testimonial-section .section-header p',
144
+ 'settings' => 'home_testimonial_section_discription',
145
+ 'render_callback' => 'spiceb_spicepress_testimonial_section_discription_render_callback',
146
+
147
+ ) );
148
+
149
+ $wp_customize->selective_refresh->add_partial( 'home_testimonial_desc', array(
150
+ 'selector' => '.author-description p',
151
+ 'settings' => 'home_testimonial_desc',
152
+ 'render_callback' => 'spiceb_spicepress_testimonial_desc_render_callback',
153
+
154
+ ) );
155
+
156
+
157
+ $wp_customize->selective_refresh->add_partial( 'home_testimonial_title', array(
158
+ 'selector' => '.testmonial-area h4',
159
+ 'settings' => 'home_testimonial_title',
160
+ 'render_callback' => 'spiceb_spicepress_testimonial_title_render_callback',
161
+
162
+ ) );
163
+
164
+ $wp_customize->selective_refresh->add_partial( 'home_testimonial_designation', array(
165
+ 'selector' => '.testmonial-area span.designation',
166
+ 'settings' => 'home_testimonial_designation',
167
+ 'render_callback' => 'spiceb_spicepress_testimonial_designation_render_callback',
168
+
169
+ ) );
170
+
171
+ $wp_customize->selective_refresh->add_partial( 'testimonial_callout_background', array(
172
+ 'selector' => 'section.testimonial-section',
173
+ 'settings' => 'testimonial_callout_background',
174
+
175
+ ) );
176
+
177
+ $wp_customize->selective_refresh->add_partial( 'home_testimonial_thumb', array(
178
+ 'selector' => '.testmonial-area .author-box',
179
+ 'settings' => 'home_testimonial_thumb',
180
+
181
+ ) );
182
+
183
+
184
+ }
185
+
186
+ add_action( 'customize_register', 'spiceb_spicepress_register_home_testimonial_section_partials' );
187
+
188
+
189
+ function spiceb_spicepress_testimonial_section_title_render_callback() {
190
+ return get_theme_mod( 'home_testimonial_section_title' );
191
+ }
192
+
193
+ function spiceb_spicepress_testimonial_section_discription_render_callback() {
194
+ return get_theme_mod( 'home_testimonial_section_discription' );
195
+ }
196
+
197
+ function spiceb_spicepress_testimonial_desc_render_callback() {
198
+ return get_theme_mod( 'home_testimonial_desc' );
199
+ }
200
+
201
+ function spiceb_spicepress_testimonial_title_render_callback() {
202
+ return get_theme_mod( 'home_testimonial_title' );
203
+ }
204
+
205
+ function spiceb_spicepress_testimonial_designation_render_callback() {
206
+ return get_theme_mod( 'home_testimonial_designation' );
207
+ }
208
+ ?>
inc/spicepress/images/portfolio/item1.jpg ADDED
Binary file
inc/spicepress/images/portfolio/item2.jpg ADDED
Binary file
inc/spicepress/images/portfolio/item3.jpg ADDED
Binary file
inc/spicepress/images/slider/slider.jpg ADDED
Binary file
inc/spicepress/images/testimonial/testi1.jpg ADDED
Binary file
inc/spicepress/images/testimonial/testimonial-bg.jpg ADDED
Binary file
inc/spicepress/sections/spicepress-features-section.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Services section for the homepage.
4
+ */
5
+ if ( ! function_exists( 'spiceb_spicepress_service' ) ) :
6
+
7
+ function spiceb_spicepress_service() {
8
+
9
+ $home_service_section_enabled = get_theme_mod('home_service_section_enabled','on');
10
+ $home_service_section_title = get_theme_mod('home_service_section_title',__('What we Offer?','spicepress'));
11
+ $home_service_section_discription = get_theme_mod('home_service_section_discription','Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.');
12
+ $spicepress_service_content = get_theme_mod( 'spicepress_service_content', spiceb_spicepress_get_service_default() );
13
+ $section_is_empty = empty( $spicepress_service_content ) && empty( $home_service_section_discription ) && empty( $home_service_section_title );
14
+ if($home_service_section_enabled !='off')
15
+ {
16
+ if( ($home_service_section_title) || ($home_service_section_discription)!='' ) { ?>
17
+ <!-- Section Title -->
18
+ <section class="service-section">
19
+ <div class="container">
20
+ <div class="row">
21
+ <div class="col-md-12">
22
+ <div class="section-header">
23
+ <?php if ( ! empty( $home_service_section_title ) || is_customize_preview() ) : ?>
24
+ <h1 class="widget-title">
25
+ <?php echo $home_service_section_title; ?>
26
+ </h1>
27
+ <?php endif; ?>
28
+ <div class="widget-separator"><span></span></div>
29
+ <?php if($home_service_section_discription) {?>
30
+ <div class="separator"><span></span></div>
31
+ <p class="wow fadeInDown animated">
32
+ <?php echo $home_service_section_discription; ?>
33
+ </p>
34
+ <?php } ?>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <!-- /Section Title -->
39
+ <?php }
40
+ spiceb_spicepress_service_content( $spicepress_service_content );
41
+ ?>
42
+ </div>
43
+ </section>
44
+ <?php } }
45
+
46
+ endif;
47
+
48
+
49
+ function spiceb_spicepress_service_content( $spicepress_service_content, $is_callback = false ) {
50
+ if ( ! $is_callback ) {
51
+ ?>
52
+
53
+ <?php
54
+ }
55
+ if ( ! empty( $spicepress_service_content ) ) :
56
+
57
+ $allowed_html = array(
58
+ 'br' => array(),
59
+ 'em' => array(),
60
+ 'strong' => array(),
61
+ 'b' => array(),
62
+ 'i' => array(),
63
+ );
64
+
65
+ $spicepress_service_content = json_decode( $spicepress_service_content );
66
+ if ( ! empty( $spicepress_service_content ) ) {
67
+ $i = 1;
68
+ echo '<div class="row" id="service_content_section">';
69
+ foreach ( $spicepress_service_content as $service_item ) :
70
+ $icon = ! empty( $service_item->icon_value ) ? $service_item->icon_value : '';
71
+ $image = ! empty( $service_item->image_url ) ? $service_item->image_url: '';
72
+ $title = ! empty( $service_item->title ) ? $service_item->title : '';
73
+ $text = ! empty( $service_item->text ) ? $service_item->text : '';
74
+ $link = ! empty( $service_item->link ) ? $service_item->link : '';
75
+ $color = ! empty( $service_item->color ) ? $service_item->color : '';
76
+ $choice = ! empty( $service_item->choice ) ? $service_item->choice : 'customizer_repeater_icon';
77
+ $open_new_tab = ! empty( $service_item->open_new_tab ) ? $service_item->open_new_tab : 'no';
78
+
79
+ ?>
80
+ <div class="col-md-4 col-sm-6 col-xs-12">
81
+ <div class="post text-center wow flipInX animated" data-wow-delay=".5s">
82
+
83
+ <figure class="post-thumbnail">
84
+ <?php if ( ! empty( $image ) ) : ?>
85
+
86
+ <?php if ( ! empty( $link ) ) : ?>
87
+ <a href="<?php echo esc_url( $link ); ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?>>
88
+ <?php endif; ?>
89
+ <img class="services_cols_mn_icon"
90
+ src="<?php echo esc_url( $image ); ?>" <?php if ( ! empty( $title ) ) : ?> alt="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" <?php endif; ?> />
91
+ <?php if ( ! empty( $link ) ) : ?>
92
+ </a>
93
+ <?php endif; ?>
94
+ <?php endif; ?>
95
+
96
+ <?php if ( ! empty( $link ) ) : ?>
97
+ <a href="<?php echo esc_url( $link ); ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?> >
98
+ <?php endif; ?>
99
+ <?php if ( ! empty( $icon ) ) :?>
100
+
101
+ <i class="fa <?php echo esc_html( $icon ); ?> txt-pink"></i>
102
+
103
+ <?php endif; ?>
104
+ </figure>
105
+ <?php if ( ! empty( $title ) ) : ?>
106
+
107
+ <div class="entry-header">
108
+ <h4 class="entry-title"><?php echo esc_html( $title ); ?></h4>
109
+ </div>
110
+ <?php endif; ?>
111
+ <?php if ( ! empty( $link ) ) : ?>
112
+ </a>
113
+ <?php endif; ?>
114
+ <?php if ( ! empty( $text ) ) : ?>
115
+
116
+ <div class="entry-content">
117
+ <p><?php echo wp_kses( html_entity_decode( $text ), $allowed_html ); ?></p>
118
+ </div>
119
+
120
+
121
+ <?php endif; ?>
122
+ </div>
123
+ </div>
124
+ <?php
125
+ if ( $i % apply_filters( 'spicepress_service_per_row_no', 3 ) == 0 ) {
126
+ echo '</div><!-- /.row -->';
127
+ echo '<div class="row">';
128
+ }
129
+ $i++;
130
+
131
+ endforeach;
132
+ echo '</div>';
133
+ }// End if().
134
+ endif;
135
+ if ( ! $is_callback ) {
136
+ ?>
137
+
138
+ <?php
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Get default values for service section.
144
+ *
145
+ * @since 1.1.31
146
+ * @access public
147
+ */
148
+ function spiceb_spicepress_get_service_default() {
149
+
150
+ return apply_filters(
151
+ 'spicepress_service_content', json_encode(
152
+ array(
153
+ array(
154
+ 'icon_value' => 'fa-laptop',
155
+ 'title' => esc_html__( 'Easy to Use', 'spicepress' ),
156
+ 'text' => 'Phasellus facilisis, nunc in lacinia auctor, eros lacus aliquet velit, quis lobortis risus nunc nec nisi maecans et turpis vitae velit.volutpat porttitor a sit amet est. In eu rutrum ante. Nullam id lorem fermentum, accumsan enim non auctor neque.', 'spicepress',
157
+ 'link' => '#',
158
+ 'open_new_tab' => 'no',
159
+ ),
160
+ array(
161
+ 'icon_value' => 'fa fa-cogs',
162
+ 'title' => esc_html__( 'Multi-Purpose', 'spicepress' ),
163
+ 'text' => 'Phasellus facilisis, nunc in lacinia auctor, eros lacus aliquet velit, quis lobortis risus nunc nec nisi maecans et turpis vitae velit.volutpat porttitor a sit amet est. In eu rutrum ante. Nullam id lorem fermentum, accumsan enim non auctor neque.', 'spicepress',
164
+ 'link' => '#',
165
+ 'open_new_tab' => 'no',
166
+ ),
167
+ array(
168
+ 'icon_value' => 'fa fa-mobile',
169
+ 'title' => esc_html__( 'Responsive Design', 'spicepress' ),
170
+ 'text' => 'Phasellus facilisis, nunc in lacinia auctor, eros lacus aliquet velit, quis lobortis risus nunc nec nisi maecans et turpis vitae velit.volutpat porttitor a sit amet est. In eu rutrum ante. Nullam id lorem fermentum, accumsan enim non auctor neque.',
171
+ 'link' => '#',
172
+ 'open_new_tab' => 'no',
173
+ ),
174
+ )
175
+ )
176
+ );
177
+ }
178
+
179
+ if ( function_exists( 'spiceb_spicepress_service' ) ) {
180
+ $section_priority = apply_filters( 'spicepress_section_priority', 11, 'spiceb_spicepress_service' );
181
+ add_action( 'spiceb_spicepress_sections', 'spiceb_spicepress_service', absint( $section_priority ) );
182
+ }
inc/spicepress/sections/spicepress-portfolio-section.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Portfolio section for the homepage.
4
+ */
5
+ if ( ! function_exists( 'spiceb_spicepress_portfolio' ) ) :
6
+
7
+ function spiceb_spicepress_portfolio() {
8
+
9
+ $home_portfolio_section_title = get_theme_mod('home_portfolio_section_title',__('Our Portfolio','spicepress'));
10
+ $home_portfolio_section_discription = get_theme_mod('home_portfolio_section_discription','Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.');
11
+ $portfolio_one_title = get_theme_mod('portfolio_one_title',__('Art Office Design','spicebox'));
12
+ $portfolio_one_desc = get_theme_mod('portfolio_one_desc','Lorem ipsum dolor sit amet, consectetur adipisicing elit..');
13
+ $portfolio_one_thumb = get_theme_mod('portfolio_one_thumb',SPICEB_PLUGIN_URL .'/inc/spicepress/images/portfolio/item1.jpg');
14
+
15
+ $portfolio_two_title = get_theme_mod('portfolio_two_title',__('Art Office Design','spicebox'));
16
+ $portfolio_two_desc = get_theme_mod('portfolio_two_desc','Lorem ipsum dolor sit amet, consectetur adipisicing elit..');
17
+ $portfolio_two_thumb = get_theme_mod('portfolio_two_thumb',SPICEB_PLUGIN_URL .'/inc/spicepress/images/portfolio/item2.jpg');
18
+
19
+ $portfolio_three_title = get_theme_mod('portfolio_three_title',__('Art Office Design','spicebox'));
20
+ $portfolio_three_desc = get_theme_mod('portfolio_three_desc','Lorem ipsum dolor sit amet, consectetur adipisicing elit..');
21
+ $portfolio_three_thumb = get_theme_mod('portfolio_three_thumb',SPICEB_PLUGIN_URL .'/inc/spicepress/images/portfolio/item3.jpg');
22
+ $portfolio_section_enable = get_theme_mod('portfolio_section_enable','on');
23
+ if($portfolio_section_enable !='off'){
24
+ ?>
25
+ <!-- Portfolio Section -->
26
+ <section class="portfolio-section">
27
+ <div class="container">
28
+
29
+ <!-- Section Title -->
30
+ <div class="row">
31
+ <div class="col-md-12">
32
+ <div class="section-header">
33
+ <h1 class="widget-title wow fadeInUp animated animated" data-wow-duration="500ms" data-wow-delay="0ms"><?php echo $home_portfolio_section_title; ?></h1>
34
+ <div class="widget-separator"><span></span></div>
35
+ <p class="wow fadeInDown animated"><?php echo $home_portfolio_section_discription; ?></p>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ <!-- /Section Title -->
40
+
41
+ <!-- Item Scroll -->
42
+ <div class="row">
43
+ <div id="portfolio-carousel">
44
+ <div class="col-md-4 col-sm-6 col-xs-12 port1">
45
+ <article class="post">
46
+ <figure class="post-thumbnail">
47
+ <img class="img-responsive" alt="img" src="<?php echo $portfolio_one_thumb; ?>">
48
+ </figure>
49
+ <header class="entry-header">
50
+ <h4 class="entry-title"><a href="#"><?php echo $portfolio_one_title; ?></a></h4>
51
+ </header>
52
+ <div class="entry-content">
53
+ <p><?php echo $portfolio_one_desc; ?></p>
54
+ </div>
55
+ </article>
56
+ </div>
57
+
58
+ <div class="col-md-4 col-sm-6 col-xs-12 port2">
59
+ <article class="post">
60
+ <figure class="post-thumbnail">
61
+ <img class="img-responsive" alt="img" src="<?php echo $portfolio_two_thumb?>">
62
+ </figure>
63
+ <header class="entry-header">
64
+ <h4 class="entry-title"><a href="#"><?php echo $portfolio_two_title; ?></a></h4>
65
+ </header>
66
+ <div class="entry-content">
67
+ <p><?php echo $portfolio_two_desc; ?></p>
68
+ </div>
69
+ </article>
70
+ </div>
71
+
72
+ <div class="col-md-4 col-sm-6 col-xs-12 port3">
73
+ <article class="post">
74
+ <figure class="post-thumbnail">
75
+ <img class="img-responsive" alt="img" src="<?php echo $portfolio_three_thumb?>">
76
+ </figure>
77
+ <header class="entry-header">
78
+ <h4 class="entry-title"><a href="#"><?php echo $portfolio_three_title; ?></a></h4>
79
+ </header>
80
+ <div class="entry-content">
81
+ <p><?php echo $portfolio_three_desc; ?></p>
82
+ </div>
83
+ </article>
84
+ </div>
85
+
86
+
87
+ </div>
88
+ </div>
89
+ <!-- /Item Scroll -->
90
+
91
+ </div>
92
+ </section>
93
+ <!-- /Portfolio Section -->
94
+
95
+ <div class="clearfix"></div>
96
+ <?php } }
97
+
98
+ endif;
99
+
100
+ if ( function_exists( 'spiceb_spicepress_portfolio' ) ) {
101
+ $section_priority = apply_filters( 'spicepress_section_priority', 12, 'spiceb_spicepress_portfolio' );
102
+ add_action( 'spiceb_spicepress_sections', 'spiceb_spicepress_portfolio', absint( $section_priority ) );
103
+
104
+ }
inc/spicepress/sections/spicepress-slider-section.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Slider section for the homepage.
4
+ */
5
+ if ( ! function_exists( 'spiceb_spicepress_slider' ) ) :
6
+
7
+ function spiceb_spicepress_slider() {
8
+
9
+ $home_slider_image = get_theme_mod('home_slider_image',SPICEB_PLUGIN_URL .'inc/spicepress/images/slider/slider.jpg');
10
+ $home_slider_title = get_theme_mod('home_slider_title','Welcome to SpicePress Theme');
11
+
12
+ $home_slider_discription = get_theme_mod('home_slider_discription','Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.');
13
+ $home_slider_btn_txt = get_theme_mod('home_slider_btn_txt','Read More');
14
+ $home_slider_btn_link = get_theme_mod('home_slider_btn_link',esc_url('#'));
15
+ $home_slider_btn_target = get_theme_mod('home_slider_btn_target',false);
16
+
17
+ $home_page_slider_enabled = get_theme_mod('home_page_slider_enabled','on');
18
+ if($home_page_slider_enabled !='off') {
19
+ ?>
20
+ <section class="slider" style="position:relative;">
21
+ <div class="item" style="background-image:url(<?php echo $home_slider_image; ?>); width: 100%; height: 100vh; background-position: center center; background-size: cover; z-index: 0;" >
22
+ <div class="container">
23
+ <div class="format-standard">
24
+ <?php if ( ! empty( $home_slider_title ) || is_customize_preview() ) { ?>
25
+ <div class="slide-text-bg1">
26
+ <h1><?php echo $home_slider_title; ?></h1>
27
+ <?php }
28
+ if ( ! empty( $home_slider_discription ) || is_customize_preview() ) {
29
+ ?>
30
+ <p><?php echo $home_slider_discription; ?></p>
31
+ <?php } ?>
32
+ </div>
33
+ <?php if($home_slider_btn_txt) { ?>
34
+ <div class="slide-btn-area-sm">
35
+ <a <?php if($home_slider_btn_link) { ?> href="<?php echo $home_slider_btn_link; } ?>"
36
+ <?php if($home_slider_btn_target) { ?> target="_blank" <?php } ?> class="slide-btn-sm">
37
+ <?php if($home_slider_btn_txt) { echo $home_slider_btn_txt; } ?></a>
38
+ </div>
39
+ <?php } ?>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </section>
44
+ <?php
45
+ }
46
+ }
47
+
48
+ endif;
49
+
50
+ if ( function_exists( 'spiceb_spicepress_slider' ) ) {
51
+ $section_priority = apply_filters( 'spicepress_section_priority', 11, 'spiceb_spicepress_slider' );
52
+ add_action( 'spiceb_spicepress_sections', 'spiceb_spicepress_slider', absint( $section_priority ) );
53
+
54
+ }
inc/spicepress/sections/spicepress-testimonail-section.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Portfolio section for the homepage.
4
+ */
5
+ if ( ! function_exists( 'spiceb_spicepress_testimonial' ) ) :
6
+
7
+ function spiceb_spicepress_testimonial() {
8
+
9
+ $testimonial_section_enable = get_theme_mod('testimonial_section_enable','on');
10
+ if($testimonial_section_enable !='off')
11
+ {
12
+ $testimonial_callout_background = get_theme_mod('testimonial_callout_background',SPICEB_PLUGIN_URL .'/inc/spicepress/images/testimonial/testimonial-bg.jpg');
13
+ if($testimonial_callout_background != '') { ?>
14
+ <section class="testimonial-section" style="background-image:url('<?php echo esc_url($testimonial_callout_background);?>'); background-repeat: no-repeat; background-position: top left;">
15
+ <?php } else { ?>
16
+ <section class="testimonial-section">
17
+ <?php } ?>
18
+
19
+ <div class="overlay">
20
+ <div class="container">
21
+ <?php
22
+ $home_testimonial_section_title = get_theme_mod('home_testimonial_section_title',__('What People Say','spicepress'));
23
+ $home_testimonial_section_discription = get_theme_mod('home_testimonial_section_discription','Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.');
24
+ $home_testimonial_title = get_theme_mod('home_testimonial_title',__('Alice Culan','spicepress'));
25
+ $home_testimonial_designation= get_theme_mod('home_testimonial_designation',__('UI Developer','spicepress'));
26
+ $home_testimonial_thumb = get_theme_mod('home_testimonial_thumb',SPICEB_PLUGIN_URL .'/inc/spicepress/images/testimonial/testi1.jpg');
27
+ $home_testimonial_desc = get_theme_mod('home_testimonial_desc','Sed ut Perspiciatis Unde Omnis Iste Sed ut perspiciatis unde omnis iste natu error sit voluptatem accu tium neque fermentum veposu miten a tempor nise. Duis autem vel eum iriure dolor in hendrerit in vulputate velit consequat reprehender in voluptate velit esse cillum duis dolor fugiat nulla pariatur.');
28
+ ?>
29
+
30
+
31
+ <?php if( $home_testimonial_section_title != '' || $home_testimonial_section_discription != '') { ?>
32
+ <!-- Section Title -->
33
+ <div class="row">
34
+ <div class="col-md-12">
35
+ <div class="section-header">
36
+ <h1 class="white wow fadeInUp animated" data-wow-delay="0ms" data-wow-duration="500ms">
37
+ <?php echo esc_attr($home_testimonial_section_title); ?>
38
+ </h1>
39
+ <div class="widget-separator"><span></span></div>
40
+ <p class="white wow fadeInDown animated">
41
+ <?php echo esc_attr($home_testimonial_section_discription); ?>
42
+ </p>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <?php } ?>
47
+ <!-- /Section Title -->
48
+ <!-- Testimonial -->
49
+ <div class="row">
50
+ <div class="item">
51
+ <div class="media testmonial-area">
52
+ <div class="author-box">
53
+ <img src="<?php echo $home_testimonial_thumb; ?>" class="img-circle" alt="img">
54
+ </div>
55
+ <div class="media-body">
56
+ <div class="description-box">
57
+ <div class="author-description">
58
+ <p><?php echo $home_testimonial_desc; ?>
59
+ </p>
60
+ </div>
61
+ </div>
62
+ <h4><?php echo $home_testimonial_title; ?> - <span class="designation"><?php echo $home_testimonial_designation; ?></span>
63
+ </div></h4>
64
+
65
+ </div>
66
+ </div>
67
+ </div>
68
+ <!-- /Testimonial -->
69
+
70
+ </div>
71
+ </div>
72
+ </section>
73
+ <!-- /Testimonial Section -->
74
+ <div class="clearfix"></div>
75
+ <?php } ?>
76
+ <?php
77
+ }
78
+
79
+ endif;
80
+
81
+ if ( function_exists( 'spiceb_spicepress_testimonial' ) ) {
82
+ $section_priority = apply_filters( 'spicepress_section_priority', 13, 'spiceb_spicepress_testimonial' );
83
+ add_action( 'spiceb_spicepress_sections', 'spiceb_spicepress_testimonial', absint( $section_priority ) );
84
+ }
readme.txt ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Spice Box ===
2
+ Contributors: spicethemes
3
+ Tags: widget, admin, widgets
4
+ Requires at least: 3.3+
5
+ Tested up to: 4.9.1
6
+ Stable tag: 0.2.2
7
+ License: GPLv2 or later
8
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+ Enhance Spicethemes WordPress Themes functionality.
11
+
12
+ == Description ==
13
+
14
+ This plugin is the for SpicePress themes. It creates the slider section , service section, portfolio section and testimonial on home page in the Spicepress theme.
15
+ Spice Box is a plugin build to enhance the functionality of WordPress Theme made by Spicethemes.
16
+ This plugin create repeater controls in the customizer settings allowing you to create a live site without moving out to customizer screen. Right now plugin have a support for Spicepress WordPress Theme. In future this plugin will support other themes by Spicethemes.
17
+
18
+
19
+ == Changelog ==
20
+
21
+ = 0.1 =
22
+
23
+ * First version of the plugin.
24
+
25
+ = 0.2 =
26
+
27
+ * Changed plugin name spice box to spicebox.
28
+
29
+ = 0.2.1 =
30
+
31
+ * Fixed plugin review issue.
32
+
33
+ = 0.2.2 =
34
+
35
+ * String update
spicebox.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: SpiceBox
4
+ Plugin URI:
5
+ Description: Enhances Spicethemes with extra functionality.
6
+ Version: 0.2.2
7
+ Author: Spicethemes
8
+ Author URI: https://github.com
9
+ Text Domain: spicebox
10
+ */
11
+ define( 'SPICEB_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
12
+ define( 'SPICEB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
13
+
14
+ function spiceb_activate() {
15
+ $theme = wp_get_theme(); // gets the current theme
16
+ if ( 'SpicePress' == $theme->name ){
17
+ require_once('inc/spicepress/features/feature-slider-section.php');
18
+ require_once('inc/spicepress/features/feature-service-section.php');
19
+ require_once('inc/spicepress/features/feature-portfolio-section.php');
20
+ require_once('inc/spicepress/features/feature-testimonial-section.php');
21
+ require_once('inc/spicepress/sections/spicepress-slider-section.php');
22
+ require_once('inc/spicepress/sections/spicepress-features-section.php');
23
+ require_once('inc/spicepress/sections/spicepress-portfolio-section.php');
24
+ require_once('inc/spicepress/sections/spicepress-testimonail-section.php');
25
+ require_once('inc/spicepress/customizer.php');
26
+
27
+ }
28
+
29
+ }
30
+ add_action( 'init', 'spiceb_activate' );
31
+
32
+
33
+ $theme = wp_get_theme();
34
+ if ( 'SpicePress' == $theme->name ){
35
+
36
+
37
+ register_activation_hook( __FILE__, 'spiceb_install_function');
38
+ function spiceb_install_function()
39
+ {
40
+ $item_details_page = get_option('item_details_page');
41
+ if(!$item_details_page){
42
+ //post status and options
43
+ $post = array(
44
+ 'comment_status' => 'closed',
45
+ 'ping_status' => 'closed' ,
46
+ 'post_author' => 1,
47
+ 'post_date' => date('Y-m-d H:i:s'),
48
+ 'post_name' => 'Home',
49
+ 'post_status' => 'publish' ,
50
+ 'post_title' => 'Home',
51
+ 'post_type' => 'page',
52
+ );
53
+ //insert page and save the id
54
+ $newvalue = wp_insert_post( $post, false );
55
+ if ( $newvalue && ! is_wp_error( $newvalue ) ){
56
+ update_post_meta( $newvalue, '_wp_page_template', 'template-business.php' );
57
+
58
+ // Use a static front page
59
+ $page = get_page_by_title('Home');
60
+ update_option( 'show_on_front', 'page' );
61
+ update_option( 'page_on_front', $page->ID );
62
+
63
+ }
64
+ //save the id in the database
65
+ update_option( 'item_details_page', $newvalue );
66
+ }
67
+ }
68
+
69
+ }
70
+ ?>