Version Description
- Fix: Issue with sideload image.
- Add: Gutenberg shop starter template.
Download this release
Release Info
Developer | britner |
Plugin | Starter Templates by Kadence WP |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- class-kadence-starter-templates.php +106 -9
- inc/class-import-export-option.php +1 -1
- kadence-starter-templates.php +1 -1
- readme.txt +5 -1
class-kadence-starter-templates.php
CHANGED
@@ -445,6 +445,29 @@ class Starter_Templates {
|
|
445 |
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
446 |
}
|
447 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
448 |
}
|
449 |
if ( $selected_palette && ! empty( $selected_palette ) ) {
|
450 |
$palette_presets = json_decode( '{"base":[{"color":"#2B6CB0"},{"color":"#265E9A"},{"color":"#222222"},{"color":"#3B3B3B"},{"color":"#515151"},{"color":"#626262"},{"color":"#E1E1E1"},{"color":"#F7F7F7"},{"color":"#ffffff"}],"bright":[{"color":"#255FDD"},{"color":"#00F2FF"},{"color":"#1A202C"},{"color":"#2D3748"},{"color":"#4A5568"},{"color":"#718096"},{"color":"#EDF2F7"},{"color":"#F7FAFC"},{"color":"#ffffff"}],"darkmode":[{"color":"#3296ff"},{"color":"#003174"},{"color":"#ffffff"},{"color":"#f7fafc"},{"color":"#edf2f7"},{"color":"#cbd2d9"},{"color":"#2d3748"},{"color":"#252c39"},{"color":"#1a202c"}],"orange":[{"color":"#e47b02"},{"color":"#ed8f0c"},{"color":"#1f2933"},{"color":"#3e4c59"},{"color":"#52606d"},{"color":"#7b8794"},{"color":"#f3f4f7"},{"color":"#f9f9fb"},{"color":"#ffffff"}],"pinkish":[{"color":"#E21E51"},{"color":"#4d40ff"},{"color":"#040037"},{"color":"#032075"},{"color":"#514d7c"},{"color":"#666699"},{"color":"#deddeb"},{"color":"#efeff5"},{"color":"#f8f9fa"}],"pinkishdark":[{"color":"#E21E51"},{"color":"#4d40ff"},{"color":"#f8f9fa"},{"color":"#efeff5"},{"color":"#deddeb"},{"color":"#c3c2d6"},{"color":"#514d7c"},{"color":"#221e5b"},{"color":"#040037"}],"green":[{"color":"#049f82"},{"color":"#008f72"},{"color":"#222222"},{"color":"#353535"},{"color":"#454545"},{"color":"#676767"},{"color":"#eeeeee"},{"color":"#f7f7f7"},{"color":"#ffffff"}],"fire":[{"color":"#dd6b20"},{"color":"#cf3033"},{"color":"#27241d"},{"color":"#423d33"},{"color":"#504a40"},{"color":"#625d52"},{"color":"#e8e6e1"},{"color":"#faf9f7"},{"color":"#ffffff"}],"mint":[{"color":"#2cb1bc"},{"color":"#13919b"},{"color":"#0f2a43"},{"color":"#133453"},{"color":"#587089"},{"color":"#829ab1"},{"color":"#e0fcff"},{"color":"#f5f7fa"},{"color":"#ffffff"}],"rich":[{"color":"#295CFF"},{"color":"#0E94FF"},{"color":"#1C0D5A"},{"color":"#3D3D3D"},{"color":"#57575D"},{"color":"#636363"},{"color":"#E1EBEE"},{"color":"#EFF7FB"},{"color":"#ffffff"}],"fem":[{"color":"#D86C97"},{"color":"#282828"},{"color":"#282828"},{"color":"#333333"},{"color":"#4d4d4d"},{"color":"#646464"},{"color":"#f7dede"},{"color":"#F6F2EF"},{"color":"#ffffff"}],"hot":[{"color":"#FF5698"},{"color":"#000000"},{"color":"#020202"},{"color":"#020202"},{"color":"#4E4E4E"},{"color":"#808080"},{"color":"#FDEDEC"},{"color":"#FDF6EE"},{"color":"#ffffff"}],"bold":[{"color":"#000000"},{"color":"#D1A155"},{"color":"#000000"},{"color":"#010101"},{"color":"#111111"},{"color":"#282828"},{"color":"#F6E7BC"},{"color":"#F9F7F7"},{"color":"#ffffff"}],"teal":[{"color":"#7ACFC4"},{"color":"#044355"},{"color":"#000000"},{"color":"#010101"},{"color":"#111111"},{"color":"#282828"},{"color":"#F5ECE5"},{"color":"#F9F7F7"},{"color":"#ffffff"}]}', true );
|
@@ -1194,23 +1217,59 @@ class Starter_Templates {
|
|
1194 |
),
|
1195 |
),
|
1196 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1197 |
);
|
1198 |
return $demos;
|
1199 |
}
|
1200 |
/**
|
1201 |
-
*
|
1202 |
*
|
1203 |
* @return void
|
1204 |
*/
|
1205 |
-
|
|
|
|
|
|
|
1206 |
|
1207 |
|
1208 |
/**
|
1209 |
-
*
|
1210 |
*
|
1211 |
* @return void
|
1212 |
*/
|
1213 |
-
|
|
|
|
|
|
|
1214 |
|
1215 |
/**
|
1216 |
* Set plugin constants.
|
@@ -1226,7 +1285,7 @@ class Starter_Templates {
|
|
1226 |
define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
1227 |
}
|
1228 |
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
|
1229 |
-
define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.1.
|
1230 |
}
|
1231 |
}
|
1232 |
/**
|
@@ -1479,6 +1538,44 @@ class Starter_Templates {
|
|
1479 |
),
|
1480 |
array(
|
1481 |
'key' => 2,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1482 |
'slug' => 'ldcourse',
|
1483 |
'name' => __( 'LearnDash Course', 'kadence-starter-templates' ),
|
1484 |
'keywords' => array(
|
@@ -1515,7 +1612,7 @@ class Starter_Templates {
|
|
1515 |
'image' => 'https://startertemplatecloud.com/importer-content/og02/images/preview-image.jpg',
|
1516 |
),
|
1517 |
array(
|
1518 |
-
'key' =>
|
1519 |
'slug' => 'food',
|
1520 |
'name' => __( 'Recipe Blog', 'kadence-starter-templates' ),
|
1521 |
'keywords' => array(
|
@@ -1552,7 +1649,7 @@ class Starter_Templates {
|
|
1552 |
'image' => 'https://kadence.design/importer/kadence/recipe_blog/preview-image.jpg',
|
1553 |
),
|
1554 |
array(
|
1555 |
-
'key' =>
|
1556 |
'slug' => 'yoga',
|
1557 |
'name' => __( 'Yoga Studio', 'kadence-starter-templates' ),
|
1558 |
'keywords' => array(
|
@@ -1600,7 +1697,7 @@ class Starter_Templates {
|
|
1600 |
'image' => 'https://startertemplatecloud.com/importer-content/og05/images/preview-image.jpg',
|
1601 |
),
|
1602 |
array(
|
1603 |
-
'key' =>
|
1604 |
'slug' => 'saas',
|
1605 |
'name' => __( 'Saas', 'kadence-starter-templates' ),
|
1606 |
'keywords' => array(
|
@@ -1648,7 +1745,7 @@ class Starter_Templates {
|
|
1648 |
'image' => 'https://startertemplatecloud.com/importer-content/og03/images/preview-image.jpg',
|
1649 |
),
|
1650 |
array(
|
1651 |
-
'key' =>
|
1652 |
'slug' => 'shopping',
|
1653 |
'name' => __( 'Shopping', 'kadence-starter-templates' ),
|
1654 |
'keywords' => array(
|
445 |
update_option( 'page_for_posts', $blogpage->ID ); // Blog Page.
|
446 |
}
|
447 |
|
448 |
+
} elseif ( 'g02' === $selected_import['import_file_name'] ) {
|
449 |
+
|
450 |
+
// Assign Woo Pages.
|
451 |
+
if ( class_exists( 'woocommerce' ) ) {
|
452 |
+
$this->import_demo_woocommerce();
|
453 |
+
}
|
454 |
+
// Assign menus to their locations.
|
455 |
+
$main_menu = get_term_by( 'name', 'Store Menu', 'nav_menu' );
|
456 |
+
|
457 |
+
set_theme_mod(
|
458 |
+
'nav_menu_locations',
|
459 |
+
array(
|
460 |
+
'primary' => $main_menu->term_id,
|
461 |
+
)
|
462 |
+
);
|
463 |
+
|
464 |
+
// Assign front page.
|
465 |
+
$homepage = get_page_by_title( 'Home' );
|
466 |
+
if ( isset( $homepage ) && $homepage->ID ) {
|
467 |
+
update_option( 'show_on_front', 'page' );
|
468 |
+
update_option( 'page_on_front', $homepage->ID ); // Front Page.
|
469 |
+
}
|
470 |
+
|
471 |
}
|
472 |
if ( $selected_palette && ! empty( $selected_palette ) ) {
|
473 |
$palette_presets = json_decode( '{"base":[{"color":"#2B6CB0"},{"color":"#265E9A"},{"color":"#222222"},{"color":"#3B3B3B"},{"color":"#515151"},{"color":"#626262"},{"color":"#E1E1E1"},{"color":"#F7F7F7"},{"color":"#ffffff"}],"bright":[{"color":"#255FDD"},{"color":"#00F2FF"},{"color":"#1A202C"},{"color":"#2D3748"},{"color":"#4A5568"},{"color":"#718096"},{"color":"#EDF2F7"},{"color":"#F7FAFC"},{"color":"#ffffff"}],"darkmode":[{"color":"#3296ff"},{"color":"#003174"},{"color":"#ffffff"},{"color":"#f7fafc"},{"color":"#edf2f7"},{"color":"#cbd2d9"},{"color":"#2d3748"},{"color":"#252c39"},{"color":"#1a202c"}],"orange":[{"color":"#e47b02"},{"color":"#ed8f0c"},{"color":"#1f2933"},{"color":"#3e4c59"},{"color":"#52606d"},{"color":"#7b8794"},{"color":"#f3f4f7"},{"color":"#f9f9fb"},{"color":"#ffffff"}],"pinkish":[{"color":"#E21E51"},{"color":"#4d40ff"},{"color":"#040037"},{"color":"#032075"},{"color":"#514d7c"},{"color":"#666699"},{"color":"#deddeb"},{"color":"#efeff5"},{"color":"#f8f9fa"}],"pinkishdark":[{"color":"#E21E51"},{"color":"#4d40ff"},{"color":"#f8f9fa"},{"color":"#efeff5"},{"color":"#deddeb"},{"color":"#c3c2d6"},{"color":"#514d7c"},{"color":"#221e5b"},{"color":"#040037"}],"green":[{"color":"#049f82"},{"color":"#008f72"},{"color":"#222222"},{"color":"#353535"},{"color":"#454545"},{"color":"#676767"},{"color":"#eeeeee"},{"color":"#f7f7f7"},{"color":"#ffffff"}],"fire":[{"color":"#dd6b20"},{"color":"#cf3033"},{"color":"#27241d"},{"color":"#423d33"},{"color":"#504a40"},{"color":"#625d52"},{"color":"#e8e6e1"},{"color":"#faf9f7"},{"color":"#ffffff"}],"mint":[{"color":"#2cb1bc"},{"color":"#13919b"},{"color":"#0f2a43"},{"color":"#133453"},{"color":"#587089"},{"color":"#829ab1"},{"color":"#e0fcff"},{"color":"#f5f7fa"},{"color":"#ffffff"}],"rich":[{"color":"#295CFF"},{"color":"#0E94FF"},{"color":"#1C0D5A"},{"color":"#3D3D3D"},{"color":"#57575D"},{"color":"#636363"},{"color":"#E1EBEE"},{"color":"#EFF7FB"},{"color":"#ffffff"}],"fem":[{"color":"#D86C97"},{"color":"#282828"},{"color":"#282828"},{"color":"#333333"},{"color":"#4d4d4d"},{"color":"#646464"},{"color":"#f7dede"},{"color":"#F6F2EF"},{"color":"#ffffff"}],"hot":[{"color":"#FF5698"},{"color":"#000000"},{"color":"#020202"},{"color":"#020202"},{"color":"#4E4E4E"},{"color":"#808080"},{"color":"#FDEDEC"},{"color":"#FDF6EE"},{"color":"#ffffff"}],"bold":[{"color":"#000000"},{"color":"#D1A155"},{"color":"#000000"},{"color":"#010101"},{"color":"#111111"},{"color":"#282828"},{"color":"#F6E7BC"},{"color":"#F9F7F7"},{"color":"#ffffff"}],"teal":[{"color":"#7ACFC4"},{"color":"#044355"},{"color":"#000000"},{"color":"#010101"},{"color":"#111111"},{"color":"#282828"},{"color":"#F5ECE5"},{"color":"#F9F7F7"},{"color":"#ffffff"}]}', true );
|
1217 |
),
|
1218 |
),
|
1219 |
),
|
1220 |
+
'g02' => array(
|
1221 |
+
'import_file_name' => 'g02',
|
1222 |
+
'categories' => array(),
|
1223 |
+
'import_file_url' => 'https://startertemplatecloud.com/importer-content/g02/demo_content.xml',
|
1224 |
+
'import_widget_file_url' => 'https://startertemplatecloud.com/importer-content/g02/widget_data.json',
|
1225 |
+
'import_customizer_file_url' => 'https://startertemplatecloud.com/importer-content/g02/theme_options.json',
|
1226 |
+
'import_forms_file_url' => 'https://startertemplatecloud.com/importer-content/g02/form_data.json',
|
1227 |
+
'preview_url' => 'https://startertemplatecloud.com/g02/',
|
1228 |
+
'import_preview_image_url' => 'https://startertemplatecloud.com/importer-content/g02/preview-image.jpg',
|
1229 |
+
'import_notice' => '',
|
1230 |
+
'type' => 'blocks',
|
1231 |
+
'plugins' => array(
|
1232 |
+
$kadence_blocks,
|
1233 |
+
$woocommerce,
|
1234 |
+
),
|
1235 |
+
'pages' => array(
|
1236 |
+
'home' => array(
|
1237 |
+
'content' => 'https://startertemplatecloud.com/importer-content/g02/home_content.xml',
|
1238 |
+
'meta' => 'inherit',
|
1239 |
+
),
|
1240 |
+
'about' => array(
|
1241 |
+
'content' => 'https://startertemplatecloud.com/importer-content/g02/about_content.xml',
|
1242 |
+
'meta' => 'inherit',
|
1243 |
+
),
|
1244 |
+
'contact' => array(
|
1245 |
+
'content' => 'https://startertemplatecloud.com/importer-content/g02/contact_content.xml',
|
1246 |
+
'meta' => 'inherit',
|
1247 |
+
),
|
1248 |
+
),
|
1249 |
+
),
|
1250 |
);
|
1251 |
return $demos;
|
1252 |
}
|
1253 |
/**
|
1254 |
+
* Throw error on object clone.
|
1255 |
*
|
1256 |
* @return void
|
1257 |
*/
|
1258 |
+
public function __clone() {
|
1259 |
+
// Cloning instances of the class is forbidden.
|
1260 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cloning instances of the class is forbidden.', 'kadence-starter-templates' ), '1.0' );
|
1261 |
+
}
|
1262 |
|
1263 |
|
1264 |
/**
|
1265 |
+
* Disable un-serializing of the class.
|
1266 |
*
|
1267 |
* @return void
|
1268 |
*/
|
1269 |
+
public function __wakeup() {
|
1270 |
+
// Cloning instances of the class is forbidden.
|
1271 |
+
_doing_it_wrong( __FUNCTION__, __( 'Unserializing instances of the class is forbidden.', 'kadence-starter-templates' ), '1.0' );
|
1272 |
+
}
|
1273 |
|
1274 |
/**
|
1275 |
* Set plugin constants.
|
1285 |
define( 'KADENCE_STARTER_TEMPLATES_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
|
1286 |
}
|
1287 |
if ( ! defined( 'KADENCE_STARTER_TEMPLATES_VERSION' ) ) {
|
1288 |
+
define( 'KADENCE_STARTER_TEMPLATES_VERSION', '1.1.2' );
|
1289 |
}
|
1290 |
}
|
1291 |
/**
|
1538 |
),
|
1539 |
array(
|
1540 |
'key' => 2,
|
1541 |
+
'slug' => 'g02',
|
1542 |
+
'name' => __( 'Print Shop', 'kadence-starter-templates' ),
|
1543 |
+
'keywords' => array(
|
1544 |
+
__( 'store', 'kadence-starter-templates' ),
|
1545 |
+
__( 'ecommerce', 'kadence-starter-templates' ),
|
1546 |
+
__( 'woocommerce', 'kadence-starter-templates' ),
|
1547 |
+
),
|
1548 |
+
'url' => 'https://startertemplatecloud.com/g02/',
|
1549 |
+
'categories' => array( 'business', 'ecommerce' ),
|
1550 |
+
'type' => 'blocks',
|
1551 |
+
'plugins' => array(
|
1552 |
+
$kadence_blocks,
|
1553 |
+
$woocommerce,
|
1554 |
+
),
|
1555 |
+
'pages' => array(
|
1556 |
+
'home' => array(
|
1557 |
+
'id' => 'home',
|
1558 |
+
'title' => __( 'Home', 'kadence-starter-templates' ),
|
1559 |
+
'url' => 'https://startertemplatecloud.com/g02/',
|
1560 |
+
'image' => 'https://startertemplatecloud.com/importer-content/g02/images/home.jpg',
|
1561 |
+
),
|
1562 |
+
'about' => array(
|
1563 |
+
'id' => 'about',
|
1564 |
+
'title' => __( 'About', 'kadence-starter-templates' ),
|
1565 |
+
'url' => 'https://startertemplatecloud.com/g02/about/',
|
1566 |
+
'image' => 'https://startertemplatecloud.com/importer-content/g02/images/about.jpg',
|
1567 |
+
),
|
1568 |
+
'contact' => array(
|
1569 |
+
'id' => 'contact',
|
1570 |
+
'title' => __( 'Contact', 'kadence-starter-templates' ),
|
1571 |
+
'url' => 'https://startertemplatecloud.com/g02/contact/',
|
1572 |
+
'image' => 'https://startertemplatecloud.com/importer-content/g02/images/contact.jpg',
|
1573 |
+
),
|
1574 |
+
),
|
1575 |
+
'image' => 'https://startertemplatecloud.com/importer-content/e02/images/preview-image.jpg',
|
1576 |
+
),
|
1577 |
+
array(
|
1578 |
+
'key' => 3,
|
1579 |
'slug' => 'ldcourse',
|
1580 |
'name' => __( 'LearnDash Course', 'kadence-starter-templates' ),
|
1581 |
'keywords' => array(
|
1612 |
'image' => 'https://startertemplatecloud.com/importer-content/og02/images/preview-image.jpg',
|
1613 |
),
|
1614 |
array(
|
1615 |
+
'key' => 4,
|
1616 |
'slug' => 'food',
|
1617 |
'name' => __( 'Recipe Blog', 'kadence-starter-templates' ),
|
1618 |
'keywords' => array(
|
1649 |
'image' => 'https://kadence.design/importer/kadence/recipe_blog/preview-image.jpg',
|
1650 |
),
|
1651 |
array(
|
1652 |
+
'key' => 5,
|
1653 |
'slug' => 'yoga',
|
1654 |
'name' => __( 'Yoga Studio', 'kadence-starter-templates' ),
|
1655 |
'keywords' => array(
|
1697 |
'image' => 'https://startertemplatecloud.com/importer-content/og05/images/preview-image.jpg',
|
1698 |
),
|
1699 |
array(
|
1700 |
+
'key' => 6,
|
1701 |
'slug' => 'saas',
|
1702 |
'name' => __( 'Saas', 'kadence-starter-templates' ),
|
1703 |
'keywords' => array(
|
1745 |
'image' => 'https://startertemplatecloud.com/importer-content/og03/images/preview-image.jpg',
|
1746 |
),
|
1747 |
array(
|
1748 |
+
'key' => 7,
|
1749 |
'slug' => 'shopping',
|
1750 |
'name' => __( 'Shopping', 'kadence-starter-templates' ),
|
1751 |
'keywords' => array(
|
inc/class-import-export-option.php
CHANGED
@@ -381,7 +381,7 @@ class Customizer_Import_Export {
|
|
381 |
* @param string $file The image file path.
|
382 |
* @return array An array of image data.
|
383 |
*/
|
384 |
-
private static function
|
385 |
$data = new stdClass();
|
386 |
|
387 |
if ( ! function_exists( 'media_handle_sideload' ) ) {
|
381 |
* @param string $file The image file path.
|
382 |
* @return array An array of image data.
|
383 |
*/
|
384 |
+
private static function sideload_image( $file ) {
|
385 |
$data = new stdClass();
|
386 |
|
387 |
if ( ! function_exists( 'media_handle_sideload' ) ) {
|
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.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.1.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.5
|
6 |
-
Stable tag: 1.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,10 @@ Absolutely not.
|
|
108 |
|
109 |
== Changelog ==
|
110 |
|
|
|
|
|
|
|
|
|
111 |
= 1.1.1 =
|
112 |
* Add: Single Page Import.
|
113 |
* Add: FontPair Selection.
|
3 |
Tags: templates, gutenberg
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 5.5
|
6 |
+
Stable tag: 1.1.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.1.2 =
|
112 |
+
* Fix: Issue with sideload image.
|
113 |
+
* Add: Gutenberg shop starter template.
|
114 |
+
|
115 |
= 1.1.1 =
|
116 |
* Add: Single Page Import.
|
117 |
* Add: FontPair Selection.
|