PluginProbe
SpiceBox / 0.6
SpiceBox v0.6
trunk 0.2.2 0.2.3 0.2.4 0.2.5 0.2.6 0.2.7 0.2.8 0.2.9 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.3.5 0.3.6 0.3.7 0.3.8 0.3.9.1 0.3.9.2 0.4 0.5 0.6 0.7 1.0 All 76 releases
spicebox / spicebox.php

spicebox.php in SpiceBox 0.6, at spicebox.php

161 lines 5.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: SpiceBox
4 Plugin URI:
5 Description: Enhances SpiceThemes with extra functionality.
6 Version: 0.6
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 || 'Rockers' == $theme->name || 'Content' == $theme->name || 'Certify' == $theme->name || 'Stacy' == $theme->name || 'SpicePress Child Theme' == $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 if ( 'Chilly' == $theme->name || 'SpiceBlue' == $theme->name){
30 require_once('inc/spicepress/features/feature-service-section.php');
31 require_once('inc/spicepress/features/feature-portfolio-section.php');
32 require_once('inc/spicepress/features/feature-testimonial-section.php');
33 require_once('inc/spicepress/sections/spicepress-features-section.php');
34 require_once('inc/spicepress/sections/spicepress-portfolio-section.php');
35 require_once('inc/spicepress/sections/spicepress-testimonail-section.php');
36 require_once('inc/spicepress/customizer.php');
37 }
38
39 if ( 'Innofit' == $theme->name){
40
41
42 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
43
44
45 if ( ! is_plugin_active( 'innofit-plus/innofit-plus.php' ) ):
46
47
48 if ( ! function_exists( 'spiceb_innofit_customize_register' ) ) :
49 function spiceb_innofit_customize_register($wp_customize){
50
51 $sections_customizer_data = array('slider','services','about','testimonial','team','news','callout','contact','subscriber','wooproduct','portfolio','instagram','map','pricing','funfact','client');
52
53 $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
54
55 if (!empty($sections_customizer_data))
56 {
57 foreach($sections_customizer_data as $section_customizer_data)
58 {
59 require_once('inc/innofit/customizer/'.$section_customizer_data.'-section.php');
60 }
61 }
62 require_once('inc/innofit/customizer/customizer_theme_style.php');
63 require_once('inc/innofit/customizer/customizer_typography.php');
64 require_once('inc/innofit/customizer/customizer_layout_manager.php');
65 require_once('inc/innofit/customizer/customizer_color_back_settings.php');
66
67 }
68 add_action( 'customize_register', 'spiceb_innofit_customize_register' );
69 endif;
70
71
72 $sections_data = array('slider','services','about','testimonial','team','news','callout','contact','subscriber','wooproduct');
73
74 if (!empty($sections_data))
75 {
76 foreach($sections_data as $section_data)
77 {
78 require_once('inc/innofit/sections/innofit-'.$section_data.'-section.php');
79 }
80 }
81
82 require_once('inc/innofit/customizer/customizer-render-callbacks.php');
83 require_once('inc/innofit/customizer.php');
84
85
86 endif;
87
88 }
89
90
91 }
92 add_action( 'init', 'spiceb_activate' );
93
94
95 $theme = wp_get_theme();
96 if ( 'SpicePress' == $theme->name || 'Rockers' == $theme->name || 'Content' == $theme->name || 'Certify' == $theme->name || 'Stacy' == $theme->name || 'SpicePress Child Theme' == $theme->name || 'Chilly' == $theme->name || 'SpiceBlue' == $theme->name){
97
98
99 register_activation_hook( __FILE__, 'spiceb_install_function');
100 function spiceb_install_function()
101 {
102 $item_details_page = get_option('item_details_page');
103 if(!$item_details_page){
104 require_once('inc/spicepress/default-pages/upload-media.php');
105 require_once('inc/spicepress/default-pages/about-page.php');
106 require_once('inc/spicepress/default-pages/home-page.php');
107 require_once('inc/spicepress/default-pages/blog-page.php');
108 require_once('inc/spicepress/default-pages/contact-page.php');
109 require_once('inc/spicepress/default-pages/portfolio-page.php');
110 require_once('inc/spicepress/default-widgets/default-widget.php');
111 update_option( 'item_details_page', 'Done' );
112 }
113 }
114
115 }
116
117
118 //Innofit
119 if ( 'Innofit' == $theme->name ){
120
121 register_activation_hook( __FILE__, 'spiceb_install_function');
122 function spiceb_install_function()
123 {
124 $item_details_page = get_option('item_details_page');
125 if(!$item_details_page){
126 require_once('inc/innofit/default-pages/upload-media.php');
127 require_once('inc/innofit/default-pages/home-page.php');
128 require_once('inc/innofit/default-widgets/default-widget.php');
129 require_once('inc/innofit/default-pages/home-custom-menu.php');
130 update_option( 'item_details_page', 'Done' );
131 }
132 }
133
134 }
135
136 //Metabox Seeting For Chilly Theme
137 if ( 'Chilly' == $theme->name )
138 {
139 require_once('inc/chilly/post-meta.php');
140 }
141
142 //Sanatize text
143 function spiceb_spicepress_home_page_sanitize_text( $input ) {
144
145 return wp_kses_post( force_balance_tags( $input ) );
146
147 }
148
149 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
150
151
152 if ( ! is_plugin_active( 'innofit-plus/innofit-plus.php' ) ):
153
154 function spiceb_innofit_home_page_sanitize_text( $input ) {
155
156 return wp_kses_post( force_balance_tags( $input ) );
157
158 }
159
160 endif;
161 ?>