Version Description
- WARNING MESSAGE FIXED
Download this release
Release Info
Developer | raratheme |
Plugin | Rara One Click Demo Import |
Version | 1.0.9 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.9
- assets/css/style.css +14 -4
- assets/js/script.js +9 -1
- includes/class-rrdi-main.php +15 -31
- includes/settings/installed-demos.php +19 -22
- includes/settings/welcome.php +12 -10
- includes/vendor/class-demo-installer-skin.php +3 -3
- includes/vendor/class-demo-upgrader.php +7 -8
- rara-demo-import.php → rara-one-click-demo-import.php +2 -7
- readme.txt +49 -30
assets/css/style.css
CHANGED
@@ -129,10 +129,11 @@
|
|
129 |
}
|
130 |
|
131 |
#tabs-container .tabs-menu li a{
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
|
|
136 |
}
|
137 |
|
138 |
#tabs-container .tabs-menu li a:focus{
|
@@ -145,4 +146,13 @@
|
|
145 |
display: none;
|
146 |
border: 1px solid #ddd;
|
147 |
margin-top: -1px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
}
|
129 |
}
|
130 |
|
131 |
#tabs-container .tabs-menu li a{
|
132 |
+
text-decoration: none;
|
133 |
+
color: #444;
|
134 |
+
display: block;
|
135 |
+
padding: 10px 10px 10px;
|
136 |
+
font-size: 18px;
|
137 |
}
|
138 |
|
139 |
#tabs-container .tabs-menu li a:focus{
|
146 |
display: none;
|
147 |
border: 1px solid #ddd;
|
148 |
margin-top: -1px;
|
149 |
+
}
|
150 |
+
#Demo_Import li {
|
151 |
+
line-height: 35px;
|
152 |
+
}
|
153 |
+
div#Demo_Import {
|
154 |
+
font-size: 15px;
|
155 |
+
}
|
156 |
+
.home-page-url{
|
157 |
+
display: none;
|
158 |
}
|
assets/js/script.js
CHANGED
@@ -43,15 +43,23 @@ jQuery( function ( $ ) {
|
|
43 |
else if ( 'undefined' !== typeof response.message ) {
|
44 |
$( '.js-rrdi-ajax-response' ).append( '<p>' + response.message + '</p>' );
|
45 |
$( '.js-rrdi-ajax-loader' ).hide();
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
else {
|
48 |
$( '.js-rrdi-ajax-response' ).append( '<div class="notice notice-error is-dismissible"><p>' + response + '</p></div>' );
|
49 |
$( '.js-rrdi-ajax-loader' ).hide();
|
|
|
|
|
|
|
50 |
}
|
51 |
})
|
52 |
.fail( function( error ) {
|
53 |
$( '.js-rrdi-ajax-response' ).append( '<div class="notice notice-error is-dismissible"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' );
|
54 |
$( '.js-rrdi-ajax-loader' ).hide();
|
|
|
55 |
});
|
56 |
}
|
57 |
|
@@ -93,7 +101,7 @@ jQuery( function ( $ ) {
|
|
93 |
uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) );
|
94 |
});
|
95 |
$('.tabs-menu a').click(function(event) {
|
96 |
-
if( $(this).attr('href') != '
|
97 |
{
|
98 |
$('.upload-view-toggle').hide();
|
99 |
}
|
43 |
else if ( 'undefined' !== typeof response.message ) {
|
44 |
$( '.js-rrdi-ajax-response' ).append( '<p>' + response.message + '</p>' );
|
45 |
$( '.js-rrdi-ajax-loader' ).hide();
|
46 |
+
$( '.js-rrdi-import-data' ).prop('disabled', true);
|
47 |
+
$( 'a.demo-importer' ).hide();
|
48 |
+
$( 'a.home-page-url' ).show();
|
49 |
+
|
50 |
}
|
51 |
else {
|
52 |
$( '.js-rrdi-ajax-response' ).append( '<div class="notice notice-error is-dismissible"><p>' + response + '</p></div>' );
|
53 |
$( '.js-rrdi-ajax-loader' ).hide();
|
54 |
+
$( '.js-rrdi-import-data' ).prop('disabled', true);
|
55 |
+
$( 'a.demo-importer' ).hide();
|
56 |
+
$( 'a.home-page-url' ).show();
|
57 |
}
|
58 |
})
|
59 |
.fail( function( error ) {
|
60 |
$( '.js-rrdi-ajax-response' ).append( '<div class="notice notice-error is-dismissible"><p>Error: ' + error.statusText + ' (' + error.status + ')' + '</p></div>' );
|
61 |
$( '.js-rrdi-ajax-loader' ).hide();
|
62 |
+
$( '.js-rrdi-import-data' ).prop('disabled', true);
|
63 |
});
|
64 |
}
|
65 |
|
101 |
uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) );
|
102 |
});
|
103 |
$('.tabs-menu a').click(function(event) {
|
104 |
+
if( $(this).attr('href') != 'Demo_Import')
|
105 |
{
|
106 |
$('.upload-view-toggle').hide();
|
107 |
}
|
includes/class-rrdi-main.php
CHANGED
@@ -63,7 +63,7 @@ class RRDI_Theme_Demo_Import {
|
|
63 |
add_action( 'init', array( $this, 'setup' ), 5 );
|
64 |
$get_theme = wp_get_theme();
|
65 |
|
66 |
-
if( $get_theme->get( 'AuthorURI' ) == 'http://raratheme.com/' || $get_theme->get( 'AuthorURI' ) == 'https://raratheme.com/' )
|
67 |
{
|
68 |
add_action( 'admin_menu', array( $this, 'create_plugin_page' ) );
|
69 |
}
|
@@ -105,37 +105,21 @@ class RRDI_Theme_Demo_Import {
|
|
105 |
return $ret_val;
|
106 |
}
|
107 |
|
108 |
-
function lreplace($search, $replace, $subject){
|
109 |
-
$pos = strrpos($subject, $search);
|
110 |
-
if($pos !== false){
|
111 |
-
$subject = substr_replace($subject, $replace, $pos, strlen($search));
|
112 |
-
}
|
113 |
-
return $subject;
|
114 |
-
}
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
/**
|
119 |
* Includes.
|
120 |
*/
|
121 |
private function includes() {
|
122 |
-
$
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
$files = glob( $result.'/import-hooks.php' );
|
134 |
-
if ( $files ) {
|
135 |
-
foreach ( $files as $file ) {
|
136 |
-
if ( $file && is_readable( $file ) ) {
|
137 |
-
include( $file );
|
138 |
-
}
|
139 |
}
|
140 |
}
|
141 |
}
|
@@ -180,8 +164,8 @@ class RRDI_Theme_Demo_Import {
|
|
180 |
function rrdi_settings_option_tabs() {
|
181 |
|
182 |
$options = array(
|
183 |
-
'
|
184 |
-
'
|
185 |
);
|
186 |
$options = apply_filters( 'rrdi_settings_option_tabs', $options );
|
187 |
return $options;
|
@@ -227,7 +211,7 @@ class RRDI_Theme_Demo_Import {
|
|
227 |
<h1><?php
|
228 |
esc_html_e( 'RARA Demo Import', 'rara-one-click-demo-import' );
|
229 |
if ( current_user_can( 'upload_files' ) ) {
|
230 |
-
echo ' <button type="button" class="upload-view-toggle page-title-action hide-if-no-js tg-demo-upload" aria-expanded="false">' . __( 'Upload Demo', 'rara-one-click-demo-import' ) . '</button>';
|
231 |
}
|
232 |
?>
|
233 |
</h1>
|
63 |
add_action( 'init', array( $this, 'setup' ), 5 );
|
64 |
$get_theme = wp_get_theme();
|
65 |
|
66 |
+
if( $get_theme->get( 'AuthorURI' ) == 'http://raratheme.com/' || $get_theme->get( 'AuthorURI' ) == 'https://raratheme.com/' || $get_theme->get( 'AuthorURI' ) == 'http://raratheme.com' || $get_theme->get( 'AuthorURI' ) == 'https://raratheme.com' )
|
67 |
{
|
68 |
add_action( 'admin_menu', array( $this, 'create_plugin_page' ) );
|
69 |
}
|
105 |
return $ret_val;
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
/**
|
109 |
* Includes.
|
110 |
*/
|
111 |
private function includes() {
|
112 |
+
$get_theme = wp_get_theme();
|
113 |
+
if( $get_theme->get( 'AuthorURI' ) == 'http://raratheme.com/' || $get_theme->get( 'AuthorURI' ) == 'https://raratheme.com/' || $get_theme->get( 'AuthorURI' ) == 'http://raratheme.com' || $get_theme->get( 'AuthorURI' ) == 'https://raratheme.com' )
|
114 |
+
{
|
115 |
+
$td = $get_theme->get( 'TextDomain' );
|
116 |
+
if ( strpos($td, 'pro') === false )
|
117 |
+
{
|
118 |
+
$upload_dir = wp_upload_dir();
|
119 |
+
// Check the folder contains at least 1 valid demo config.
|
120 |
+
$path = $upload_dir['basedir'] . '/rara-demo-pack/';
|
121 |
+
$files = $path.$td.'/import-hooks.php';
|
122 |
+
include($files);
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
}
|
124 |
}
|
125 |
}
|
164 |
function rrdi_settings_option_tabs() {
|
165 |
|
166 |
$options = array(
|
167 |
+
'Demo_Import' => 'welcome.php',
|
168 |
+
'Pro_Theme_Demo_Import' => 'installed-demos.php',
|
169 |
);
|
170 |
$options = apply_filters( 'rrdi_settings_option_tabs', $options );
|
171 |
return $options;
|
211 |
<h1><?php
|
212 |
esc_html_e( 'RARA Demo Import', 'rara-one-click-demo-import' );
|
213 |
if ( current_user_can( 'upload_files' ) ) {
|
214 |
+
echo ' <button type="button" class="upload-view-toggle page-title-action hide-if-no-js tg-demo-upload" aria-expanded="false">' . __( 'Upload Demo File', 'rara-one-click-demo-import' ) . '</button>';
|
215 |
}
|
216 |
?>
|
217 |
</h1>
|
includes/settings/installed-demos.php
CHANGED
@@ -3,9 +3,6 @@
|
|
3 |
</p>
|
4 |
</div>
|
5 |
<div class="rrdi wrap about-wrap">
|
6 |
-
|
7 |
-
<h2><?php esc_html_e( 'Rara One Click Demo Import', 'rara-one-click-demo-import' ); ?></h2>
|
8 |
-
|
9 |
<?php
|
10 |
|
11 |
// Display warrning if PHP safe mode is enabled, since we wont be able to change the max_execution_time.
|
@@ -28,10 +25,12 @@
|
|
28 |
<p class="about-description">
|
29 |
<?php
|
30 |
$link = '<a href="https://raratheme.com/">Rara Theme</a>';
|
|
|
31 |
$bold = '<b>';
|
32 |
$boldclose = '</b>';
|
|
|
33 |
|
34 |
-
$msg = sprintf( __( '
|
35 |
</p>
|
36 |
|
37 |
<h3><?php esc_html_e( 'The following data will be imported:', 'rara-one-click-demo-import' ); ?></h3>
|
@@ -44,9 +43,10 @@
|
|
44 |
<li><?php esc_html_e( 'Menus', 'rara-one-click-demo-import' ); ?></li>
|
45 |
<li><?php esc_html_e( 'Settings', 'rara-one-click-demo-import' ); ?></li>
|
46 |
</ul>
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
50 |
<hr>
|
51 |
|
52 |
</div>
|
@@ -57,6 +57,18 @@
|
|
57 |
// Display the plugin intro text (can be replaced with custom text through the filter below).
|
58 |
echo wp_kses_post( apply_filters( 'rrdi/plugin_intro_text', $plugin_intro_text ) );
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
// Check the folder contains at least 1 valid demo config.
|
61 |
$upload_dir = wp_upload_dir();
|
62 |
$path = $upload_dir['basedir'] . '/rara-demo-pack/';
|
@@ -85,11 +97,6 @@
|
|
85 |
|
86 |
if ( empty( $this->import_files ) ) : ?>
|
87 |
|
88 |
-
<div class="RRDI__file-upload-container">
|
89 |
-
<?php $bold= '<b>'; $boldclose = '</b>';?>
|
90 |
-
<br><h4 style="color:red"><?php echo sprintf( __( 'To import data, go to %1$s Welcome%2$s tab and upload the demo zip file and import demo data as mentioned there.','rara-one-click-demo-import'), $bold, $boldclose).'</h4>'; ?></h4>
|
91 |
-
</div>
|
92 |
-
|
93 |
<?php elseif ( 1 < count( $this->import_files ) ) : ?>
|
94 |
|
95 |
<div class="RRDI__multi-select-import">
|
@@ -138,16 +145,6 @@
|
|
138 |
|
139 |
<?php endif;
|
140 |
|
141 |
-
if ( strpos($td, 'pro') === false && !empty( $this->import_files ) ) { ?>
|
142 |
-
|
143 |
-
<div class="RRDI__file-upload-container">
|
144 |
-
<?php $bold= '<b>'; $boldclose = '</b>';?>
|
145 |
-
<br><h5 style="color:red"><?php echo sprintf( __( 'Note: For free themes, always upload the appropriate demo zip file from %1$s Welcome%2$s tab and import demo data as mentioned there.','rara-one-click-demo-import'), $bold, $boldclose).'</h4>'; ?></h5>
|
146 |
-
</div>
|
147 |
-
<?php
|
148 |
-
}
|
149 |
-
|
150 |
-
|
151 |
$upload_dir = wp_upload_dir();
|
152 |
|
153 |
$directory = $upload_dir['basedir']."/rara-demo-pack/";
|
3 |
</p>
|
4 |
</div>
|
5 |
<div class="rrdi wrap about-wrap">
|
|
|
|
|
|
|
6 |
<?php
|
7 |
|
8 |
// Display warrning if PHP safe mode is enabled, since we wont be able to change the max_execution_time.
|
25 |
<p class="about-description">
|
26 |
<?php
|
27 |
$link = '<a href="https://raratheme.com/">Rara Theme</a>';
|
28 |
+
$doc = '<a href="https://raratheme.com/documentation/" target="_blank">documentation</a>';
|
29 |
$bold = '<b>';
|
30 |
$boldclose = '</b>';
|
31 |
+
$wpreset = '<a href="https://wordpress.org/plugins/wp-reset" target="_blank">WP Reset</a>';
|
32 |
|
33 |
+
$msg = sprintf( __( 'If you are using premium themes by %1$s, just click Import Now button below. Alternatively, you can download zip files from the %2$s page of your theme and upload it as mentioned in Demo Import tab. As simple as that.', 'rara-one-click-demo-import' ), $link, $doc); echo apply_filters( 'rrdi_import_instruction',$msg ); ?>
|
34 |
</p>
|
35 |
|
36 |
<h3><?php esc_html_e( 'The following data will be imported:', 'rara-one-click-demo-import' ); ?></h3>
|
43 |
<li><?php esc_html_e( 'Menus', 'rara-one-click-demo-import' ); ?></li>
|
44 |
<li><?php esc_html_e( 'Settings', 'rara-one-click-demo-import' ); ?></li>
|
45 |
</ul>
|
46 |
+
<?php
|
47 |
+
$wpreset = '<a href="https://wordpress.org/plugins/wp-reset" target="_blank">WP Reset</a>'; ?>
|
48 |
+
<p><h4><?php $msg = sprintf( __( 'Note: To import demo content for the free themes, please follow the step-by-step instructions mentioned in the %1$s Demo Import %2$s tab.','rara-one-click-demo-import' ), $bold, $boldclose ); echo apply_filters( 'rrdi_fresh_install_instruction',$msg );?></h4></p>
|
49 |
+
<p><h4><?php echo sprintf( __( 'Note: We highly recommend to import the demo content on a fresh WordPress installation. You can reset your website to a fresh WordPress installation using a reset plugin like %1$s.','rara-one-click-demo-import'), $wpreset); ?></h4></p>
|
50 |
<hr>
|
51 |
|
52 |
</div>
|
57 |
// Display the plugin intro text (can be replaced with custom text through the filter below).
|
58 |
echo wp_kses_post( apply_filters( 'rrdi/plugin_intro_text', $plugin_intro_text ) );
|
59 |
|
60 |
+
$my_theme = wp_get_theme();
|
61 |
+
$td = $my_theme->get( 'TextDomain' );
|
62 |
+
|
63 |
+
if ( strpos($td, 'pro') === false && !empty( $this->import_files ) ) { ?>
|
64 |
+
|
65 |
+
<div class="RRDI__file-upload-container">
|
66 |
+
<?php $bold= '<b>'; $boldclose = '</b>';?>
|
67 |
+
<br><h4 style="color:red"><?php echo sprintf( __( 'Note: For free themes, always upload the appropriate demo zip file from %1$s Demo Import %2$s tab and import demo data as mentioned there.','rara-one-click-demo-import'), $bold, $boldclose); ?></h4>
|
68 |
+
</div>
|
69 |
+
<?php
|
70 |
+
}
|
71 |
+
|
72 |
// Check the folder contains at least 1 valid demo config.
|
73 |
$upload_dir = wp_upload_dir();
|
74 |
$path = $upload_dir['basedir'] . '/rara-demo-pack/';
|
97 |
|
98 |
if ( empty( $this->import_files ) ) : ?>
|
99 |
|
|
|
|
|
|
|
|
|
|
|
100 |
<?php elseif ( 1 < count( $this->import_files ) ) : ?>
|
101 |
|
102 |
<div class="RRDI__multi-select-import">
|
145 |
|
146 |
<?php endif;
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
$upload_dir = wp_upload_dir();
|
149 |
|
150 |
$directory = $upload_dir['basedir']."/rara-demo-pack/";
|
includes/settings/welcome.php
CHANGED
@@ -8,20 +8,22 @@
|
|
8 |
</form>
|
9 |
</div>
|
10 |
<ol>
|
|
|
11 |
<li><?php
|
12 |
-
$wpreset = '<a href="https://wordpress.org/plugins/wp-reset">WP Reset</a>';
|
13 |
-
|
|
|
|
|
|
|
14 |
<li>
|
15 |
<?php
|
16 |
-
$link = '<a href="https://raratheme.com/">Rara Theme</a>';
|
17 |
-
$demos = '<a href="https://raratheme.com/">Theme Demos</a>';
|
18 |
$bold = '<b>';
|
19 |
$boldclose = '</b>';
|
20 |
-
echo sprintf( __( '
|
21 |
</li>
|
22 |
-
<li><?php echo sprintf( __( '
|
23 |
-
<li><?php echo sprintf( __( 'Click %1$
|
24 |
-
<
|
25 |
-
<li><?php echo sprintf( __( 'After successful installation, return to %1$s Demo Importer %2$s and go to %1$s Import Demo %2$s.','rara-one-click-demo-import'),$bold, $boldclose );?></li>
|
26 |
-
<li><?php echo sprintf( __( 'Click %1$s Import Now %2$s and wait for few minutes. Done!','rara-one-click-demo-import' ),$bold, $boldclose );?></li>
|
27 |
</ol>
|
8 |
</form>
|
9 |
</div>
|
10 |
<ol>
|
11 |
+
<h3><?php _e('A Step-by-Step Guide to Import the Demo Content','rara-one-click-demo-import'); ?></h3>
|
12 |
<li><?php
|
13 |
+
$wpreset = '<a href="https://wordpress.org/plugins/wp-reset" target="_blank">WP Reset</a>';
|
14 |
+
$doc = '<a href="https://raratheme.com/documentation/" target="_blank">documentation</a>';
|
15 |
+
$support = '<a href="https://raratheme.com/support-ticket/" target="_blank">contact our support team</a>';
|
16 |
+
echo sprintf( __( 'Download the demo file from your theme %1$s page. If you are unable to download the demo file, please %2$s.','rara-one-click-demo-import' ) , $doc, $support );?>
|
17 |
+
</li>
|
18 |
<li>
|
19 |
<?php
|
20 |
+
$link = '<a href="https://raratheme.com/" target="_blank">Rara Theme</a>';
|
21 |
+
$demos = '<a href="https://raratheme.com/" target="_blank">Theme Demos</a>';
|
22 |
$bold = '<b>';
|
23 |
$boldclose = '</b>';
|
24 |
+
echo sprintf( __( 'Click on the %1$sUpload Demo File%2$s button above.', 'rara-one-click-demo-import' ), $bold, $boldclose ); ?>
|
25 |
</li>
|
26 |
+
<li><?php echo sprintf( __( 'Click on %1$sChoose File%2$s button and upload the demo file downloaded in step 1. Then, click on the %3$sInstall Now%4$s button.','rara-one-click-demo-import'), $bold, $boldclose, $bold, $boldclose );?></li>
|
27 |
+
<li><?php echo sprintf( __( 'Click on the %1$sImport Demo Now!%2$s button to begin demo installation. It will take few minutes to successfully import the demo.','rara-one-click-demo-import'),$bold, $boldclose );?></li>
|
28 |
+
<h4><?php echo sprintf( __( 'Note: We highly recommend to import the demo content on a fresh WordPress installation. You can reset your website to a fresh WordPress installation using a reset plugin like %1$s.','rara-one-click-demo-import'), $wpreset); ?></h4>
|
|
|
|
|
29 |
</ol>
|
includes/vendor/class-demo-installer-skin.php
CHANGED
@@ -44,11 +44,11 @@ class RDDI_Demo_Installer_Skin extends WP_Upgrader_Skin {
|
|
44 |
$from = isset( $_GET['from'] ) ? wp_unslash( $_GET['from'] ) : 'demos';
|
45 |
|
46 |
if ( 'web' == $this->type ) {
|
47 |
-
$install_actions['demos_page'] = '<a href="' . admin_url( 'themes.php?page=rara-demo-import&browse=uploads' ) . '" target="_parent">' . __( 'Return to Demo Importer', 'rara-one-click-demo-import' ) . '</a>';
|
48 |
} elseif ( 'upload' == $this->type && 'demos' == $from ) {
|
49 |
-
$install_actions['demos_page'] = '<a href="' . admin_url( 'themes.php?page=rara-demo-import&browse=uploads' ) . '">' . __( 'Return to Demo Importer', 'rara-one-click-demo-import' ) . '</a>';
|
50 |
} else {
|
51 |
-
$install_actions['demos_page'] = '<a href="' . admin_url( 'themes.php?page=rara-demo-import&browse=uploads' ) . '" target="_parent">' . __( 'Return to Demos page', 'rara-one-click-demo-import' ) . '</a>';
|
52 |
}
|
53 |
|
54 |
/**
|
44 |
$from = isset( $_GET['from'] ) ? wp_unslash( $_GET['from'] ) : 'demos';
|
45 |
|
46 |
if ( 'web' == $this->type ) {
|
47 |
+
$install_actions['demos_page'] = '<a class="demo-importer" href="' . admin_url( 'themes.php?page=rara-demo-import&browse=uploads' ) . '" target="_parent">' . __( 'Return to Demo Importer', 'rara-one-click-demo-import' ) . '</a>';
|
48 |
} elseif ( 'upload' == $this->type && 'demos' == $from ) {
|
49 |
+
$install_actions['demos_page'] = '<a class="demo-importer" href="' . admin_url( 'themes.php?page=rara-demo-import&browse=uploads' ) . '">' . __( 'Return to Demo Importer', 'rara-one-click-demo-import' ) . '</a>';
|
50 |
} else {
|
51 |
+
$install_actions['demos_page'] = '<a class="demo-importer" href="' . admin_url( 'themes.php?page=rara-demo-import&browse=uploads' ) . '" target="_parent">' . __( 'Return to Demos page', 'rara-one-click-demo-import' ) . '</a>';
|
52 |
}
|
53 |
|
54 |
/**
|
includes/vendor/class-demo-upgrader.php
CHANGED
@@ -38,16 +38,16 @@ class RDDI_Demo_Upgrader extends WP_Upgrader {
|
|
38 |
*/
|
39 |
public function install_strings() {
|
40 |
$this->strings['no_package'] = __( 'Install package not available.', 'rara-one-click-demo-importer' );
|
41 |
-
$this->strings['downloading_package'] = __( '
|
42 |
-
$this->strings['unpack_package'] = __( '
|
43 |
-
$this->strings['remove_old'] = __( '
|
44 |
-
$this->strings['remove_old_failed'] = __( '
|
45 |
-
$this->strings['installing_package'] = __( '
|
46 |
$this->strings['no_files'] = __( 'The demo contains no files.', 'rara-one-click-demo-importer' );
|
47 |
-
$this->strings['process_failed'] = __( '
|
48 |
$bold = '<b>';
|
49 |
$boldclose = '</b>';
|
50 |
-
$this->strings['process_success'] = __( '
|
51 |
}
|
52 |
|
53 |
/**
|
@@ -77,7 +77,6 @@ class RDDI_Demo_Upgrader extends WP_Upgrader {
|
|
77 |
|
78 |
$this->init();
|
79 |
$this->install_strings();
|
80 |
-
|
81 |
add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
|
82 |
|
83 |
$this->run( array(
|
38 |
*/
|
39 |
public function install_strings() {
|
40 |
$this->strings['no_package'] = __( 'Install package not available.', 'rara-one-click-demo-importer' );
|
41 |
+
$this->strings['downloading_package'] = __( '' );
|
42 |
+
$this->strings['unpack_package'] = __( '', 'rara-one-click-demo-importer' );
|
43 |
+
$this->strings['remove_old'] = __( '', 'rara-one-click-demo-importer' );
|
44 |
+
$this->strings['remove_old_failed'] = __( '', 'rara-one-click-demo-importer' );
|
45 |
+
$this->strings['installing_package'] = __( '', 'rara-one-click-demo-importer' );
|
46 |
$this->strings['no_files'] = __( 'The demo contains no files.', 'rara-one-click-demo-importer' );
|
47 |
+
$this->strings['process_failed'] = __( '', 'rara-one-click-demo-importer' );
|
48 |
$bold = '<b>';
|
49 |
$boldclose = '</b>';
|
50 |
+
$this->strings['process_success'] = __( 'Click the button below to begin the import process.' , 'rara-one-click-demo-importer' ).'<p class="RRDI__ajax-loader js-rrdi-ajax-loader"><span class="spinner"></span>'.'</p><button class="RRDI__button button button-hero button-primary js-rrdi-import-data">'.__('Import Demo Now!','rara-one-click-demo-importer').'</button><div class="RRDI__response js-rrdi-ajax-response"></div>'.'<p><a class="home-page-url" target="_blank" href="'.esc_url( home_url( '/' ) ).'">Check the front page</a>';
|
51 |
}
|
52 |
|
53 |
/**
|
77 |
|
78 |
$this->init();
|
79 |
$this->install_strings();
|
|
|
80 |
add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
|
81 |
|
82 |
$this->run( array(
|
rara-demo-import.php → rara-one-click-demo-import.php
RENAMED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: RARA One Click Demo Import
|
4 |
Plugin URI: https://wordpress.org/plugins/rara-one-click-demo-import/
|
5 |
Description: Import demo content, widgets and settings of themes made by RaraTheme.com with just one click.
|
6 |
-
Version: 1.0.
|
7 |
Author: raratheme
|
8 |
Author URI: https://www.raratheme.com
|
9 |
License: GPL3
|
@@ -17,15 +17,10 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
17 |
define( 'RRDI_PATH', plugin_dir_path( __FILE__ ) );
|
18 |
|
19 |
// Current version of the plugin.
|
20 |
-
define( 'RRDI_VERSION', '1.0.
|
21 |
|
22 |
// Path/URL to root of this plugin, with trailing slash.
|
23 |
define( 'RRDI_URL', plugin_dir_url( __FILE__ ) );
|
24 |
|
25 |
require RRDI_PATH . 'includes/class-rrdi-init.php';
|
26 |
|
27 |
-
// $upload_dir = wp_upload_dir();
|
28 |
-
// $path = $upload_dir['basedir'] . '/rara-demo-pack/';
|
29 |
-
|
30 |
-
// $dir = $path;
|
31 |
-
|
3 |
Plugin Name: RARA One Click Demo Import
|
4 |
Plugin URI: https://wordpress.org/plugins/rara-one-click-demo-import/
|
5 |
Description: Import demo content, widgets and settings of themes made by RaraTheme.com with just one click.
|
6 |
+
Version: 1.0.9
|
7 |
Author: raratheme
|
8 |
Author URI: https://www.raratheme.com
|
9 |
License: GPL3
|
17 |
define( 'RRDI_PATH', plugin_dir_path( __FILE__ ) );
|
18 |
|
19 |
// Current version of the plugin.
|
20 |
+
define( 'RRDI_VERSION', '1.0.8' );
|
21 |
|
22 |
// Path/URL to root of this plugin, with trailing slash.
|
23 |
define( 'RRDI_URL', plugin_dir_url( __FILE__ ) );
|
24 |
|
25 |
require RRDI_PATH . 'includes/class-rrdi-init.php';
|
26 |
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,47 +1,51 @@
|
|
1 |
-
===
|
2 |
Contributors: raratheme
|
3 |
-
Donate link: https://raratheme.com/
|
4 |
Tags: import, content, demo, data, widgets, settings
|
5 |
Requires at least: 4.0.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv3 or later
|
9 |
|
10 |
-
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
|
20 |
The demo content will make your website look like the preview of a theme so that you get a basic guideline for making your website.
|
21 |
|
22 |
Once installed and activated, Rara One Click Demo Import will be accessible through **Appearance > Rara Demo Import**.
|
23 |
|
24 |
-
If you use
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
2. WIE or JSON File: This is optional file. This file imports widgets. You can create the WIE or JSON File using [Widget Importer & Exporter](https://wordpress.org/plugins/widget-importer-exporter/) plugin.
|
29 |
-
|
30 |
-
3. DAT File: This is also optional file. This file will import customizer settings. You can create a DAT file using [Customizer Export/Import] (https://wordpress.org/plugins/customizer-export-import/) plugin.
|
31 |
|
32 |
You can find the detail documentation [here](https://raratheme.com/blog/import-demo-content-rara-themes/)
|
33 |
|
|
|
|
|
34 |
This plugin is based on the 'Theme Demo Import' plugin by Themely, https://wordpress.org/plugins/theme-demo-import/
|
35 |
|
36 |
As well as the improved WP Import 2.0 plugin by @humanmade, https://github.com/humanmade/WordPress-Importer.
|
37 |
|
38 |
== Installation ==
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
**
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
45 |
|
46 |
Once the plugin is activated, you will find the actual import page in **Appearance > Rara Demo Import**
|
47 |
|
@@ -59,22 +63,19 @@ The log file will be registered in the *wp-admin -> Media* section.
|
|
59 |
|
60 |
= I can't activate the plugin because of a fatal error. What can I do? =
|
61 |
|
62 |
-
*Update: There is
|
63 |
|
64 |
You want to activate the plugin, but this error shows up:
|
65 |
|
66 |
*Plugin could not be activated because it triggered a fatal error*
|
67 |
|
68 |
-
This happens
|
69 |
-
|
70 |
-
=I am a theme developer. How do I use the plugin on my themes?=
|
71 |
-
|
72 |
-
If you are a theme developer, you can find detailed documentation [here](https://raratheme.com/blog/rara-one-click-demo-import-plugin-developers/)
|
73 |
|
74 |
== Screenshots ==
|
75 |
|
76 |
-
1.
|
77 |
-
2.
|
|
|
78 |
|
79 |
== License ==
|
80 |
|
@@ -109,7 +110,6 @@ You should have received a copy of the GNU General Public License along
|
|
109 |
with this program; if not, write to the Free Software Foundation, Inc.,
|
110 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
111 |
|
112 |
-
|
113 |
== Changelog ==
|
114 |
|
115 |
= 1.0.0 =
|
@@ -120,8 +120,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|
120 |
* FILTERS ADDED
|
121 |
|
122 |
= 1.0.2 =
|
123 |
-
*CODE CLEANUP
|
124 |
|
125 |
= 1.0.3 =
|
126 |
-
*
|
127 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Rara One Click Demo Import ===
|
2 |
Contributors: raratheme
|
|
|
3 |
Tags: import, content, demo, data, widgets, settings
|
4 |
Requires at least: 4.0.0
|
5 |
+
Tested up to: 4.8.2
|
6 |
+
Stable tag: 1.0.9
|
7 |
License: GPLv3 or later
|
8 |
|
9 |
+
Make your website look like the live demo of the theme with a click!
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
Do you love the demos of the themes made by Rara Theme? Or, need a guideline for setting up the themes?
|
14 |
|
15 |
+
Then, all you need is this plugin!
|
16 |
|
17 |
+
Rara One Click Demo Import plugin will help you import the demo content, including settings of the widgets and the customizer, with a click.
|
18 |
|
19 |
The demo content will make your website look like the preview of a theme so that you get a basic guideline for making your website.
|
20 |
|
21 |
Once installed and activated, Rara One Click Demo Import will be accessible through **Appearance > Rara Demo Import**.
|
22 |
|
23 |
+
If you use Premium themes made by Rara Themes, go to Pro Theme Demo Import tab and just click on ‘Import Now’ button and your website will look like the demo of the activated theme in no time.
|
24 |
|
25 |
+
If you use free themes made by Rara Themes, download the demo files from your [Theme Documentation](https://raratheme.com/documentation/) page, upload it using ‘Upload Demo File’ button on this plugin, and click Import Now. As simple as that.
|
|
|
|
|
|
|
|
|
26 |
|
27 |
You can find the detail documentation [here](https://raratheme.com/blog/import-demo-content-rara-themes/)
|
28 |
|
29 |
+
If you need help, contact our support team [here](https://raratheme.com/support-ticket/).
|
30 |
+
|
31 |
This plugin is based on the 'Theme Demo Import' plugin by Themely, https://wordpress.org/plugins/theme-demo-import/
|
32 |
|
33 |
As well as the improved WP Import 2.0 plugin by @humanmade, https://github.com/humanmade/WordPress-Importer.
|
34 |
|
35 |
== Installation ==
|
36 |
+
**Method 1:**
|
37 |
+
|
38 |
+
On your WordPress admin dashboard
|
39 |
+
Visit ‘Plugins > Add New’
|
40 |
+
Search for ‘RARA One Click Demo Import’ and install the plugin.
|
41 |
+
Activate ‘RARA One Click Demo Import ’ from your Plugins page.
|
42 |
|
43 |
+
**Method 2:**
|
44 |
|
45 |
+
Download the plugin from WordPress.org repository
|
46 |
+
On your WordPress admin dashboard, go to ‘Plugins> Add New> Upload Plugin’.
|
47 |
+
Upload the downloaded plugin file (rara-one-click-demo-import.zip) and click ‘Install Now’
|
48 |
+
Activate ‘Rara One Click Demo Import’ from your Plugins page.
|
49 |
|
50 |
Once the plugin is activated, you will find the actual import page in **Appearance > Rara Demo Import**
|
51 |
|
63 |
|
64 |
= I can't activate the plugin because of a fatal error. What can I do? =
|
65 |
|
66 |
+
*Update: There is an admin error notice, stating that the minimal PHP version required for this plugin is 5.3.2.*
|
67 |
|
68 |
You want to activate the plugin, but this error shows up:
|
69 |
|
70 |
*Plugin could not be activated because it triggered a fatal error*
|
71 |
|
72 |
+
This happens because your hosting server is using a very old version of PHP. This plugin requires PHP version of at least **5.3.x**, but we recommend version *5.6.x*. Please contact your hosting company and ask them to update the PHP version for your site.
|
|
|
|
|
|
|
|
|
73 |
|
74 |
== Screenshots ==
|
75 |
|
76 |
+
1. Upload Demo Button
|
77 |
+
2. Pro Theme Demo Screen
|
78 |
+
3. Free Theme Demo Import
|
79 |
|
80 |
== License ==
|
81 |
|
110 |
with this program; if not, write to the Free Software Foundation, Inc.,
|
111 |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
112 |
|
|
|
113 |
== Changelog ==
|
114 |
|
115 |
= 1.0.0 =
|
120 |
* FILTERS ADDED
|
121 |
|
122 |
= 1.0.2 =
|
123 |
+
* CODE CLEANUP
|
124 |
|
125 |
= 1.0.3 =
|
126 |
+
* PLUGIN DEPENDENCY CHECK
|
127 |
+
* COMPATIBILITY TEST
|
128 |
+
|
129 |
+
= 1.0.4 =
|
130 |
+
* COMPATIBILITY TEST
|
131 |
+
|
132 |
+
= 1.0.5 =
|
133 |
+
* RARA THEME DEPENDENT
|
134 |
+
|
135 |
+
= 1.0.6 =
|
136 |
+
* DEMO IMPORT PROCESS EASED
|
137 |
+
|
138 |
+
= 1.0.7 =
|
139 |
+
* CODE CLEAN UP
|
140 |
+
* SOME OPTIONAL FUNCTIONS REMOVED
|
141 |
+
|
142 |
+
= 1.0.8 =
|
143 |
+
* CODE CLEAN UP & DESIGN FIXES
|
144 |
+
|
145 |
+
= 1.0.9 =
|
146 |
+
* WARNING MESSAGE FIXED
|