Spice Box - Version 0.2.9

Version Description

  • Created theme inner pages.
Download this release

Release Info

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

Code changes from version 0.2.8 to 0.2.9

inc/spicepress/default-pages/about-page.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Create a about us page
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' => 'About',
9
+ 'post_status' => 'publish' ,
10
+ 'post_title' => 'About',
11
+ 'post_type' => 'page',
12
+ 'post_content' => '<div class="col-md-6 col-sm-6 col-xs-12">
13
+ <div class="about-img-area wow fadeInDown animated animated animated animated animated" style="visibility: visible; animation-delay: 0.4s; animation-name: fadeInDown;" data-wow-delay="0.4s"><img class="img-responsive" src="'. SPICEB_PLUGIN_URL .'inc/spicepress/images/about/about.jpg" alt="Image" /></div>
14
+ </div>
15
+ <div class="col-md-6 col-sm-6 col-xs-12 wow fadeInDown animated animated animated animated animated" style="visibility: visible; animation-delay: 0.4s; animation-name: fadeInDown;" data-wow-delay="0.4s">
16
+ <h2>We provide best services in the world.
17
+ </h2>
18
+ There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don’t look even slightly believable.
19
+ If you are going to use a passage of Lorem Ipsum, you need to be sure there isn’t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet.
20
+ </div>'
21
+ );
22
+ //insert page and save the id
23
+ $newvalue = wp_insert_post( $post, false );
24
+ if ( $newvalue && ! is_wp_error( $newvalue ) ){
25
+ update_post_meta( $newvalue, '_wp_page_template', 'template/template-about.php' );
26
+ }
27
+ ?>
inc/spicepress/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/spicepress/default-pages/contact-page.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Create a Contact us page
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' => 'Contact',
9
+ 'post_status' => 'publish' ,
10
+ 'post_title' => 'Contact',
11
+ 'post_type' => 'page',
12
+ 'post_content' => '[contact-form-7 id="6" title="Contact form 1"]'
13
+ );
14
+ //insert page and save the id
15
+ $newvalue = wp_insert_post( $post, false );
16
+ if ( $newvalue && ! is_wp_error( $newvalue ) ){
17
+ update_post_meta( $newvalue, '_wp_page_template', 'template/template-contact.php' );
18
+ }
19
+ ?>
inc/spicepress/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/spicepress/default-pages/portfolio-page.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $MediaId = get_option('portfolio_media_id');
3
+ // Create a Portfolio page
4
+ $post = array(
5
+ 'comment_status' => 'closed',
6
+ 'ping_status' => 'closed' ,
7
+ 'post_author' => 1,
8
+ 'post_date' => date('Y-m-d H:i:s'),
9
+ 'post_name' => 'Portfolio',
10
+ 'post_status' => 'publish' ,
11
+ 'post_title' => 'Portfolio',
12
+ 'post_type' => 'page',
13
+ 'post_content' => '[gallery size="full" ids="'. $MediaId[0].','
14
+ .$MediaId[1].','.$MediaId[2].','.$MediaId[3].','.$MediaId[4].','.
15
+ $MediaId[5].','.$MediaId[6].','.$MediaId[7].','.$MediaId[8].','.
16
+ $MediaId[9].','.$MediaId[10].','.$MediaId[11].'"]'
17
+ );
18
+ //insert page and save the id
19
+ $newvalue = wp_insert_post( $post, false );
20
+ if ( $newvalue && ! is_wp_error( $newvalue ) ){
21
+ update_post_meta( $newvalue, '_wp_page_template', 'template/template-page-full-width.php' );
22
+ }
23
+ ?>
inc/spicepress/default-pages/upload-media.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $file = SPICEB_PLUGIN_URL .'inc/spicepress/images/portfolio/gallery2.jpg';
3
+ $ImagePath = SPICEB_PLUGIN_URL .'inc/spicepress/images/portfolio';
4
+
5
+ $images = array(
6
+ $ImagePath.'/gallery1.jpg',
7
+ $ImagePath.'/gallery2.jpg',
8
+ $ImagePath.'/gallery3.jpg',
9
+ $ImagePath.'/gallery4.jpg',
10
+ $ImagePath.'/gallery5.jpg',
11
+ $ImagePath.'/gallery6.jpg',
12
+ $ImagePath.'/gallery7.jpg',
13
+ $ImagePath.'/gallery8.jpg',
14
+ $ImagePath.'/gallery9.jpg',
15
+ $ImagePath.'/gallery10.jpg',
16
+ $ImagePath.'/gallery11.jpg',
17
+ $ImagePath.'/gallery12.jpg',
18
+ $ImagePath. '/logo.png',
19
+ );
20
+
21
+ foreach($images as $name) {
22
+ $filename = basename($name);
23
+ $upload_file = wp_upload_bits($filename, null, file_get_contents($name));
24
+ if (!$upload_file['error']) {
25
+ $wp_filetype = wp_check_filetype($filename, null );
26
+ $attachment = array(
27
+ 'post_mime_type' => $wp_filetype['type'],
28
+ 'post_parent' => $parent_post_id,
29
+ 'post_title' => preg_replace('/\.[^.]+$/', '', $filename),
30
+ 'post_excerpt' => 'Portfolio caption',
31
+ 'post_status' => 'inherit'
32
+ );
33
+ $ImageId[] = $attachment_id = wp_insert_attachment( $attachment, $upload_file['file'], $parent_post_id );
34
+
35
+ if (!is_wp_error($attachment_id)) {
36
+ require_once(ABSPATH . "wp-admin" . '/includes/image.php');
37
+ $attachment_data = wp_generate_attachment_metadata( $attachment_id, $upload_file['file'] );
38
+ wp_update_attachment_metadata( $attachment_id, $attachment_data );
39
+ }
40
+ }
41
+
42
+ }
43
+
44
+ update_option( 'portfolio_media_id', $ImageId );
45
+
46
+ ?>
inc/spicepress/default-widgets/default-widget.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $activate = array(
3
+ 'sidebar_primary' => array(
4
+ 'search-1',
5
+ 'recent-posts-1',
6
+ 'archives-1',
7
+ ),
8
+ 'footer_widget_area_left' => array(
9
+ 'text-1',
10
+ ),
11
+ 'footer_widget_area_right' => array(
12
+ 'recent-posts-2',
13
+ ),
14
+ 'footer_widget_area_center' => array(
15
+ 'categories-2'
16
+ ),
17
+ 'wdl_contact_page_sidebar' => array(
18
+ 'search-2',
19
+ 'recent-posts-2',
20
+ 'archives-2',
21
+ ),
22
+ );
23
+
24
+ /* the default titles will appear */
25
+ update_option('widget_text', array(
26
+ 1 => array('title' => '',
27
+ 'text'=>'<p><img class="img-responsive" src="'.SPICEB_PLUGIN_URL.'inc/spicepress/images/logo-footer.png" alt="Logo" /><br>
28
+ Aenean Donec sed odio dui. Donec sed odio dui. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Curabitur blandit tempus porttitor ligula nibhes, molestie id vivers dapibus iaculis.</p>
29
+ <div class="media widget-address"><div class="addr-icon"><i class="fa fa-map-marker"></i></div><div class="media-body"><address>SpicePress Theme<br><abbr>Chestnut Road, California (USA)</abbr></address></div></div>'),
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
+
50
+ $MediaId = get_option('portfolio_media_id');
51
+ set_theme_mod( 'custom_logo', $MediaId[12] );
52
+ set_theme_mod( 'header_textcolor', "blank" );
53
+ ?>
inc/spicepress/features/feature-testimonial-section.php CHANGED
@@ -49,7 +49,7 @@ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' :
49
  //Testimonial Background Overlay Color
50
  $wp_customize->add_setting( 'testimonial_overlay_section_color', array(
51
  'sanitize_callback' => 'sanitize_text_field',
52
- 'default' => 'rgba(0,0,0,0.85)',
53
  ) );
54
 
55
  $wp_customize->add_control(new SpicePress_Customize_Alpha_Color_Control( $wp_customize,'testimonial_overlay_section_color', array(
49
  //Testimonial Background Overlay Color
50
  $wp_customize->add_setting( 'testimonial_overlay_section_color', array(
51
  'sanitize_callback' => 'sanitize_text_field',
52
+ 'default' => 'rgba(0,0,0,0.6)',
53
  ) );
54
 
55
  $wp_customize->add_control(new SpicePress_Customize_Alpha_Color_Control( $wp_customize,'testimonial_overlay_section_color', array(
inc/spicepress/images/about/about.jpg ADDED
Binary file
inc/spicepress/images/logo-footer.png ADDED
Binary file
inc/spicepress/images/portfolio/gallery1.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery10.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery11.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery12.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery2.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery3.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery4.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery5.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery6.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery7.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery8.jpg ADDED
Binary file
inc/spicepress/images/portfolio/gallery9.jpg ADDED
Binary file
inc/spicepress/images/portfolio/logo.png ADDED
Binary file
inc/spicepress/sections/spicepress-testimonail-section.php CHANGED
@@ -15,7 +15,7 @@ if($testimonial_callout_background != '') { ?>
15
  <?php } else { ?>
16
  <section class="testimonial-section">
17
  <?php }
18
- $testimonial_overlay_section_color = get_theme_mod('testimonial_overlay_section_color','rgba(0,0,0,0.85)');
19
  $testimonial_image_overlay = get_theme_mod('testimonial_image_overlay',true);
20
  ?>
21
  <div class="overlay"<?php if($testimonial_image_overlay != false) { ?>style="background-color:<?php echo $testimonial_overlay_section_color; } ?>">
15
  <?php } else { ?>
16
  <section class="testimonial-section">
17
  <?php }
18
+ $testimonial_overlay_section_color = get_theme_mod('testimonial_overlay_section_color','rgba(0,0,0,0.6)');
19
  $testimonial_image_overlay = get_theme_mod('testimonial_image_overlay',true);
20
  ?>
21
  <div class="overlay"<?php if($testimonial_image_overlay != false) { ?>style="background-color:<?php echo $testimonial_overlay_section_color; } ?>">
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: spicethemes
3
  Tags: widget, admin, widgets
4
  Requires at least: 3.3+
5
  Tested up to: 4.9.5
6
- Stable tag: 0.2.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -58,4 +58,8 @@ This plugin create repeater controls in the customizer settings allowing you to
58
  = 0.2.8 =
59
 
60
  * Added some more field in feedback form.
61
- * Style Feedback form.
 
 
 
 
3
  Tags: widget, admin, widgets
4
  Requires at least: 3.3+
5
  Tested up to: 4.9.5
6
+ Stable tag: 0.2.9
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
58
  = 0.2.8 =
59
 
60
  * Added some more field in feedback form.
61
+ * Style Feedback form.
62
+
63
+ = 0.2.9 =
64
+
65
+ * Created theme inner pages.
spicebox.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SpiceBox
4
  Plugin URI:
5
  Description: Enhances SpiceThemes with extra functionality.
6
- Version: 0.2.8
7
  Author: Spicethemes
8
  Author URI: https://github.com
9
  Text Domain: spicebox
@@ -43,38 +43,23 @@ if ( 'SpicePress' == $theme->name || 'Rockers' == $theme->name || 'Content' == $
43
 
44
  register_activation_hook( __FILE__, 'spiceb_install_function');
45
  function spiceb_install_function()
46
- {
47
- $item_details_page = get_option('item_details_page');
48
  if(!$item_details_page){
49
- //post status and options
50
- $post = array(
51
- 'comment_status' => 'closed',
52
- 'ping_status' => 'closed' ,
53
- 'post_author' => 1,
54
- 'post_date' => date('Y-m-d H:i:s'),
55
- 'post_name' => 'Home',
56
- 'post_status' => 'publish' ,
57
- 'post_title' => 'Home',
58
- 'post_type' => 'page',
59
- );
60
- //insert page and save the id
61
- $newvalue = wp_insert_post( $post, false );
62
- if ( $newvalue && ! is_wp_error( $newvalue ) ){
63
- update_post_meta( $newvalue, '_wp_page_template', 'template-business.php' );
64
-
65
- // Use a static front page
66
- $page = get_page_by_title('Home');
67
- update_option( 'show_on_front', 'page' );
68
- update_option( 'page_on_front', $page->ID );
69
-
70
- }
71
- //save the id in the database
72
- update_option( 'item_details_page', $newvalue );
73
  }
74
  }
75
 
76
  }
77
 
 
78
  if ('SpicePress' == $theme->name || 'Rockers' == $theme->name || 'Content' == $theme->name || 'Certify' == $theme->name || 'Stacy' == $theme->name || 'SpicePress Child Theme' == $theme->name)
79
  {
80
  add_action( 'switch_theme', 'spicepresstheme_deactivate_message' );
3
  Plugin Name: SpiceBox
4
  Plugin URI:
5
  Description: Enhances SpiceThemes with extra functionality.
6
+ Version: 0.2.9
7
  Author: Spicethemes
8
  Author URI: https://github.com
9
  Text Domain: spicebox
43
 
44
  register_activation_hook( __FILE__, 'spiceb_install_function');
45
  function spiceb_install_function()
46
+ {
47
+ $item_details_page = get_option('item_details_page');
48
  if(!$item_details_page){
49
+ require_once('inc/spicepress/default-pages/upload-media.php');
50
+ require_once('inc/spicepress/default-pages/about-page.php');
51
+ require_once('inc/spicepress/default-pages/home-page.php');
52
+ require_once('inc/spicepress/default-pages/blog-page.php');
53
+ require_once('inc/spicepress/default-pages/contact-page.php');
54
+ require_once('inc/spicepress/default-pages/portfolio-page.php');
55
+ require_once('inc/spicepress/default-widgets/default-widget.php');
56
+ update_option( 'item_details_page', 'Done' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  }
58
  }
59
 
60
  }
61
 
62
+ // User Feedback popup code
63
  if ('SpicePress' == $theme->name || 'Rockers' == $theme->name || 'Content' == $theme->name || 'Certify' == $theme->name || 'Stacy' == $theme->name || 'SpicePress Child Theme' == $theme->name)
64
  {
65
  add_action( 'switch_theme', 'spicepresstheme_deactivate_message' );