Spice Box - Version 1.2

Version Description

  1. Added Cloudpress theme code.
Download this release

Release Info

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

Code changes from version 1.1.6 to 1.2

inc/cloudpress/customizer.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! function_exists( 'spiceb_cloudpress_customize_register' ) ) :
3
+ /**
4
+ * cloudpress Customize Register
5
+ */
6
+
7
+ function spiceb_cloudpress_customize_register( $wp_customize ) {
8
+ $cloudpress_features_content_control = $wp_customize->get_setting( 'cloudpress_service_content' );
9
+ if ( ! empty( $cloudpress_features_content_control ) ) {
10
+ $cloudpress_features_content_control->default = spiceb_cloudpress_get_service_default();
11
+ }
12
+ }
13
+ add_action( 'customize_register', 'spiceb_cloudpress_customize_register' );
14
+ endif;
15
+
16
+
17
+ if ( ! function_exists( 'spiceb_cloudpress_fun_customize_register' ) ) :
18
+ /**
19
+ * cloudpress Customize Register
20
+ */
21
+
22
+ function spiceb_cloudpress_fun_customize_register( $wp_customize ) {
23
+ $cloudpress_features_content_controls = $wp_customize->get_setting( 'cloudpress_funfact_content' );
24
+ if ( ! empty( $cloudpress_features_content_controls ) ) {
25
+ $cloudpress_features_content_controls->default = spiceb_cloudpress_get_funfact_default();
26
+ }
27
+ }
28
+ add_action( 'customize_register', 'spiceb_cloudpress_fun_customize_register' );
29
+ endif;
30
+ ?>
inc/cloudpress/default-pages/blog-page.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $post = array(
3
+ 'comment_status' => 'closed',
4
+ 'ping_status' => 'closed' ,
5
+ 'post_author' => 1,
6
+ 'post_date' => date('Y-m-d H:i:s'),
7
+ 'post_name' => 'Blog',
8
+ 'post_status' => 'publish' ,
9
+ 'post_title' => 'Blog',
10
+ 'post_type' => 'page',
11
+ );
12
+ //insert page and save the id
13
+ $newvalue = wp_insert_post( $post, false );
14
+ if ( $newvalue && ! is_wp_error( $newvalue ) ){
15
+ update_post_meta( $newvalue, '_wp_page_template', 'page.php' );
16
+
17
+ // Use a static front page
18
+ $page = get_page_by_title('Blog');
19
+ update_option( 'show_on_front', 'page' );
20
+ update_option( 'page_for_posts', $page->ID );
21
+
22
+ }
23
+ ?>
inc/cloudpress/default-pages/home-page.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //post status and options
3
+ $post = array(
4
+ 'comment_status' => 'closed',
5
+ 'ping_status' => 'closed' ,
6
+ 'post_author' => 1,
7
+ 'post_date' => date('Y-m-d H:i:s'),
8
+ 'post_name' => 'Home',
9
+ 'post_status' => 'publish' ,
10
+ 'post_title' => 'Home',
11
+ 'post_type' => 'page',
12
+ );
13
+ //insert page and save the id
14
+ $newvalue = wp_insert_post( $post, false );
15
+ if ( $newvalue && ! is_wp_error( $newvalue ) ){
16
+ update_post_meta( $newvalue, '_wp_page_template', 'template-business.php' );
17
+
18
+ // Use a static front page
19
+ $page = get_page_by_title('Home');
20
+ update_option( 'show_on_front', 'page' );
21
+ update_option( 'page_on_front', $page->ID );
22
+
23
+ }
24
+ ?>
inc/cloudpress/default-pages/upload-media.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $ImagePath = SPICEB_PLUGIN_URL .'inc/cloudpress/images';
3
+
4
+ $images = array(
5
+ $ImagePath. '/logo.png',
6
+ );
7
+
8
+ foreach($images as $name) {
9
+ $filename = basename($name);
10
+ $upload_file = wp_upload_bits($filename, null, file_get_contents($name));
11
+ if (!$upload_file['error']) {
12
+ $wp_filetype = wp_check_filetype($filename, null );
13
+ $attachment = array(
14
+ 'post_mime_type' => $wp_filetype['type'],
15
+ 'post_parent' => $parent_post_id,
16
+ 'post_title' => preg_replace('/\.[^.]+$/', '', $filename),
17
+ 'post_status' => 'inherit'
18
+ );
19
+ $ImageId[] = $attachment_id = wp_insert_attachment( $attachment, $upload_file['file'], $parent_post_id );
20
+
21
+ if (!is_wp_error($attachment_id)) {
22
+ require_once(ABSPATH . "wp-admin" . '/includes/image.php');
23
+ $attachment_data = wp_generate_attachment_metadata( $attachment_id, $upload_file['file'] );
24
+ wp_update_attachment_metadata( $attachment_id, $attachment_data );
25
+ }
26
+ }
27
+ }
28
+ update_option( 'innofit_media_id', $ImageId );
29
+ $MediaId = get_option('innofit_media_id');
30
+ set_theme_mod( 'custom_logo', $MediaId[0] );
31
+ set_theme_mod( 'header_textcolor', "blank" );
32
+ ?>
inc/cloudpress/default-widgets/default-widget.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $activate = array(
3
+ 'sidebar-1' => array(
4
+ 'search-1',
5
+ 'recent-posts-1',
6
+ 'archives-1',
7
+ ),
8
+ 'footer-sidebar-1' => array(
9
+ 'text-1',
10
+ ),
11
+ 'footer-sidebar-2' => array(
12
+ 'recent-posts-2',
13
+ ),
14
+ 'footer-sidebar-3' => array(
15
+ 'categories-2'
16
+ ),
17
+ 'footer-sidebar-4' => array(
18
+ 'archives-2',
19
+ ),
20
+ );
21
+
22
+ /* the default titles will appear */
23
+ update_option('widget_text', array(
24
+ 1 => array('title' => 'Contact Info',
25
+ 'text'=>'<p>Lorem ipsum dolor sit amet, ut ius audiam denique tractatos, pro cu dicat quidam neglegentur. Vel mazim aliquid.</p><address>
26
+ <i class="fa fa-map-marker"></i>514 S. Magnolia St. Orlando<br>
27
+ <i class="fa fa-envelope-o"></i><a href="mailto:support@honeypress.com">support@honeypress.com</a><br>
28
+ <i class="fa fa-phone"></i><a href="tel:+(15) 718-999-3939">+(15) 718-999-3939</a><br>
29
+ </address>'),
30
+ ));
31
+
32
+ update_option('widget_recent-posts', array(
33
+ 1 => array('title' => 'Recent Posts'),
34
+ 2 => array('title' => 'Recent Posts')));
35
+
36
+ update_option('widget_categories', array(
37
+ 1 => array('title' => 'Categories'),
38
+ 2 => array('title' => 'Categories')));
39
+
40
+ update_option('widget_archives', array(
41
+ 1 => array('title' => 'Archives'),
42
+ 2 => array('title' => 'Archives')));
43
+
44
+ update_option('widget_search', array(
45
+ 1 => array('title' => 'Search'),
46
+ 2 => array('title' => 'Search')));
47
+
48
+ update_option('sidebars_widgets', $activate);
49
+ ?>
inc/cloudpress/features/feature-cta-section.php ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! function_exists( 'spiceb_cloudpress_cta_customize_register' ) ) :
3
+ function spiceb_cloudpress_cta_customize_register($wp_customize){
4
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
5
+
6
+ /* cta Section */
7
+ $wp_customize->add_section( 'cta_section' , array(
8
+ 'title' => __('CTA Settings', 'spicebox'),
9
+ 'panel' => 'section_settings',
10
+ 'priority' => 2,
11
+ ) );
12
+
13
+ // Enable cta section
14
+ $wp_customize->add_setting( 'cta_section_enable' , array( 'default' => 'on') );
15
+ $wp_customize->add_control( 'cta_section_enable' , array(
16
+ 'label' => __( 'Enable Home CTA Section', 'spicebox' ),
17
+ 'section' => 'cta_section',
18
+ 'type' => 'radio',
19
+ 'choices' => array(
20
+ 'on'=>__('ON', 'spicebox'),
21
+ 'off'=>__('OFF', 'spicebox')
22
+ )
23
+ ));
24
+
25
+ // cta section title
26
+ $wp_customize->add_setting( 'home_cta_section_title',array(
27
+ 'capability' => 'edit_theme_options',
28
+ 'default' => __('Want to Work With Us?','spicebox'),
29
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
30
+ 'transport' => $selective_refresh,
31
+ ));
32
+ $wp_customize->add_control( 'home_cta_section_title',array(
33
+ 'label' => __('Title','spicebox'),
34
+ 'section' => 'cta_section',
35
+ 'type' => 'text',
36
+ ));
37
+
38
+ //cta section discription
39
+ $wp_customize->add_setting( 'home_cta_section_discription',array(
40
+ 'capability' => 'edit_theme_options',
41
+ 'default'=> __('Choose a package that suits your every need for building a website.','spicebox'),
42
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
43
+ 'transport' => $selective_refresh,
44
+ ));
45
+ $wp_customize->add_control( 'home_cta_section_discription',array(
46
+ 'label' => __('Sub Title','spicebox'),
47
+ 'section' => 'cta_section',
48
+ 'type' => 'text',
49
+ ));
50
+
51
+ $wp_customize->add_setting( 'home_cta_btn',array(
52
+ 'capability' => 'edit_theme_options',
53
+ 'default' => __('Contact Us','spicebox'),
54
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
55
+ 'transport' => $selective_refresh,
56
+ ));
57
+ $wp_customize->add_control( 'home_cta_btn',array(
58
+ 'label' => __('Button','spicebox'),
59
+ 'section' => 'cta_section',
60
+ 'type' => 'text',
61
+ ));
62
+
63
+ // CTA button link
64
+ $wp_customize->add_setting( 'home_cta_btn_link',array(
65
+ 'default' => __('#','spicebox'),
66
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
67
+ 'transport' => $selective_refresh,
68
+ ));
69
+ $wp_customize->add_control( 'home_cta_btn_link',array(
70
+ 'label' => __('Button Link','spicebox'),
71
+ 'section' => 'cta_section',
72
+ 'type' => 'text',
73
+ ));
74
+ }
75
+
76
+ add_action( 'customize_register', 'spiceb_cloudpress_cta_customize_register' );
77
+ endif;
78
+
79
+ /**
80
+ * Add selective refresh for Front page section section controls.
81
+ */
82
+ function spiceb_cloudpress_register_home_cta_section_partials( $wp_customize ){
83
+
84
+ //cta
85
+ $wp_customize->selective_refresh->add_partial( 'home_cta_section_title', array(
86
+ 'selector' => '.section-module.cta .section-subtitle',
87
+ 'settings' => 'home_cta_section_title',
88
+ 'render_callback' => 'spiceb_cloudpress_cta_section_title_render_callback',
89
+
90
+ ) );
91
+
92
+ $wp_customize->selective_refresh->add_partial( 'home_cta_section_discription', array(
93
+ 'selector' => '.section-module.cta .section-title',
94
+ 'settings' => 'home_cta_section_discription',
95
+ 'render_callback' => 'spiceb_cloudpress_cta_section_discription_render_callback',
96
+
97
+ ) );
98
+
99
+ $wp_customize->selective_refresh->add_partial( 'home_cta_desc', array(
100
+ 'selector' => '.testmonial-block.text-center .text-white',
101
+ 'settings' => 'home_cta_desc',
102
+ 'render_callback' => 'spiceb_cloudpress_cta_desc_render_callback',
103
+
104
+ ) );
105
+
106
+ $wp_customize->selective_refresh->add_partial( 'home_cta_title', array(
107
+ 'selector' => '.section-module.cta .name',
108
+ 'settings' => 'home_cta_title',
109
+ 'render_callback' => 'spiceb_cloudpress_cta_title_render_callback',
110
+
111
+ ) );
112
+
113
+ $wp_customize->selective_refresh->add_partial( 'home_cta_btn', array(
114
+ 'selector' => '.section-module.cta .designation',
115
+ 'settings' => 'home_cta_btn',
116
+ 'render_callback' => 'spiceb_cloudpress_cta_designation_render_callback',
117
+
118
+ ) );
119
+
120
+ $wp_customize->selective_refresh->add_partial( 'home_cta_thumb', array(
121
+ 'selector' => '.section.cta-section .avatar ',
122
+ 'settings' => 'home_cta_thumb',
123
+
124
+ ) );
125
+ }
126
+
127
+ add_action( 'customize_register', 'spiceb_cloudpress_register_home_cta_section_partials' );
128
+
129
+ function spiceb_cloudpress_cta_section_title_render_callback() {
130
+ return get_theme_mod( 'home_cta_section_title' );
131
+ }
132
+
133
+ function spiceb_cloudpress_cta_section_discription_render_callback() {
134
+ return get_theme_mod( 'home_cta_section_discription' );
135
+ }
136
+
137
+ function spiceb_cloudpress_cta_desc_render_callback() {
138
+ return get_theme_mod( 'home_cta_desc' );
139
+ }
140
+
141
+ function spiceb_cloudpress_cta_title_render_callback() {
142
+ return get_theme_mod( 'home_cta_title' );
143
+ }
144
+
145
+ function spiceb_cloudpress_cta_designation_render_callback() {
146
+ return get_theme_mod( 'home_cta_btn' );
147
+ }
148
+ ?>
inc/cloudpress/features/feature-funfact-section.php ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! function_exists( 'spiceb_cloudpress_funfact_customize_register' ) ) :
3
+ function spiceb_cloudpress_funfact_customize_register($wp_customize){
4
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
5
+
6
+ /* funfacts section */
7
+ $wp_customize->add_section( 'funfacts_section' , array(
8
+ 'title' => __('Funfact Settings', 'spicebox'),
9
+ 'panel' => 'section_settings',
10
+ 'priority' => 3,
11
+ ) );
12
+
13
+ // Enable funfact
14
+ $wp_customize->add_setting( 'home_funfact_section_enabled' , array( 'default' => 'on') );
15
+ $wp_customize->add_control( 'home_funfact_section_enabled' , array(
16
+ 'label' => __( 'Enable funfacts on homepage', 'spicebox' ),
17
+ 'section' => 'funfacts_section',
18
+ 'type' => 'radio',
19
+ 'choices' => array(
20
+ 'on'=>__('ON', 'spicebox'),
21
+ 'off'=>__('OFF', 'spicebox')
22
+ )
23
+ ));
24
+
25
+ if ( class_exists( 'Cloudpress_Repeater' ) ) {
26
+ $wp_customize->add_setting( 'cloudpress_funfact_content', array(
27
+ ) );
28
+
29
+ $wp_customize->add_control( new Cloudpress_Repeater( $wp_customize, 'cloudpress_funfact_content', array(
30
+ 'label' => esc_html__( 'Funfact content', 'spicebox' ),
31
+ 'section' => 'funfacts_section',
32
+ 'priority' => 10,
33
+ 'add_field_label' => esc_html__( 'Add new Funfact', 'cloudpress' ),
34
+ 'item_name' => esc_html__( 'Funfact', 'cloudpress' ),
35
+ 'customizer_repeater_icon_control' => true,
36
+ 'customizer_repeater_title_control' => true,
37
+ 'customizer_repeater_text_control' => true,
38
+ ) ) );
39
+ }
40
+
41
+ //plus Button
42
+ class Honyepress_funfacts__section_upgrade extends WP_Customize_Control {
43
+ public function render_content() { ?>
44
+ <h3 class="customizer_cloudpressfunfact_upgrade_section" style="display: none;"> <?php _e('To add More funfact? Then','spicebox'); ?><a href="<?php echo esc_url( 'https://spicethemes.com/cloudpress-pro' ); ?>" target="_blank">
45
+ <?php _e('Upgrade to Plus','spicebox'); ?> </a>
46
+ </h3>
47
+ <?php
48
+ }
49
+ }
50
+
51
+ $wp_customize->add_setting( 'cloudpress_funfact_upgrade_to_pro', array(
52
+ 'capability' => 'edit_theme_options',
53
+ ));
54
+ $wp_customize->add_control(
55
+ new Honyepress_funfacts__section_upgrade(
56
+ $wp_customize,
57
+ 'cloudpress_funfact_upgrade_to_pro',
58
+ array(
59
+ 'section' => 'funfacts_section',
60
+ 'settings' => 'cloudpress_funfact_upgrade_to_pro',
61
+ )
62
+ )
63
+ );
64
+ //limit
65
+ class Honyepress_hidden_funfact_content extends WP_Customize_Control {
66
+ public function render_content() { ?>
67
+ <input type="hidden" value="4" id="cloudpress_funfact_limit"/>
68
+ <?php
69
+ }
70
+ }
71
+ $wp_customize->add_setting( 'cloudpress_hidden_funfact_to_pro', array(
72
+ 'capability' => 'edit_theme_options',
73
+ ));
74
+ $wp_customize->add_control(
75
+ new Honyepress_hidden_funfact_content(
76
+ $wp_customize,
77
+ 'cloudpress_hidden_to_pro',
78
+ array(
79
+ 'section' => 'funfacts_section',
80
+ 'settings' => 'cloudpress_hidden_funfact_to_pro',
81
+ )
82
+ )
83
+ );
84
+ }
85
+ add_action( 'customize_register', 'spiceb_cloudpress_funfact_customize_register' );
86
+ endif;
87
+
88
+ /**
89
+ * Add selective refresh for Front page section section controls.
90
+ */
91
+ function spiceb_cloudpress_register_home_funfact_section_partials( $wp_customize ){
92
+
93
+ //Slider section
94
+ $wp_customize->selective_refresh->add_partial( 'cloudpress_funfact_content', array(
95
+ 'selector' => '.funfact-section #funfact_content_section',
96
+ 'settings' => 'cloudpress_funfact_content',
97
+
98
+ ) );
99
+
100
+ //Slider section
101
+ $wp_customize->selective_refresh->add_partial( 'home_funfact_section_title', array(
102
+ 'selector' => '.section-module.funfacts .section-subtitle',
103
+ 'settings' => 'home_funfact_section_title',
104
+ 'render_callback' => 'spiceb_cloudpress_funfact_section_title_render_callback',
105
+
106
+ ) );
107
+
108
+ $wp_customize->selective_refresh->add_partial( 'home_funfact_section_discription', array(
109
+ 'selector' => '.section-module.funfacts .section-title',
110
+ 'settings' => 'home_funfact_section_discription',
111
+ 'render_callback' => 'spiceb_cloudpress_funfact_section_discription_render_callback',
112
+
113
+ ) );
114
+
115
+ }
116
+ add_action( 'customize_register', 'spiceb_cloudpress_register_home_funfact_section_partials' );
117
+
118
+ function spiceb_cloudpress_funfact_section_title_render_callback() {
119
+ return get_theme_mod( 'home_funfact_section_title' );
120
+ }
121
+
122
+ function spiceb_cloudpress_funfact_section_discription_render_callback() {
123
+ return get_theme_mod( 'home_funfact_section_discription' );
124
+ }
125
+ ?>
inc/cloudpress/features/feature-service-section.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! function_exists( 'spiceb_cloudpress_service_customize_register' ) ) :
3
+ function spiceb_cloudpress_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', 'spicebox'),
9
+ 'panel' => 'section_settings',
10
+ 'priority' => 3,
11
+ ) );
12
+
13
+ // Enable service
14
+ $wp_customize->add_setting( 'home_service_section_enabled' , array( 'default' => 'on') );
15
+ $wp_customize->add_control( 'home_service_section_enabled' , array(
16
+ 'label' => __( 'Enable Services on homepage', 'spicebox' ),
17
+ 'section' => 'services_section',
18
+ 'type' => 'radio',
19
+ 'choices' => array(
20
+ 'on'=>__('ON', 'spicebox'),
21
+ 'off'=>__('OFF', 'spicebox')
22
+ )
23
+ ));
24
+
25
+ // Service section title
26
+ $wp_customize->add_setting( 'home_service_section_title',array(
27
+ 'capability' => 'edit_theme_options',
28
+ 'default' => __('What we Offer?','spicebox'),
29
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
30
+ 'transport' => $selective_refresh,
31
+ ));
32
+ $wp_customize->add_control( 'home_service_section_title',array(
33
+ 'label' => __('Title','spicebox'),
34
+ 'section' => 'services_section',
35
+ 'type' => 'text',
36
+ ));
37
+
38
+ //room section discription
39
+ $wp_customize->add_setting( 'home_service_section_discription',array(
40
+ 'capability' => 'edit_theme_options',
41
+ 'default' => __('Why Choose Us','spicebox'),
42
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
43
+ 'transport' => $selective_refresh,
44
+ ));
45
+ $wp_customize->add_control( 'home_service_section_discription',array(
46
+ 'label' => __('Description','spicebox'),
47
+ 'section' => 'services_section',
48
+ 'type' => 'textarea',
49
+ ));
50
+
51
+ if ( class_exists( 'Cloudpress_Repeater' ) ) {
52
+ $wp_customize->add_setting( 'cloudpress_service_content', array(
53
+ ) );
54
+
55
+ $wp_customize->add_control( new Cloudpress_Repeater( $wp_customize, 'cloudpress_service_content', array(
56
+ 'label' => esc_html__( 'Service content', 'spicebox' ),
57
+ 'section' => 'services_section',
58
+ 'priority' => 10,
59
+ 'add_field_label' => esc_html__( 'Add new Service', 'spicebox' ),
60
+ 'item_name' => esc_html__( 'Service', 'spicebox' ),
61
+ 'customizer_repeater_icon_control' => true,
62
+ 'customizer_repeater_title_control' => true,
63
+ 'customizer_repeater_text_control' => true,
64
+ 'customizer_repeater_link_control' => true,
65
+ 'customizer_repeater_checkbox_control' => true,
66
+ 'customizer_repeater_image_control' => true,
67
+ ) ) );
68
+ }
69
+
70
+ //plus Button
71
+ class Honyepress_services__section_upgrade extends WP_Customize_Control {
72
+ public function render_content() { ?>
73
+ <h3 class="customizer_cloudpressservice_upgrade_section" style="display: none;"> <?php _e('To add More Service? Then','spicebox'); ?><a href="<?php echo esc_url( 'https://spicethemes.com/cloudpress-pro' ); ?>" target="_blank">
74
+ <?php _e('Upgrade to Plus','spicebox'); ?> </a>
75
+ </h3>
76
+ <?php
77
+ }
78
+ }
79
+
80
+ $wp_customize->add_setting( 'cloudpress_service_upgrade_to_pro', array(
81
+ 'capability' => 'edit_theme_options',
82
+ ));
83
+ $wp_customize->add_control(
84
+ new Honyepress_services__section_upgrade(
85
+ $wp_customize,
86
+ 'cloudpress_service_upgrade_to_pro',
87
+ array(
88
+ 'section' => 'services_section',
89
+ 'settings' => 'cloudpress_service_upgrade_to_pro',
90
+ )
91
+ )
92
+ );
93
+
94
+ // limit
95
+ class Honyepress_hidden_service_content extends WP_Customize_Control {
96
+ public function render_content() { ?>
97
+ <input type="hidden" value="3" id="cloudpress_service_limit"/>
98
+ <?php
99
+ }
100
+ }
101
+ $wp_customize->add_setting( 'cloudpress_hidden_service_to_pro', array(
102
+ 'capability' => 'edit_theme_options',
103
+ ));
104
+ $wp_customize->add_control(
105
+ new Honyepress_hidden_service_content(
106
+ $wp_customize,
107
+ 'cloudpress_hidden_service_to_pro',
108
+ array(
109
+ 'section' => 'services_section',
110
+ )
111
+ )
112
+ );
113
+ }
114
+ add_action( 'customize_register', 'spiceb_cloudpress_service_customize_register' );
115
+ endif;
116
+
117
+ /**
118
+ * Add selective refresh for Front page section section controls.
119
+ */
120
+ function spiceb_cloudpress_register_home_service_section_partials( $wp_customize ){
121
+
122
+ //Slider section
123
+ $wp_customize->selective_refresh->add_partial( 'cloudpress_service_content', array(
124
+ 'selector' => '.service-section #service_content_section',
125
+ 'settings' => 'cloudpress_service_content',
126
+
127
+ ) );
128
+
129
+ //Slider section
130
+ $wp_customize->selective_refresh->add_partial( 'home_service_section_title', array(
131
+ 'selector' => '.section-module.services .section-subtitle',
132
+ 'settings' => 'home_service_section_title',
133
+ 'render_callback' => 'spiceb_cloudpress_service_section_title_render_callback',
134
+
135
+ ) );
136
+
137
+ $wp_customize->selective_refresh->add_partial( 'home_service_section_discription', array(
138
+ 'selector' => '.section-module.services .section-title',
139
+ 'settings' => 'home_service_section_discription',
140
+ 'render_callback' => 'spiceb_cloudpress_service_section_discription_render_callback',
141
+
142
+ ) );
143
+
144
+ }
145
+ add_action( 'customize_register', 'spiceb_cloudpress_register_home_service_section_partials' );
146
+
147
+ function spiceb_cloudpress_service_section_title_render_callback() {
148
+ return get_theme_mod( 'home_service_section_title' );
149
+ }
150
+
151
+ function spiceb_cloudpress_service_section_discription_render_callback() {
152
+ return get_theme_mod( 'home_service_section_discription' );
153
+ }
154
+ ?>
inc/cloudpress/features/feature-slider-section.php ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( ! function_exists( 'spiceb_cloudpress_slider_customize_register' ) ) :
2
+ function spiceb_cloudpress_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', 'spicebox'),
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', 'spicebox' ),
16
+ 'section' => 'slider_section',
17
+ 'type' => 'radio',
18
+ 'choices' => array(
19
+ 'on'=>__('ON', 'spicebox'),
20
+ 'off'=>__('OFF', 'spicebox')
21
+ )
22
+ ));
23
+
24
+
25
+ //Slider Image
26
+ $wp_customize->add_setting( 'home_slider_image',array('default' => SPICEB_PLUGIN_URL .'inc/cloudpress/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','spicebox'),
36
+ 'settings' =>'home_slider_image',
37
+ 'section' => 'slider_section',
38
+
39
+ )
40
+ )
41
+ );
42
+
43
+ // Image overlay
44
+ $wp_customize->add_setting( 'slider_image_overlay', array(
45
+ 'default' => true,
46
+ 'sanitize_callback' => 'sanitize_text_field',
47
+ ) );
48
+
49
+ $wp_customize->add_control('slider_image_overlay', array(
50
+ 'label' => __('Enable slider image overlay', 'spicebox' ),
51
+ 'section' => 'slider_section',
52
+ 'type' => 'checkbox',
53
+ ) );
54
+
55
+
56
+ //Slider Background Overlay Color
57
+ $wp_customize->add_setting( 'slider_overlay_section_color', array(
58
+ 'sanitize_callback' => 'sanitize_text_field',
59
+ 'default' => 'rgba(0,0,0,0.6)',
60
+ ) );
61
+
62
+ $wp_customize->add_control(new Cloudpress_Customize_Alpha_Color_Control( $wp_customize,'slider_overlay_section_color', array(
63
+ 'label' => __('Slider image overlay color','spicebox' ),
64
+ 'palette' => true,
65
+ 'section' => 'slider_section')
66
+ ) );
67
+
68
+
69
+ // Slider title
70
+ $wp_customize->add_setting( 'home_slider_title',array(
71
+ 'default' => __('Start Building Your Website','spicebox'),
72
+ 'capability' => 'edit_theme_options',
73
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
74
+ 'transport' => $selective_refresh,
75
+ ));
76
+ $wp_customize->add_control( 'home_slider_title',array(
77
+ 'label' => __('Title','spicebox'),
78
+ 'section' => 'slider_section',
79
+ 'type' => 'text',
80
+ ));
81
+
82
+ //Slider discription
83
+ $wp_customize->add_setting( 'home_slider_discription',array(
84
+ 'default' => __('Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim <br> mei ludus efficiendi ei sea summo mazim ex.','spicebox'),
85
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
86
+ 'transport' => $selective_refresh,
87
+ ));
88
+ $wp_customize->add_control( 'home_slider_discription',array(
89
+ 'label' => __('Description','spicebox'),
90
+ 'section' => 'slider_section',
91
+ 'type' => 'textarea',
92
+ ));
93
+
94
+
95
+ // Slider button text
96
+ $wp_customize->add_setting( 'home_slider_btn_txt',array(
97
+ 'default' => __('Read More','spicebox'),
98
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
99
+ 'transport' => $selective_refresh,
100
+ ));
101
+ $wp_customize->add_control( 'home_slider_btn_txt',array(
102
+ 'label' => __('Button Text','spicebox'),
103
+ 'section' => 'slider_section',
104
+ 'type' => 'text',
105
+ ));
106
+
107
+ // Slider button link
108
+ $wp_customize->add_setting( 'home_slider_btn_link',array(
109
+ 'default' => __('#','spicebox'),
110
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
111
+ 'transport' => $selective_refresh,
112
+ ));
113
+ $wp_customize->add_control( 'home_slider_btn_link',array(
114
+ 'label' => __('Button Link','spicebox'),
115
+ 'section' => 'slider_section',
116
+ 'type' => 'text',
117
+ ));
118
+
119
+ // Slider button target
120
+ $wp_customize->add_setting(
121
+ 'home_slider_btn_target',
122
+ array(
123
+ 'default' => false,
124
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
125
+ ));
126
+ $wp_customize->add_control('home_slider_btn_target', array(
127
+ 'label' => __('Open link in new tab', 'spicebox'),
128
+ 'section' => 'slider_section',
129
+ 'type' => 'checkbox',
130
+ ));
131
+
132
+ // Slider button2 text
133
+ $wp_customize->add_setting( 'home_slider_btn_txt2',array(
134
+ 'default' => __('About Us','spicebox'),
135
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
136
+ 'transport' => $selective_refresh,
137
+ ));
138
+ $wp_customize->add_control( 'home_slider_btn_txt2',array(
139
+ 'label' => __('Button 2 Text','spicebox'),
140
+ 'section' => 'slider_section',
141
+ 'type' => 'text',
142
+ ));
143
+
144
+ // Slider button link
145
+ $wp_customize->add_setting( 'home_slider_btn_link2',array(
146
+ 'default' => __('#','spicebox'),
147
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
148
+ 'transport' => $selective_refresh,
149
+ ));
150
+ $wp_customize->add_control( 'home_slider_btn_link2',array(
151
+ 'label' => __('Button 2 Link','spicebox'),
152
+ 'section' => 'slider_section',
153
+ 'type' => 'text',
154
+ ));
155
+
156
+ // Slider button target
157
+ $wp_customize->add_setting(
158
+ 'home_slider_btn_target2',
159
+ array(
160
+ 'default' => false,
161
+ 'sanitize_callback' => 'spiceb_cloudpress_home_page_sanitize_text',
162
+ ));
163
+ $wp_customize->add_control('home_slider_btn_target2', array(
164
+ 'label' => __('Open link in new tab', 'spicebox'),
165
+ 'section' => 'slider_section',
166
+ 'type' => 'checkbox',
167
+ ));
168
+ }
169
+
170
+ add_action( 'customize_register', 'spiceb_cloudpress_slider_customize_register' );
171
+ endif;
172
+
173
+ /**
174
+ * Add selective refresh for Front page section section controls.
175
+ */
176
+ function spiceb_cloudpress_register_home_slider_section_partials( $wp_customize )
177
+ {
178
+ $wp_customize->selective_refresh->add_partial( 'home_slider_image', array(
179
+ 'selector' => '.slider .item',
180
+ 'settings' => 'home_slider_image',
181
+
182
+ ) );
183
+
184
+ //Slider section
185
+ $wp_customize->selective_refresh->add_partial( 'home_slider_title', array(
186
+ 'selector' => '.caption-content.text-center .title',
187
+ 'settings' => 'home_slider_title',
188
+ 'render_callback' => 'spiceb_cloudpress_slider_section_title_render_callback',
189
+ ) );
190
+
191
+ $wp_customize->selective_refresh->add_partial( 'home_slider_discription', array(
192
+ 'selector' => '.caption-content.text-center .description',
193
+ 'settings' => 'home_slider_discription',
194
+ 'render_callback' => 'spiceb_cloudpress_slider_section_discription_render_callback',
195
+
196
+ ) );
197
+
198
+ $wp_customize->selective_refresh->add_partial( 'home_slider_btn_txt', array(
199
+ 'selector' => '.caption-content.text-center .btn-small.btn-default',
200
+ 'settings' => 'home_slider_btn_txt',
201
+ 'render_callback' => 'spiceb_cloudpress_slider_btn_render_callback',
202
+
203
+ ) );
204
+
205
+ $wp_customize->selective_refresh->add_partial( 'home_slider_btn_txt2', array(
206
+ 'selector' => '.about-tbn',
207
+ 'settings' => 'home_slider_btn_txt2',
208
+ 'render_callback' => 'spiceb_cloudpress_slider_btn2_render_callback',
209
+ ) );
210
+ }
211
+
212
+ add_action( 'customize_register', 'spiceb_cloudpress_register_home_slider_section_partials' );
213
+
214
+
215
+ function spiceb_cloudpress_slider_section_title_render_callback() {
216
+ return get_theme_mod( 'home_slider_title' );
217
+ }
218
+
219
+ function spiceb_cloudpress_slider_section_discription_render_callback() {
220
+ return get_theme_mod( 'home_slider_discription' );
221
+ }
222
+
223
+ function spiceb_cloudpress_slider_btn_render_callback() {
224
+ return get_theme_mod( 'home_slider_btn_txt' );
225
+ }
226
+
227
+ function spiceb_cloudpress_slider_btn2_render_callback() {
228
+ return get_theme_mod( 'home_slider_btn_txt2' );
229
+ }
inc/cloudpress/images/logo.png ADDED
Binary file
inc/cloudpress/images/slider/aa.jpg ADDED
Binary file
inc/cloudpress/images/slider/slider.jpg ADDED
Binary file
inc/cloudpress/sections/cloudpress-cta-section.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * CTA section for the homepage.
4
+ */
5
+ if ( ! function_exists( 'spiceb_cloudpress_cta' ) ) :
6
+ function spiceb_cloudpress_cta() {
7
+
8
+ $cta_section_enable = get_theme_mod('cta_section_enable','on');
9
+ if($cta_section_enable !='off')
10
+ {
11
+ ?>
12
+ <section class="section-module call-to-action-one" id="features">
13
+ <div class="container">
14
+ <?php
15
+ $home_cta_section_title = get_theme_mod('home_cta_section_title',__('Want to Work With Us?','spicebox'));
16
+ $home_cta_section_discription = get_theme_mod('home_cta_section_discription',__('Choose a package that suits your every need for building a website.','spicebox'));
17
+ $home_cta_btn= get_theme_mod('home_cta_btn',__('Contact Us','spicebox'));?>
18
+ <div class="row">
19
+ <div class="col-md-9 col-sm-9 col-xs-12">
20
+ <div class="text-left">
21
+ <?php if(!empty($home_cta_section_title)):?><h3 class="title"><?php echo $home_cta_section_title; ?></h3><?php endif;?>
22
+ <?php if(!empty($home_cta_section_discription)):?><p><?php echo $home_cta_section_discription; ?></p><?php endif;?>
23
+ </div>
24
+ </div>
25
+ <?php if(!empty($home_cta_btn)):?>
26
+ <div class="col-md-3 col-sm-3 col-xs-12">
27
+ <div class="ptop-15 pbottom-5"><a href="<?php echo get_theme_mod('home_cta_btn_link','#');?>" class="btn-small btn-animate border btn-shadow-lg"><?php echo $home_cta_btn; ?></a></div>
28
+ </div>
29
+ <?php endif;?>
30
+ </div>
31
+
32
+
33
+ </div>
34
+ </section>
35
+ <?php }
36
+ }
37
+ endif;
38
+ if ( function_exists( 'spiceb_cloudpress_cta' ) ) {
39
+ $section_priority = apply_filters( 'cloudpress_section_priority', 2, 'spiceb_cloudpress_cta' );
40
+ add_action( 'spiceb_cloudpress_sections', 'spiceb_cloudpress_cta', absint( $section_priority ) );
41
+ }
inc/cloudpress/sections/cloudpress-funfact-section.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * funfacts section for the homepage.
4
+ */
5
+ if ( ! function_exists( 'spiceb_cloudpress_funfact' ) ) :
6
+
7
+ function spiceb_cloudpress_funfact() {
8
+
9
+ $home_funfact_section_enabled = get_theme_mod('home_funfact_section_enabled','on');
10
+ $cloudpress_funfact_content = get_theme_mod( 'cloudpress_funfact_content', spiceb_cloudpress_get_funfact_default() );
11
+ if($home_funfact_section_enabled !='off')
12
+ {
13
+ ?>
14
+ <section class="section-module funfact bg-default" id="funfacts">
15
+ <div class="container">
16
+ <?php
17
+ spiceb_cloudpress_funfact_content( $cloudpress_funfact_content );
18
+ ?>
19
+ </div>
20
+ </section>
21
+ <?php } }
22
+ endif;
23
+
24
+ function spiceb_cloudpress_funfact_content( $cloudpress_funfact_content, $is_callback = false ) {
25
+ if ( ! $is_callback ) {
26
+ ?>
27
+ <?php
28
+ }
29
+ if ( ! empty( $cloudpress_funfact_content ) ) :
30
+
31
+ $allowed_html = array(
32
+ 'br' => array(),
33
+ 'em' => array(),
34
+ 'strong' => array(),
35
+ 'b' => array(),
36
+ 'i' => array(),
37
+ );
38
+
39
+ $cloudpress_funfact_content = json_decode( $cloudpress_funfact_content );
40
+ if ( ! empty( $cloudpress_funfact_content ) ) {
41
+ $i = 1;
42
+ echo '<div class="row">';
43
+ foreach ( $cloudpress_funfact_content as $funfact_item ) :
44
+ $icon = ! empty( $funfact_item->icon_value ) ? $funfact_item->icon_value : '';
45
+ $image = ! empty( $funfact_item->image_url ) ? $funfact_item->image_url: '';
46
+ $title = ! empty( $funfact_item->title ) ? $funfact_item->title : '';
47
+ $text = ! empty( $funfact_item->text ) ? $funfact_item->text : '';
48
+ $link = ! empty( $funfact_item->link ) ? $funfact_item->link : '';
49
+ $color = ! empty( $funfact_item->color ) ? $funfact_item->color : '';
50
+ $choice = ! empty( $funfact_item->choice ) ? $funfact_item->choice : 'customizer_repeater_icon';
51
+ $open_new_tab = ! empty( $funfact_item->open_new_tab ) ? $funfact_item->open_new_tab : 'no';
52
+
53
+ ?>
54
+ <div class="col-md-3 col-sm-6 col-xs-12">
55
+ <div class="funfact-inner text-center">
56
+ <?php if($choice == 'customizer_repeater_icon'){ ?>
57
+ <i class="fa fa <?php echo esc_html( $icon ); ?> funfact-icon"></i>
58
+ <?php } ?>
59
+ <?php if(!empty($title)):?>
60
+ <h2 class="funfact-title"><?php echo esc_html( $title ); ?></h2>
61
+ <?php endif;?>
62
+ <?php if(!empty($text)):?>
63
+ <p class="description"><?php echo wp_kses( html_entity_decode( $text ), $allowed_html ); ?></p>
64
+ <?php endif;?>
65
+ </div>
66
+ </div>
67
+
68
+
69
+
70
+
71
+ <?php
72
+ if ( $i % apply_filters( 'cloudpress_funfact_per_row_no', 4 ) == 0 ) {
73
+ echo '</div><!-- /.row -->';
74
+ echo '<div class="row">';
75
+ }
76
+ $i++;
77
+
78
+ endforeach;
79
+ echo '</div>';
80
+ }// End if().
81
+ endif;
82
+ if ( ! $is_callback ) {
83
+ ?>
84
+ <?php
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Get default values for funfact section.
90
+ *
91
+ * @since 1.1.31
92
+ * @access public
93
+ */
94
+ function spiceb_cloudpress_get_funfact_default() {
95
+
96
+ return apply_filters(
97
+ 'cloudpress_funfact_content', json_encode(
98
+ array(
99
+ array(
100
+ 'icon_value' => 'fa-laptop',
101
+ 'title' => esc_html__( '1250', 'spicebox' ),
102
+ 'text' => esc_html__( 'Our Projects', 'spicebox' ),
103
+ 'choice' => 'customizer_repeater_icon',
104
+ 'link' => '#',
105
+ 'open_new_tab' => 'no',
106
+ ),
107
+ array(
108
+ 'icon_value' => 'fa fa-cogs',
109
+ 'title' => esc_html__( '879', 'spicebox' ),
110
+ 'text' => 'Finish Project', 'spicebox',
111
+ 'choice' => 'customizer_repeater_icon',
112
+ 'link' => '#',
113
+ 'open_new_tab' => 'no',
114
+ ),
115
+ array(
116
+ 'icon_value' => 'fa fa-handshake-o funfact-icon',
117
+ 'title' => esc_html__( '687', 'spicebox' ),
118
+ 'text' => esc_html__( 'Business Partners', 'spicebox' ),
119
+ 'choice' => 'customizer_repeater_icon',
120
+ 'link' => '#',
121
+ 'open_new_tab' => 'no',
122
+ ),
123
+ array(
124
+ 'icon_value' => 'fa fa-smile-o funfact-icon',
125
+ 'title' => esc_html__( '3578', 'spicebox' ),
126
+ 'text' => esc_html__( 'Clients Review', 'spicebox' ),
127
+ 'choice' => 'customizer_repeater_icon',
128
+ 'link' => '#',
129
+ 'open_new_tab' => 'no',
130
+ ),
131
+ )
132
+ )
133
+ );
134
+ }
135
+
136
+ if ( function_exists( 'spiceb_cloudpress_funfact' ) ) {
137
+ $section_priority = apply_filters( 'cloudpress_section_priority', 3, 'spiceb_cloudpress_funfact' );
138
+ add_action( 'spiceb_cloudpress_sections', 'spiceb_cloudpress_funfact', absint( $section_priority ) );
139
+ }
inc/cloudpress/sections/cloudpress-service-section.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Services section for the homepage.
4
+ */
5
+ if ( ! function_exists( 'spiceb_cloudpress_service' ) ) :
6
+
7
+ function spiceb_cloudpress_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?','spicebox'));
11
+ $home_service_section_discription = get_theme_mod('home_service_section_discription',__('Why Choose Us','spicebox'));
12
+ $cloudpress_service_content = get_theme_mod( 'cloudpress_service_content', spiceb_cloudpress_get_service_default() );
13
+ $section_is_empty = empty( $cloudpress_service_content ) && empty( $home_service_section_discription ) && empty( $home_service_section_title );
14
+ if($home_service_section_enabled !='off')
15
+ {
16
+ ?>
17
+ <section class="section-module services" id="services">
18
+ <div class="container">
19
+ <?php if( ($home_service_section_title) || ($home_service_section_discription)!='' ) { ?>
20
+ <div class="row">
21
+ <div class="col-lg-12 col-md-12 col-xs-12">
22
+ <div class="section-header text-center">
23
+ <?php if ( ! empty( $home_service_section_title ) || is_customize_preview() ) : ?>
24
+ <h5 class="section-subtitle">
25
+ <?php echo $home_service_section_title; ?>
26
+ </h5>
27
+ <?php endif; ?>
28
+ <?php if($home_service_section_discription) {?>
29
+ <h2 class="section-title">
30
+ <?php echo $home_service_section_discription; ?>
31
+ </h2>
32
+ <?php } ?>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ <?php }
37
+ spiceb_cloudpress_service_content( $cloudpress_service_content );
38
+ ?>
39
+ </div>
40
+ </section>
41
+ <?php } }
42
+ endif;
43
+
44
+ function spiceb_cloudpress_service_content( $cloudpress_service_content, $is_callback = false ) {
45
+ if ( ! $is_callback ) {
46
+ ?>
47
+ <?php
48
+ }
49
+ if ( ! empty( $cloudpress_service_content ) ) :
50
+
51
+ $allowed_html = array(
52
+ 'br' => array(),
53
+ 'em' => array(),
54
+ 'strong' => array(),
55
+ 'b' => array(),
56
+ 'i' => array(),
57
+ );
58
+
59
+ $cloudpress_service_content = json_decode( $cloudpress_service_content );
60
+ if ( ! empty( $cloudpress_service_content ) ) {
61
+ $i = 1;
62
+ echo '<div class="row">';
63
+ foreach ( $cloudpress_service_content as $service_item ) :
64
+ $icon = ! empty( $service_item->icon_value ) ? $service_item->icon_value : '';
65
+ $image = ! empty( $service_item->image_url ) ? $service_item->image_url: '';
66
+ $title = ! empty( $service_item->title ) ? $service_item->title : '';
67
+ $text = ! empty( $service_item->text ) ? $service_item->text : '';
68
+ $link = ! empty( $service_item->link ) ? $service_item->link : '';
69
+ $color = ! empty( $service_item->color ) ? $service_item->color : '';
70
+ $choice = ! empty( $service_item->choice ) ? $service_item->choice : 'customizer_repeater_icon';
71
+ $open_new_tab = ! empty( $service_item->open_new_tab ) ? $service_item->open_new_tab : 'no';
72
+
73
+ ?>
74
+ <div class="col-md-4 col-sm-6 col-xs-12">
75
+ <article class="post text-center">
76
+ <?php if($choice == 'customizer_repeater_image'){ ?>
77
+ <?php if ( ! empty( $image ) ) : ?>
78
+ <figure class="post-thumbnail">
79
+
80
+ <?php if ( ! empty( $link ) ) : ?>
81
+ <a href="<?php echo esc_url( $link ); ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?>>
82
+ <?php endif; ?>
83
+ <img class="services_cols_mn_icon"
84
+ src="<?php echo esc_url( $image ); ?>" <?php if ( ! empty( $title ) ) : ?> alt="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" <?php endif; ?> />
85
+ <?php if ( ! empty( $link ) ) : ?>
86
+ </a>
87
+ <?php endif; ?>
88
+ <?php endif; ?>
89
+ </figure>
90
+ <?php } ?>
91
+
92
+ <?php if($choice == 'customizer_repeater_icon'){ ?>
93
+ <?php if ( ! empty( $icon ) ) :?>
94
+ <figure class="post-thumbnail">
95
+ <?php if ( ! empty( $link ) ) : ?>
96
+ <a href="<?php echo esc_url( $link ); ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?> >
97
+ <?php endif; ?>
98
+
99
+ <i class="fa <?php echo esc_html( $icon ); ?> txt-pink"></i>
100
+ <?php if ( ! empty( $link ) ) : ?>
101
+ </a>
102
+ <?php endif; ?>
103
+ </figure>
104
+ <?php endif; ?>
105
+ <?php } ?>
106
+
107
+ <?php if ( ! empty( $title ) ) : ?>
108
+ <div class="entry-header">
109
+ <h5 class="entry-title"><?php if ( ! empty( $link ) ) : ?>
110
+ <a href="<?php echo esc_url( $link ); ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?> ><?php endif; ?><?php echo esc_html( $title ); ?><?php if ( ! empty( $link ) ) : ?></a>
111
+ <?php endif; ?>
112
+ </h5>
113
+ </div>
114
+
115
+ <?php endif; ?>
116
+ <?php if ( ! empty( $link ) ) : ?>
117
+ </a>
118
+ <?php endif; ?>
119
+ <?php if ( ! empty( $text ) ) : ?>
120
+
121
+ <div class="entry-content">
122
+ <p><?php echo wp_kses( html_entity_decode( $text ), $allowed_html ); ?></p>
123
+ </div>
124
+ <?php endif; ?>
125
+ </article>
126
+ </div>
127
+
128
+
129
+
130
+
131
+ <?php
132
+ if ( $i % apply_filters( 'cloudpress_service_per_row_no', 3 ) == 0 ) {
133
+ echo '</div><!-- /.row -->';
134
+ echo '<div class="row">';
135
+ }
136
+ $i++;
137
+
138
+ endforeach;
139
+ echo '</div>';
140
+ }// End if().
141
+ endif;
142
+ if ( ! $is_callback ) {
143
+ ?>
144
+ <?php
145
+ }
146
+ }
147
+
148
+ /**
149
+ * Get default values for service section.
150
+ *
151
+ * @since 1.1.31
152
+ * @access public
153
+ */
154
+ function spiceb_cloudpress_get_service_default() {
155
+
156
+ return apply_filters(
157
+ 'cloudpress_service_content', json_encode(
158
+ array(
159
+ array(
160
+ 'icon_value' => 'fa-laptop',
161
+ 'title' => esc_html__( 'Responsive Design', 'spicebox' ),
162
+ 'text' => 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem amet dolore ut labore et tempor', 'spicebox',
163
+ 'choice' => 'customizer_repeater_icon',
164
+ 'link' => '#',
165
+ 'open_new_tab' => 'no',
166
+ ),
167
+ array(
168
+ 'icon_value' => 'fa fa-cogs',
169
+ 'title' => esc_html__( 'Multi-Purpose', 'spicebox' ),
170
+ 'text' => 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem amet dolore ut labore et tempor', 'spicebox',
171
+ 'choice' => 'customizer_repeater_icon',
172
+ 'link' => '#',
173
+ 'open_new_tab' => 'no',
174
+ ),
175
+ array(
176
+ 'icon_value' => 'fa fa-cog',
177
+ 'title' => esc_html__( 'Powerful Options', 'spicebox' ),
178
+ 'text' => 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem amet dolore ut labore et tempor',
179
+ 'choice' => 'customizer_repeater_icon',
180
+ 'link' => '#',
181
+ 'open_new_tab' => 'no',
182
+ ),
183
+ )
184
+ )
185
+ );
186
+ }
187
+
188
+ if ( function_exists( 'spiceb_cloudpress_service' ) ) {
189
+ $section_priority = apply_filters( 'cloudpress_section_priority', 3, 'spiceb_cloudpress_service' );
190
+ add_action( 'spiceb_cloudpress_sections', 'spiceb_cloudpress_service', absint( $section_priority ) );
191
+ }
inc/cloudpress/sections/cloudpress-slider-section.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Slider section for the homepage.
4
+ */
5
+ if ( ! function_exists( 'spiceb_cloudpress_slider' ) ) :
6
+
7
+ function spiceb_cloudpress_slider() {
8
+
9
+ $home_slider_image = get_theme_mod('home_slider_image',SPICEB_PLUGIN_URL .'inc/cloudpress/images/slider/slider.jpg');
10
+ $home_slider_title = get_theme_mod('home_slider_title',__('Start Building Your Website','spicebox'));
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 <br> mei ludus efficiendi ei sea summo mazim ex.','spicebox'));
13
+ $home_slider_btn_txt = get_theme_mod('home_slider_btn_txt',__('Read More','spicebox'));
14
+ $home_slider_btn_link = get_theme_mod('home_slider_btn_link',__(esc_url('#'),'spicebox'));
15
+ $home_slider_btn_target = get_theme_mod('home_slider_btn_target',false);
16
+
17
+ $home_slider_btn_txt2 = get_theme_mod('home_slider_btn_txt2',__('About Us','spicebox'));
18
+ $home_slider_btn_link2 = get_theme_mod('home_slider_btn_link2',__(esc_url('#'),'spicebox'));
19
+ $home_slider_btn_target2 = get_theme_mod('home_slider_btn_target2',false);
20
+
21
+ $home_page_slider_enabled = get_theme_mod('home_page_slider_enabled','on');
22
+ if($home_page_slider_enabled !='off') {
23
+ ?>
24
+ <section class="main-slider">
25
+ <div class="home-section home-full-height" style="background-image:url(<?php echo $home_slider_image; ?>);">
26
+ <?php $slider_image_overlay = get_theme_mod('slider_image_overlay',true);
27
+ $slider_overlay_section_color = get_theme_mod('slider_overlay_section_color','rgba(0,0,0,0.6)');
28
+ if($slider_image_overlay != false) { ?>
29
+ <div class="overlay" style="background-color:<?php echo $slider_overlay_section_color;?>"></div>
30
+ <?php } ?>
31
+ <div class="container slider-caption">
32
+ <div class="caption-content">
33
+
34
+ <?php if ( ! empty( $home_slider_title ) || is_customize_preview() ) { ?>
35
+ <h1 class="title"><?php echo $home_slider_title; ?></h1>
36
+ <?php }
37
+ if ( ! empty( $home_slider_discription ) || is_customize_preview() ) {
38
+ ?>
39
+ <p class="description"><?php echo $home_slider_discription; ?></p>
40
+ <?php } ?>
41
+
42
+ <div class="btn-combo mt-5">
43
+ <?php if(!empty($home_slider_btn_txt)):?>
44
+ <a <?php if($home_slider_btn_link) { ?> href="<?php echo $home_slider_btn_link; } ?>"
45
+ <?php if($home_slider_btn_target) { ?> target="_blank" <?php } ?> class="btn-small btn-animate border btn-default">
46
+ <?php if($home_slider_btn_txt) { echo $home_slider_btn_txt; } ?></a>
47
+ <?php endif;?>
48
+ <?php
49
+ if(!empty($home_slider_btn_txt2)):?>
50
+ <a <?php if($home_slider_btn_link2) { ?> href="<?php echo $home_slider_btn_link2; } ?>"
51
+ <?php if($home_slider_btn_target2) { ?> target="_blank" <?php } ?> class="btn-small btn-animate slidbtn btn-light">
52
+ <?php if($home_slider_btn_txt2) { echo $home_slider_btn_txt2; } ?></a>
53
+ <?php endif;?>
54
+ </div>
55
+ <?php } ?>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </section>
60
+ <?php
61
+ }
62
+ endif;
63
+ if ( function_exists( 'spiceb_cloudpress_slider' ) ) {
64
+ $section_priority = apply_filters( 'cloudpress_section_priority', 1, 'spiceb_cloudpress_slider' );
65
+ add_action( 'spiceb_cloudpress_sections', 'spiceb_cloudpress_slider', absint( $section_priority ) );
66
+ }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: spicethemes
3
  Tags: widget, admin, widgets
4
  Requires at least: 3.3+
5
  Tested up to: 5.2.3
6
- Stable tag: 1.1.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -166,4 +166,7 @@ This plugin create repeater controls in the customizer settings allowing you to
166
 
167
  = 1.1.6 =
168
  1. Added HoneyPress Pro link.
169
- 2. Modify code in service section
 
 
 
3
  Tags: widget, admin, widgets
4
  Requires at least: 3.3+
5
  Tested up to: 5.2.3
6
+ Stable tag: 1.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
166
 
167
  = 1.1.6 =
168
  1. Added HoneyPress Pro link.
169
+ 2. Modify code in service section
170
+
171
+ = 1.2 =
172
+ 1. Added Cloudpress theme code.
spicebox.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SpiceBox
4
  Plugin URI:
5
  Description: Enhances SpiceThemes with extra functionality.
6
- Version: 1.1.6
7
  Author: Spicethemes
8
  Author URI: https://github.com
9
  Text Domain: spicebox
@@ -35,6 +35,17 @@ function spiceb_activate() {
35
  require_once('inc/honeypress/sections/honeypress-testimonail-section.php');
36
  require_once('inc/honeypress/customizer.php');
37
  }
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  if ( 'Chilly' == $theme->name || 'SpiceBlue' == $theme->name){
40
  require_once('inc/spicepress/features/feature-service-section.php');
@@ -172,6 +183,21 @@ $item_details_page = get_option('item_details_page');
172
  }
173
  }
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
 
176
  //Innofit
177
  if ( 'Innofit' == $theme->name || 'Innofit Child' == $theme->name){
@@ -211,6 +237,13 @@ function spiceb_honeypress_home_page_sanitize_text( $input ) {
211
 
212
  }
213
 
 
 
 
 
 
 
 
214
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
215
 
216
 
3
  Plugin Name: SpiceBox
4
  Plugin URI:
5
  Description: Enhances SpiceThemes with extra functionality.
6
+ Version: 1.2
7
  Author: Spicethemes
8
  Author URI: https://github.com
9
  Text Domain: spicebox
35
  require_once('inc/honeypress/sections/honeypress-testimonail-section.php');
36
  require_once('inc/honeypress/customizer.php');
37
  }
38
+ if ( 'CloudPress' == $theme->name ){
39
+ require_once('inc/cloudpress/features/feature-slider-section.php');
40
+ require_once('inc/cloudpress/features/feature-cta-section.php');
41
+ require_once('inc/cloudpress/features/feature-service-section.php');
42
+ require_once('inc/cloudpress/features/feature-funfact-section.php');
43
+ require_once('inc/cloudpress/sections/cloudpress-slider-section.php');
44
+ require_once('inc/cloudpress/sections/cloudpress-cta-section.php');
45
+ require_once('inc/cloudpress/sections/cloudpress-service-section.php');
46
+ require_once('inc/cloudpress/sections/cloudpress-funfact-section.php');
47
+ require_once('inc/cloudpress/customizer.php');
48
+ }
49
 
50
  if ( 'Chilly' == $theme->name || 'SpiceBlue' == $theme->name){
51
  require_once('inc/spicepress/features/feature-service-section.php');
183
  }
184
  }
185
 
186
+ //CloudPress
187
+ if ( 'CloudPress' == $theme->name ){
188
+ register_activation_hook( __FILE__, 'spiceb_cloudpress_install_function');
189
+ function spiceb_cloudpress_install_function()
190
+ {
191
+ $item_details_page = get_option('item_details_page');
192
+ if(!$item_details_page){
193
+ require_once('inc/cloudpress/default-pages/upload-media.php');
194
+ require_once('inc/cloudpress/default-pages/home-page.php');
195
+ require_once('inc/cloudpress/default-pages/blog-page.php');
196
+ require_once('inc/cloudpress/default-widgets/default-widget.php');
197
+ update_option( 'item_details_page', 'Done' );
198
+ }
199
+ }
200
+ }
201
 
202
  //Innofit
203
  if ( 'Innofit' == $theme->name || 'Innofit Child' == $theme->name){
237
 
238
  }
239
 
240
+ //Sanatize for CloudPress theme
241
+ function spiceb_cloudpress_home_page_sanitize_text( $input ) {
242
+
243
+ return wp_kses_post( force_balance_tags( $input ) );
244
+
245
+ }
246
+
247
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
248
 
249