Version Description
Release Date - 2 April 2016
Small code fixes:
- Fixed undefined variable bug,
- Fixed naming of downloaded files and their filters.
Download this release
Release Info
Developer | capuderg |
Plugin | One Click Demo Import |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- inc/class-ocdi-helpers.php +2 -2
- one-click-demo-import.php +3 -3
- readme.txt +13 -2
inc/class-ocdi-helpers.php
CHANGED
@@ -66,7 +66,7 @@ class OCDI_Helpers {
|
|
66 |
// Setup filename path to save the data content.
|
67 |
$upload_dir = wp_upload_dir();
|
68 |
$upload_path = apply_filters( 'pt-ocdi/upload_file_path', trailingslashit( $upload_dir['path'] ) );
|
69 |
-
$demo_import_file_path = $upload_path . apply_filters( 'pt-ocdi/
|
70 |
|
71 |
// Write data content to the file and return the file path on successful write.
|
72 |
$downloaded_files['content'] = self::write_to_file( $demo_import_content, $demo_import_file_path );
|
@@ -88,7 +88,7 @@ class OCDI_Helpers {
|
|
88 |
}
|
89 |
|
90 |
// Setup filename path to save the widget content.
|
91 |
-
$import_widgets_file_path = $upload_path . apply_filters( 'pt-ocdi/
|
92 |
|
93 |
// Write widget content to the file and return the file path on successful write.
|
94 |
$downloaded_files['widgets'] = self::write_to_file( $demo_import_widgets_content, $import_widgets_file_path );
|
66 |
// Setup filename path to save the data content.
|
67 |
$upload_dir = wp_upload_dir();
|
68 |
$upload_path = apply_filters( 'pt-ocdi/upload_file_path', trailingslashit( $upload_dir['path'] ) );
|
69 |
+
$demo_import_file_path = $upload_path . apply_filters( 'pt-ocdi/downloaded_content_file_prefix', 'demo-content-import-file_' ) . $start_date . apply_filters( 'pt-ocdi/downloaded_content_file_suffix_and_file_extension', '.xml' );
|
70 |
|
71 |
// Write data content to the file and return the file path on successful write.
|
72 |
$downloaded_files['content'] = self::write_to_file( $demo_import_content, $demo_import_file_path );
|
88 |
}
|
89 |
|
90 |
// Setup filename path to save the widget content.
|
91 |
+
$import_widgets_file_path = $upload_path . apply_filters( 'pt-ocdi/downloaded_widgets_file_prefix', 'demo-widgets-import-file_' ) . $start_date . apply_filters( 'pt-ocdi/downloaded_widgets_file_suffix_and_file_extension', '.json' );
|
92 |
|
93 |
// Write widget content to the file and return the file path on successful write.
|
94 |
$downloaded_files['widgets'] = self::write_to_file( $demo_import_widgets_content, $import_widgets_file_path );
|
one-click-demo-import.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: One Click Demo Import
|
5 |
Plugin URI: http://www.proteusthemes.com
|
6 |
Description: Import your content, widgets and theme settings with one click. Theme authors! Enable simple demo import for your theme demo data.
|
7 |
-
Version: 1.0.
|
8 |
Author: ProteusThemes
|
9 |
Author URI: http://www.proteusthemes.com
|
10 |
License: GPL3
|
@@ -20,7 +20,7 @@ define( 'PT_OCDI_PATH', plugin_dir_path( __FILE__ ) );
|
|
20 |
define( 'PT_OCDI_URL', plugin_dir_url( __FILE__ ) );
|
21 |
|
22 |
// Current version of the plugin.
|
23 |
-
define( 'PT_OCDI_VERSION', '0.
|
24 |
|
25 |
// Include files.
|
26 |
require PT_OCDI_PATH . 'inc/class-ocdi-helpers.php';
|
@@ -376,7 +376,7 @@ class PT_One_Click_Demo_Import {
|
|
376 |
|
377 |
// Write error to log file and send an AJAX response with the error.
|
378 |
OCDI_Helpers::log_error_and_send_ajax_response(
|
379 |
-
$
|
380 |
$this->log_file_path,
|
381 |
esc_html__( 'Importing widgets', 'pt-ocdi' )
|
382 |
);
|
4 |
Plugin Name: One Click Demo Import
|
5 |
Plugin URI: http://www.proteusthemes.com
|
6 |
Description: Import your content, widgets and theme settings with one click. Theme authors! Enable simple demo import for your theme demo data.
|
7 |
+
Version: 1.0.1
|
8 |
Author: ProteusThemes
|
9 |
Author URI: http://www.proteusthemes.com
|
10 |
License: GPL3
|
20 |
define( 'PT_OCDI_URL', plugin_dir_url( __FILE__ ) );
|
21 |
|
22 |
// Current version of the plugin.
|
23 |
+
define( 'PT_OCDI_VERSION', '1.0.1' );
|
24 |
|
25 |
// Include files.
|
26 |
require PT_OCDI_PATH . 'inc/class-ocdi-helpers.php';
|
376 |
|
377 |
// Write error to log file and send an AJAX response with the error.
|
378 |
OCDI_Helpers::log_error_and_send_ajax_response(
|
379 |
+
$results->get_error_message(),
|
380 |
$this->log_file_path,
|
381 |
esc_html__( 'Importing widgets', 'pt-ocdi' )
|
382 |
);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: capuderg, cyman
|
|
3 |
Tags: import, content, demo, data, widgets, settings
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.4.2
|
6 |
-
Stable tag: 1.0.
|
7 |
License: GPLv3 or later
|
8 |
|
9 |
Import your demo content, widgets and theme settings with one click. Theme authors! Enable simple demo import for your theme demo data.
|
@@ -12,7 +12,7 @@ Import your demo content, widgets and theme settings with one click. Theme autho
|
|
12 |
|
13 |
This plugin will create a submenu page under Appearance with the title **Import demo data**.
|
14 |
|
15 |
-
If the theme you are using does not have any predefined import files, then you will be presented with two file upload inputs. First one is required and you will have to upload a demo content XML file, for the actual demo import. The second one is optional and will ask you for a WIE or JSON file for widgets import.
|
16 |
|
17 |
This plugin is using the improved WP import that you can find here: https://github.com/humanmade/WordPress-Importer.
|
18 |
|
@@ -90,6 +90,17 @@ add_action( 'pt-ocdi/after_import', 'ocdi_after_import' );
|
|
90 |
|
91 |
== Changelog ==
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
= 1.0.0 =
|
94 |
|
95 |
*Release Date - 25 March 2016*
|
|
|
|
3 |
Tags: import, content, demo, data, widgets, settings
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.4.2
|
6 |
+
Stable tag: 1.0.1
|
7 |
License: GPLv3 or later
|
8 |
|
9 |
Import your demo content, widgets and theme settings with one click. Theme authors! Enable simple demo import for your theme demo data.
|
12 |
|
13 |
This plugin will create a submenu page under Appearance with the title **Import demo data**.
|
14 |
|
15 |
+
If the theme you are using does not have any predefined import files, then you will be presented with two file upload inputs. First one is required and you will have to upload a demo content XML file, for the actual demo import. The second one is optional and will ask you for a WIE or JSON file for widgets import. You create that file using the [Widget Importer & Exporter](https://wordpress.org/plugins/widget-importer-exporter/) plugin.
|
16 |
|
17 |
This plugin is using the improved WP import that you can find here: https://github.com/humanmade/WordPress-Importer.
|
18 |
|
90 |
|
91 |
== Changelog ==
|
92 |
|
93 |
+
= 1.0.1 =
|
94 |
+
|
95 |
+
*Release Date - 2 April 2016*
|
96 |
+
|
97 |
+
Small code fixes:
|
98 |
+
|
99 |
+
* Fixed undefined variable bug,
|
100 |
+
* Fixed naming of downloaded files and their filters.
|
101 |
+
|
102 |
= 1.0.0 =
|
103 |
|
104 |
*Release Date - 25 March 2016*
|
105 |
+
|
106 |
+
* Initial release!
|