Starter Templates by Kadence WP - Version 1.2.2

Version Description

  • Fix: Multisite Pro Access issue.
Download this release

Release Info

Developer britner
Plugin Icon 128x128 Starter Templates by Kadence WP
Version 1.2.2
Comparing to
See all releases

Code changes from version 1.2.1 to 1.2.2

class-kadence-starter-templates.php CHANGED
@@ -186,7 +186,7 @@ class Starter_Templates {
186
  define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
187
  }
188
  if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
189
- define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.2.1' );
190
  }
191
  }
192
 
@@ -861,6 +861,15 @@ class Starter_Templates {
861
  // Check for multiple images.
862
  $has_content = ( 0 < wp_count_posts( 'attachment' )->inherit ? true : false );
863
  }
 
 
 
 
 
 
 
 
 
864
  wp_enqueue_style( 'kadence-starter-templates', KADENCE_STARTER_TEMPLATES_URL . 'assets/css/starter-templates.css', array( 'wp-components' ), KADENCE_STARTER_TEMPLATES_VERSION );
865
  wp_enqueue_script( 'kadence-starter-templates', KADENCE_STARTER_TEMPLATES_URL . 'assets/js/starter-templates.js', array( 'jquery', 'wp-i18n', 'wp-element', 'wp-plugins', 'wp-components', 'wp-api', 'wp-hooks', 'wp-edit-post', 'lodash', 'wp-block-library', 'wp-block-editor', 'wp-editor' ), KADENCE_STARTER_TEMPLATES_VERSION, true );
866
  wp_localize_script(
@@ -880,7 +889,7 @@ class Starter_Templates {
880
  'has_content' => $has_content,
881
  'has_previous' => $has_previous,
882
  'starterSettings' => get_option( 'kadence_starter_templates_config' ),
883
- 'proData' => ( class_exists( 'Kadence_Theme_Pro' ) ? get_option( 'ktp_api_manager' ) : false ),
884
  'notice' => esc_html__( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden.', 'kadence-starter-templates' ),
885
  'notice_previous' => esc_html( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden. It is recommended that you enable "Delete Previously Imported Posts and Images" if you are testing out different starter templates.'),
886
  'remove_progress' => esc_html__( 'Removing Past Imported Content', 'kadence-starter-templates' ),
@@ -1851,8 +1860,14 @@ class Starter_Templates {
1851
  /**
1852
  * Clean up default contents.
1853
  */
1854
- wp_delete_post( 1, true ); // Hello World.
1855
- wp_delete_post( 2, true ); // Sample Page.
 
 
 
 
 
 
1856
  wp_delete_comment( 1, true ); // WordPress comment.
1857
  // Move All active widgets into inactive.
1858
  $sidebars = wp_get_sidebars_widgets();
186
  define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
187
  }
188
  if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
189
+ define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.2.2' );
190
  }
191
  }
192
 
861
  // Check for multiple images.
862
  $has_content = ( 0 < wp_count_posts( 'attachment' )->inherit ? true : false );
863
  }
864
+ if ( class_exists( 'Kadence_Theme_Pro' ) ) {
865
+ if ( is_multisite() && ! apply_filters( 'kadence_activation_individual_multisites', false ) ) {
866
+ $pro_data = get_site_option( 'ktp_api_manager' );
867
+ } else {
868
+ $pro_data = get_option( 'ktp_api_manager' );
869
+ }
870
+ } else {
871
+ $pro_data = false;
872
+ }
873
  wp_enqueue_style( 'kadence-starter-templates', KADENCE_STARTER_TEMPLATES_URL . 'assets/css/starter-templates.css', array( 'wp-components' ), KADENCE_STARTER_TEMPLATES_VERSION );
874
  wp_enqueue_script( 'kadence-starter-templates', KADENCE_STARTER_TEMPLATES_URL . 'assets/js/starter-templates.js', array( 'jquery', 'wp-i18n', 'wp-element', 'wp-plugins', 'wp-components', 'wp-api', 'wp-hooks', 'wp-edit-post', 'lodash', 'wp-block-library', 'wp-block-editor', 'wp-editor' ), KADENCE_STARTER_TEMPLATES_VERSION, true );
875
  wp_localize_script(
889
  'has_content' => $has_content,
890
  'has_previous' => $has_previous,
891
  'starterSettings' => get_option( 'kadence_starter_templates_config' ),
892
+ 'proData' => $pro_data,
893
  'notice' => esc_html__( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden.', 'kadence-starter-templates' ),
894
  'notice_previous' => esc_html( 'Please Note: Full site importing is designed for new/empty sites with no content. Your site customizer settings, widgets, menus will all be overridden. It is recommended that you enable "Delete Previously Imported Posts and Images" if you are testing out different starter templates.'),
895
  'remove_progress' => esc_html__( 'Removing Past Imported Content', 'kadence-starter-templates' ),
1860
  /**
1861
  * Clean up default contents.
1862
  */
1863
+ $hello_world = get_page_by_title( 'Hello World', OBJECT, 'post' );
1864
+ if ( $hello_world ) {
1865
+ wp_delete_post( $hello_world->ID, true );// Hello World.
1866
+ }
1867
+ $sample_page = get_page_by_title( 'Sample Page' );
1868
+ if ( $sample_page ) {
1869
+ wp_delete_post( $sample_page->ID, true ); // Sample Page.
1870
+ }
1871
  wp_delete_comment( 1, true ); // WordPress comment.
1872
  // Move All active widgets into inactive.
1873
  $sidebars = wp_get_sidebars_widgets();
kadence-starter-templates.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Kadence Starter Templates
4
  * Description: Choose the prebuilt website and click to import.
5
- * Version: 1.2.1
6
  * Author: Kadence WP
7
  * Author URI: https://kadencewp.com/
8
  * License: GPLv2 or later
2
  /**
3
  * Plugin Name: Kadence Starter Templates
4
  * Description: Choose the prebuilt website and click to import.
5
+ * Version: 1.2.2
6
  * Author: Kadence WP
7
  * Author URI: https://kadencewp.com/
8
  * License: GPLv2 or later
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: britner
3
  Tags: templates, gutenberg
4
  Requires at least: 5.0
5
  Tested up to: 5.6
6
- Stable tag: 1.2.1
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -108,6 +108,9 @@ Absolutely not.
108
 
109
  == Changelog ==
110
 
 
 
 
111
  = 1.2.1 =
112
  * Fix: Better support for installing any repo plugin.
113
  * Fix: Possible issue with Customizer Import.
3
  Tags: templates, gutenberg
4
  Requires at least: 5.0
5
  Tested up to: 5.6
6
+ Stable tag: 1.2.2
7
  Requires PHP: 7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
108
 
109
  == Changelog ==
110
 
111
+ = 1.2.2 =
112
+ * Fix: Multisite Pro Access issue.
113
+
114
  = 1.2.1 =
115
  * Fix: Better support for installing any repo plugin.
116
  * Fix: Possible issue with Customizer Import.