Rara One Click Demo Import - Version 1.3.0

Version Description

  • fixes: Fixed CSRF related security issues in demo file upload.
  • Fixes: Minor Bug Fixes.
Download this release

Release Info

Developer raratheme
Plugin Icon 128x128 Rara One Click Demo Import
Version 1.3.0
Comparing to
See all releases

Code changes from version 1.2.9 to 1.3.0

includes/class-rrdi-init.php CHANGED
@@ -27,13 +27,12 @@ class RDDI_init
27
  add_action( 'admin_notices', 'rrdi_old_php_admin_error_notice' );
28
  }
29
  else {
30
-
31
- $upload = wp_upload_dir();
32
- $upload_dir = $upload['basedir'];
33
- $upload_dir = $upload_dir . '/rara-demo-pack';
34
- if (! is_dir($upload_dir)) {
35
- mkdir( $upload_dir, 0755 );
36
- }
37
 
38
  // Require main plugin file.
39
  require RRDI_PATH . 'includes/class-rrdi-main.php';
27
  add_action( 'admin_notices', 'rrdi_old_php_admin_error_notice' );
28
  }
29
  else {
30
+ $upload = wp_upload_dir();
31
+ $upload_dir = $upload['basedir'];
32
+ $upload_dir = $upload_dir . '/rara-demo-pack';
33
+ if (! is_dir($upload_dir)) {
34
+ mkdir( $upload_dir, 0755 );
35
+ }
 
36
 
37
  // Require main plugin file.
38
  require RRDI_PATH . 'includes/class-rrdi-main.php';
includes/class-rrdi-logger.php CHANGED
@@ -36,8 +36,8 @@ class RRDI_Logger extends RDDI_WP_Importer_Logger_CLI {
36
 
37
  printf(
38
  '[%s] %s' . PHP_EOL,
39
- strtoupper( $level ),
40
- $message
41
  );
42
  }
43
 
@@ -61,4 +61,4 @@ class RRDI_Logger extends RDDI_WP_Importer_Logger_CLI {
61
  $message
62
  );
63
  }
64
- }
36
 
37
  printf(
38
  '[%s] %s' . PHP_EOL,
39
+ esc_html( strtoupper( $level ) ),
40
+ wp_kses_post( $message )
41
  );
42
  }
43
 
61
  $message
62
  );
63
  }
64
+ }
includes/class-rrdi-main.php CHANGED
@@ -13,12 +13,14 @@ class RRDI_Theme_Demo_Import {
13
 
14
  /**
15
  * Demo packages.
 
16
  * @var array
17
  */
18
  public $demo_packages;
19
 
20
  /**
21
  * Demo installer.
 
22
  * @var bool
23
  */
24
  public $demo_installer = true;
@@ -63,9 +65,8 @@ class RRDI_Theme_Demo_Import {
63
  protected function __construct() {
64
  require RRDI_PATH . 'includes/class-rrdi-include-files.php';
65
  // Actions.
66
-
67
- $this->includes();
68
 
 
69
 
70
  add_action( 'init', array( $this, 'setup' ), 5 );
71
  $get_theme = wp_get_theme();
@@ -73,7 +74,7 @@ class RRDI_Theme_Demo_Import {
73
  if ( $this->is_valid_theme_author() ) {
74
 
75
  add_action( 'admin_menu', array( $this, 'create_plugin_page' ) );
76
-
77
  }
78
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
79
  add_action( 'wp_ajax_rrdi_import_demo_data', array( $this, 'rrdi_import_demo_data_ajax_callback' ) );
@@ -111,45 +112,42 @@ class RRDI_Theme_Demo_Import {
111
  }
112
 
113
 
114
- function getNewestDir($path) {
115
  $working_dir = getcwd();
116
- chdir($path); ## chdir to requested dir
117
  $ret_val = false;
118
- if ($p = opendir($path) ) {
119
- while (false !== ($file = readdir($p))) {
120
- if ($file[0] != '.' && is_dir($file)) {
121
- $list[] = date('YmdHis', filemtime($path.'/'.$file)).$path.'/'.$file;
122
  }
123
  }
124
- if( isset($list) )
125
- {
126
- rsort($list);
127
  $ret_val = $list[0];
128
  }
129
  }
130
- chdir($working_dir); ## chdir back to script's dir
131
  return $ret_val;
132
- }
133
 
134
  /**
135
  * Includes.
136
  */
137
  private function includes() {
138
-
139
  $get_theme = wp_get_theme();
140
 
141
-
142
  if ( $this->is_valid_theme_author() ) {
143
 
144
- $td = $get_theme->get( 'TextDomain' ).'-demo-content';
145
- if ( strpos($td, 'pro') === false )
146
- {
147
  $upload_dir = wp_upload_dir();
148
  // Check the folder contains at least 1 valid demo config.
149
- $path = $upload_dir['basedir'] . '/rara-demo-pack/';
150
- $files = $path.$td.'/import-hooks.php';
151
- if (file_exists($files) && is_readable($files)) {
152
- include($files);
153
  }
154
  }
155
  }
@@ -175,10 +173,12 @@ class RRDI_Theme_Demo_Import {
175
  * Creates the plugin page and a submenu item in WP Appearance menu.
176
  */
177
  public function create_plugin_page() {
178
- $plugin_page_setup = apply_filters( 'rrdi/plugin_page_setup', array(
 
 
179
  'parent_slug' => 'themes.php',
180
- 'page_title' => esc_html__( 'Rara One Click Demo Import' , 'rara-one-click-demo-import' ),
181
- 'menu_title' => esc_html__( 'Rara Demo Import' , 'rara-one-click-demo-import' ),
182
  'capability' => 'import',
183
  'menu_slug' => 'rara-demo-import',
184
  )
@@ -188,29 +188,29 @@ class RRDI_Theme_Demo_Import {
188
  }
189
 
190
  /**
191
- * Settings Tabs.
192
- *
193
- * @since 1.0.4
194
- */
195
  function rrdi_settings_option_tabs() {
196
 
197
- $options = array(
198
- 'Before_You_Begin' => 'intro.php',
199
- 'Demo_Import' => 'welcome.php',
200
- 'Pro_Theme_Demo_Import' => 'installed-demos.php',
201
- );
202
- $options = apply_filters( 'rrdi_settings_option_tabs', $options );
203
- return $options;
204
- }
205
 
206
- private function rddi_upload_demo_pack() {
207
- include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
208
 
209
  if ( ! current_user_can( 'upload_files' ) ) {
210
  wp_die( __( 'Sorry, you are not allowed to install demo on this site.', 'rara-one-click-demo-import' ) );
211
  }
212
 
213
- // check_admin_referer( 'demo-upload' );
214
 
215
  $file_upload = new File_Upload_Upgrader( 'demozip', 'package' );
216
 
@@ -220,11 +220,11 @@ class RRDI_Theme_Demo_Import {
220
  $type = 'upload'; // Install demo type, From Web or an Upload.
221
 
222
  // Demo Upgrader Class.
223
- include_once( dirname( __FILE__ ) . '/vendor/class-demo-upgrader.php' );
224
- include_once( dirname( __FILE__ ) . '/vendor/class-demo-installer-skin.php' );
225
 
226
  $upgrader = new RDDI_Demo_Upgrader( new RDDI_Demo_Installer_Skin( compact( 'type', 'title', 'nonce', 'url' ) ) );
227
- $result = $upgrader->install( $file_upload->package );
228
 
229
  if ( $result || is_wp_error( $result ) ) {
230
  $file_upload->cleanup();
@@ -235,44 +235,55 @@ class RRDI_Theme_Demo_Import {
235
  * Plugin page display.
236
  */
237
  public function display_plugin_page() {
238
- if ( isset( $_GET['action'] ) && 'upload-demo' === $_GET['action'] ) {
239
  $this->rddi_upload_demo_pack();
240
- }
241
- else{ ?>
242
  <div class="wrap">
243
- <h1><?php
 
244
  esc_html_e( 'RARA Demo Import', 'rara-one-click-demo-import' );
245
- if ( current_user_can( 'upload_files' ) ) {
246
- 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>';
247
- }
248
  ?>
249
  </h1>
250
  <div id="tabs-container">
251
- <div class="tab">
252
- <ul class="tabs-menu">
253
  <?php
254
  $settings_tab = $this->rrdi_settings_option_tabs();
255
- $count = 0;
256
- foreach ($settings_tab as $key => $value) {
257
- $tab_label = preg_replace('/_/', ' ', $key);
258
- ?>
259
- <li <?php if($count==0){ ?>class="current"<?php } ?>><a href="<?php echo $key;?>"><?php echo $tab_label;?></a></li>
260
- <?php $count++;
261
- } ?>
262
- </ul>
263
- <?php
 
 
 
 
 
 
264
  $counter = 0;
265
- foreach ($settings_tab as $key => $value) { ?>
266
- <div id="<?php echo $key;?>" class="tab-content" <?php if($counter==0){ ?> style="display: block;" <?php } ?>>
267
- <?php
268
- include_once RRDI_PATH . '/includes/settings/'.strtolower($value);
269
- ?>
270
- </div>
271
- <?php $counter++; } ?>
272
- </div>
 
 
 
 
 
273
  </div>
274
  </div>
275
- <?php
276
  }
277
  }
278
 
@@ -314,25 +325,31 @@ class RRDI_Theme_Demo_Import {
314
  // Add demo notices.
315
  if ( isset( $demo_data['template'] ) && $current_template !== $demo_data['template'] ) {
316
  $demo_notices['required_theme'] = true;
317
- } elseif ( wp_list_filter( $plugins_list, array( 'required' => true, 'is_active' => false ) ) ) {
 
 
 
 
 
 
318
  $demo_notices['required_plugins'] = true;
319
  }
320
 
321
  // Prepare all demos.
322
  $prepared_demos[ $demo_id ] = array(
323
- 'id' => $demo_id,
324
- 'name' => $demo_data['name'],
325
- 'theme' => $demo_data['theme'],
326
- 'package' => $demo_package,
327
- 'screenshot' => $this->import_file_url( $demo_id, 'screenshot.jpg' ),
328
- 'description' => isset( $demo_data['description'] ) ? $demo_data['description'] : '',
329
- 'author' => isset( $demo_data['author'] ) ? $demo_data['author'] : __( 'rara', 'rara-one-click-demo-import' ),
330
- 'authorAndUri' => '<a href="http://rara.com" target="_blank">rara</a>',
331
- 'version' => isset( $demo_data['version'] ) ? $demo_data['version'] : '1.1.0',
332
- 'active' => $demo_id === $demo_imported_id,
333
- 'hasNotice' => $demo_notices,
334
- 'plugins' => $plugins_list,
335
- 'actions' => array(
336
  'preview' => home_url( '/' ),
337
  'demo_url' => $demo_data['demo_url'],
338
  'delete' => current_user_can( 'upload_files' ) ? wp_nonce_url( admin_url( 'themes.php?page=demo-importer&browse=uploads&action=delete&amp;demo_pack=' . urlencode( $demo_id ) ), 'delete-demo_' . $demo_id ) : null,
@@ -361,9 +378,11 @@ class RRDI_Theme_Demo_Import {
361
 
362
  // Enqueue the scripts only on the plugin page.
363
  if ( $this->plugin_page === $hook ) {
364
- wp_enqueue_script( 'rrdi-main-js', RRDI_URL . 'assets/js/script.js' , array( 'jquery', 'jquery-form' ), RRDI_VERSION );
365
 
366
- wp_localize_script( 'rrdi-main-js', 'rrdi',
 
 
367
  array(
368
  'ajax_url' => admin_url( 'admin-ajax.php' ),
369
  'ajax_nonce' => wp_create_nonce( 'rrdi-ajax-verification' ),
@@ -373,7 +392,7 @@ class RRDI_Theme_Demo_Import {
373
  ),
374
  )
375
  );
376
- wp_enqueue_style( 'rrdi-main-css', RRDI_URL . 'assets/css/style.css', array() , RRDI_VERSION );
377
  }
378
  }
379
 
@@ -426,8 +445,7 @@ class RRDI_Theme_Demo_Import {
426
 
427
  // Set the name of the import files, because we used the uploaded files.
428
  $this->import_files[ $this->selected_index ]['import_file_name'] = esc_html__( 'Manually uploaded files', 'rara-one-click-demo-import' );
429
- }
430
- elseif ( ! empty( $this->import_files[ $this->selected_index ] ) ) { // Use predefined import files from wp filter: rrdi/import_files.
431
 
432
  // Download the import files (content and widgets files) and save it to variable for later use.
433
  $this->selected_import_files = RRDI_Helpers::download_import_files(
@@ -453,10 +471,9 @@ class RRDI_Theme_Demo_Import {
453
  $this->import_files[ $this->selected_index ]['import_file_name']
454
  ) . RRDI_Helpers::import_file_info( $this->selected_import_files ),
455
  $this->log_file_path,
456
- esc_html__( 'Downloaded files' , 'rara-one-click-demo-import' )
457
  );
458
- }
459
- else {
460
 
461
  // Send JSON Error response to the AJAX call.
462
  wp_send_json( esc_html__( 'No import files specified!', 'rara-one-click-demo-import' ) );
@@ -513,16 +530,15 @@ class RRDI_Theme_Demo_Import {
513
  '</strong>',
514
  '</p></div>'
515
  );
516
- }
517
- else {
518
- $response['message'] = $this->frontend_error_messages . '<br>';
519
  $response['message'] .= sprintf(
520
  __( '%1$sUnfortunately, demo import has finished with some errors.%2$sMore details about the errors can be found in this %3$s%5$slog file%6$s%4$s%7$s', 'rara-one-click-demo-import' ),
521
  '<div class="notice notice-error"><p>',
522
  '<br>',
523
  '<strong>',
524
  '</strong>',
525
- '<a href="' . RRDI_Helpers::get_log_url( $this->log_file_path ) .'" target="_blank">',
526
  '</a>',
527
  '</p></div>'
528
  );
@@ -558,7 +574,8 @@ class RRDI_Theme_Demo_Import {
558
 
559
  // Disables generation of multiple image sizes (thumbnails) in the content import step.
560
  if ( ! apply_filters( 'rrdi/regenerate_thumbnails_in_content_import', true ) ) {
561
- add_filter( 'intermediate_image_sizes_advanced',
 
562
  function() {
563
  return null;
564
  }
@@ -573,9 +590,9 @@ class RRDI_Theme_Demo_Import {
573
 
574
  // Add this message to log file.
575
  $log_added = RRDI_Helpers::append_to_file(
576
- $message . PHP_EOL . esc_html__( 'Max execution time after content import = ' , 'rara-one-click-demo-import' ) . ini_get( 'max_execution_time' ),
577
  $this->log_file_path,
578
- esc_html__( 'Importing content' , 'rara-one-click-demo-import' )
579
  );
580
  }
581
 
@@ -626,7 +643,7 @@ class RRDI_Theme_Demo_Import {
626
  $log_added = RRDI_Helpers::append_to_file(
627
  $message,
628
  $this->log_file_path,
629
- esc_html__( 'Importing widgets' , 'rara-one-click-demo-import' )
630
  );
631
  }
632
 
@@ -656,7 +673,7 @@ class RRDI_Theme_Demo_Import {
656
  $log_added = RRDI_Helpers::append_to_file(
657
  esc_html__( 'Customizer settings import finished!', 'rara-one-click-demo-import' ),
658
  $this->log_file_path,
659
- esc_html__( 'Importing customizer settings' , 'rara-one-click-demo-import' )
660
  );
661
  }
662
 
@@ -706,7 +723,7 @@ class RRDI_Theme_Demo_Import {
706
 
707
  // Add message to log file.
708
  $log_added = RRDI_Helpers::append_to_file(
709
- __( 'Completed AJAX call number: ' , 'rara-one-click-demo-import' ) . $this->ajax_call_number . PHP_EOL . $message,
710
  $this->log_file_path,
711
  ''
712
  );
@@ -744,11 +761,11 @@ class RRDI_Theme_Demo_Import {
744
  */
745
  private function get_importer_data() {
746
  if ( $data = get_transient( 'RRDI_importer_data' ) ) {
747
- $this->frontend_error_messages = empty( $data['frontend_error_messages'] ) ? '' : $data['frontend_error_messages'];
748
- $this->ajax_call_number = empty( $data['ajax_call_number'] ) ? 1 : $data['ajax_call_number'];
749
- $this->log_file_path = empty( $data['log_file_path'] ) ? '' : $data['log_file_path'];
750
- $this->selected_index = empty( $data['selected_index'] ) ? 0 : $data['selected_index'];
751
- $this->selected_import_files = empty( $data['selected_import_files'] ) ? array() : $data['selected_import_files'];
752
  $this->importer->set_importer_data( $data );
753
 
754
  return true;
@@ -773,14 +790,20 @@ class RRDI_Theme_Demo_Import {
773
  $this->import_files = RRDI_Helpers::validate_import_file_info( apply_filters( 'rrdi/import_files', array() ) );
774
 
775
  // Importer options array.
776
- $importer_options = apply_filters( 'rrdi/importer_options', array(
777
- 'fetch_attachments' => true,
778
- ) );
 
 
 
779
 
780
  // Logger options for the logger used in the importer.
781
- $logger_options = apply_filters( 'rrdi/logger_options', array(
782
- 'logger_min_level' => 'warning',
783
- ) );
 
 
 
784
 
785
  // Configure logger instance and set it to the importer.
786
  $this->logger = new RRDI_Logger();
13
 
14
  /**
15
  * Demo packages.
16
+ *
17
  * @var array
18
  */
19
  public $demo_packages;
20
 
21
  /**
22
  * Demo installer.
23
+ *
24
  * @var bool
25
  */
26
  public $demo_installer = true;
65
  protected function __construct() {
66
  require RRDI_PATH . 'includes/class-rrdi-include-files.php';
67
  // Actions.
 
 
68
 
69
+ $this->includes();
70
 
71
  add_action( 'init', array( $this, 'setup' ), 5 );
72
  $get_theme = wp_get_theme();
74
  if ( $this->is_valid_theme_author() ) {
75
 
76
  add_action( 'admin_menu', array( $this, 'create_plugin_page' ) );
77
+
78
  }
79
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
80
  add_action( 'wp_ajax_rrdi_import_demo_data', array( $this, 'rrdi_import_demo_data_ajax_callback' ) );
112
  }
113
 
114
 
115
+ function getNewestDir( $path ) {
116
  $working_dir = getcwd();
117
+ chdir( $path ); // chdir to requested dir
118
  $ret_val = false;
119
+ if ( $p = opendir( $path ) ) {
120
+ while ( false !== ( $file = readdir( $p ) ) ) {
121
+ if ( $file[0] != '.' && is_dir( $file ) ) {
122
+ $list[] = date( 'YmdHis', filemtime( $path . '/' . $file ) ) . $path . '/' . $file;
123
  }
124
  }
125
+ if ( isset( $list ) ) {
126
+ rsort( $list );
 
127
  $ret_val = $list[0];
128
  }
129
  }
130
+ chdir( $working_dir ); // chdir back to script's dir
131
  return $ret_val;
132
+ }
133
 
134
  /**
135
  * Includes.
136
  */
137
  private function includes() {
138
+
139
  $get_theme = wp_get_theme();
140
 
 
141
  if ( $this->is_valid_theme_author() ) {
142
 
143
+ $td = $get_theme->get( 'TextDomain' ) . '-demo-content';
144
+ if ( strpos( $td, 'pro' ) === false ) {
 
145
  $upload_dir = wp_upload_dir();
146
  // Check the folder contains at least 1 valid demo config.
147
+ $path = $upload_dir['basedir'] . '/rara-demo-pack/';
148
+ $files = $path . $td . '/import-hooks.php';
149
+ if ( file_exists( $files ) && is_readable( $files ) ) {
150
+ include $files;
151
  }
152
  }
153
  }
173
  * Creates the plugin page and a submenu item in WP Appearance menu.
174
  */
175
  public function create_plugin_page() {
176
+ $plugin_page_setup = apply_filters(
177
+ 'rrdi/plugin_page_setup',
178
+ array(
179
  'parent_slug' => 'themes.php',
180
+ 'page_title' => esc_html__( 'Rara One Click Demo Import', 'rara-one-click-demo-import' ),
181
+ 'menu_title' => esc_html__( 'Rara Demo Import', 'rara-one-click-demo-import' ),
182
  'capability' => 'import',
183
  'menu_slug' => 'rara-demo-import',
184
  )
188
  }
189
 
190
  /**
191
+ * Settings Tabs.
192
+ *
193
+ * @since 1.0.4
194
+ */
195
  function rrdi_settings_option_tabs() {
196
 
197
+ $options = array(
198
+ 'Before_You_Begin' => 'intro.php',
199
+ 'Demo_Import' => 'welcome.php',
200
+ 'Pro_Theme_Demo_Import' => 'installed-demos.php',
201
+ );
202
+ $options = apply_filters( 'rrdi_settings_option_tabs', $options );
203
+ return $options;
204
+ }
205
 
206
+ private function rddi_upload_demo_pack() {
207
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
208
 
209
  if ( ! current_user_can( 'upload_files' ) ) {
210
  wp_die( __( 'Sorry, you are not allowed to install demo on this site.', 'rara-one-click-demo-import' ) );
211
  }
212
 
213
+ check_admin_referer( 'demo-upload' );
214
 
215
  $file_upload = new File_Upload_Upgrader( 'demozip', 'package' );
216
 
220
  $type = 'upload'; // Install demo type, From Web or an Upload.
221
 
222
  // Demo Upgrader Class.
223
+ include_once dirname( __FILE__ ) . '/vendor/class-demo-upgrader.php';
224
+ include_once dirname( __FILE__ ) . '/vendor/class-demo-installer-skin.php';
225
 
226
  $upgrader = new RDDI_Demo_Upgrader( new RDDI_Demo_Installer_Skin( compact( 'type', 'title', 'nonce', 'url' ) ) );
227
+ $result = $upgrader->install( $file_upload->package );
228
 
229
  if ( $result || is_wp_error( $result ) ) {
230
  $file_upload->cleanup();
235
  * Plugin page display.
236
  */
237
  public function display_plugin_page() {
238
+ if ( isset( $_GET['action'] ) && 'upload-demo' === $_GET['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
239
  $this->rddi_upload_demo_pack();
240
+ } else { ?>
 
241
  <div class="wrap">
242
+ <h1>
243
+ <?php
244
  esc_html_e( 'RARA Demo Import', 'rara-one-click-demo-import' );
245
+ if ( current_user_can( 'upload_files' ) ) {
246
+ 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>';
247
+ }
248
  ?>
249
  </h1>
250
  <div id="tabs-container">
251
+ <div class="tab">
252
+ <ul class="tabs-menu">
253
  <?php
254
  $settings_tab = $this->rrdi_settings_option_tabs();
255
+ $count = 0;
256
+ foreach ( $settings_tab as $key => $value ) {
257
+ $tab_label = preg_replace( '/_/', ' ', $key );
258
+ ?>
259
+ <li
260
+ <?php
261
+ if ( $count == 0 ) {
262
+ ?>
263
+ class="current"<?php } ?>><a href="<?php echo esc_attr( $key ); ?>"><?php echo esc_html( $tab_label ); ?></a></li>
264
+ <?php
265
+ $count++;
266
+ }
267
+ ?>
268
+ </ul>
269
+ <?php
270
  $counter = 0;
271
+ foreach ( $settings_tab as $key => $value ) {
272
+ ?>
273
+ <div id="<?php echo esc_attr( $key ); ?>" class="tab-content"
274
+ <?php
275
+ if ( $counter == 0 ) {
276
+ ?>
277
+ style="display: block;" <?php } ?>>
278
+ <?php
279
+ include_once RRDI_PATH . '/includes/settings/' . strtolower( $value );
280
+ ?>
281
+ </div>
282
+ <?php $counter++; } ?>
283
+ </div>
284
  </div>
285
  </div>
286
+ <?php
287
  }
288
  }
289
 
325
  // Add demo notices.
326
  if ( isset( $demo_data['template'] ) && $current_template !== $demo_data['template'] ) {
327
  $demo_notices['required_theme'] = true;
328
+ } elseif ( wp_list_filter(
329
+ $plugins_list,
330
+ array(
331
+ 'required' => true,
332
+ 'is_active' => false,
333
+ )
334
+ ) ) {
335
  $demo_notices['required_plugins'] = true;
336
  }
337
 
338
  // Prepare all demos.
339
  $prepared_demos[ $demo_id ] = array(
340
+ 'id' => $demo_id,
341
+ 'name' => $demo_data['name'],
342
+ 'theme' => $demo_data['theme'],
343
+ 'package' => $demo_package,
344
+ 'screenshot' => $this->import_file_url( $demo_id, 'screenshot.jpg' ),
345
+ 'description' => isset( $demo_data['description'] ) ? $demo_data['description'] : '',
346
+ 'author' => isset( $demo_data['author'] ) ? $demo_data['author'] : __( 'rara', 'rara-one-click-demo-import' ),
347
+ 'authorAndUri' => '<a href="http://rara.com" target="_blank">rara</a>',
348
+ 'version' => isset( $demo_data['version'] ) ? $demo_data['version'] : '1.1.0',
349
+ 'active' => $demo_id === $demo_imported_id,
350
+ 'hasNotice' => $demo_notices,
351
+ 'plugins' => $plugins_list,
352
+ 'actions' => array(
353
  'preview' => home_url( '/' ),
354
  'demo_url' => $demo_data['demo_url'],
355
  'delete' => current_user_can( 'upload_files' ) ? wp_nonce_url( admin_url( 'themes.php?page=demo-importer&browse=uploads&action=delete&amp;demo_pack=' . urlencode( $demo_id ) ), 'delete-demo_' . $demo_id ) : null,
378
 
379
  // Enqueue the scripts only on the plugin page.
380
  if ( $this->plugin_page === $hook ) {
381
+ wp_enqueue_script( 'rrdi-main-js', RRDI_URL . 'assets/js/script.js', array( 'jquery', 'jquery-form' ), RRDI_VERSION );
382
 
383
+ wp_localize_script(
384
+ 'rrdi-main-js',
385
+ 'rrdi',
386
  array(
387
  'ajax_url' => admin_url( 'admin-ajax.php' ),
388
  'ajax_nonce' => wp_create_nonce( 'rrdi-ajax-verification' ),
392
  ),
393
  )
394
  );
395
+ wp_enqueue_style( 'rrdi-main-css', RRDI_URL . 'assets/css/style.css', array(), RRDI_VERSION );
396
  }
397
  }
398
 
445
 
446
  // Set the name of the import files, because we used the uploaded files.
447
  $this->import_files[ $this->selected_index ]['import_file_name'] = esc_html__( 'Manually uploaded files', 'rara-one-click-demo-import' );
448
+ } elseif ( ! empty( $this->import_files[ $this->selected_index ] ) ) { // Use predefined import files from wp filter: rrdi/import_files.
 
449
 
450
  // Download the import files (content and widgets files) and save it to variable for later use.
451
  $this->selected_import_files = RRDI_Helpers::download_import_files(
471
  $this->import_files[ $this->selected_index ]['import_file_name']
472
  ) . RRDI_Helpers::import_file_info( $this->selected_import_files ),
473
  $this->log_file_path,
474
+ esc_html__( 'Downloaded files', 'rara-one-click-demo-import' )
475
  );
476
+ } else {
 
477
 
478
  // Send JSON Error response to the AJAX call.
479
  wp_send_json( esc_html__( 'No import files specified!', 'rara-one-click-demo-import' ) );
530
  '</strong>',
531
  '</p></div>'
532
  );
533
+ } else {
534
+ $response['message'] = $this->frontend_error_messages . '<br>';
 
535
  $response['message'] .= sprintf(
536
  __( '%1$sUnfortunately, demo import has finished with some errors.%2$sMore details about the errors can be found in this %3$s%5$slog file%6$s%4$s%7$s', 'rara-one-click-demo-import' ),
537
  '<div class="notice notice-error"><p>',
538
  '<br>',
539
  '<strong>',
540
  '</strong>',
541
+ '<a href="' . RRDI_Helpers::get_log_url( $this->log_file_path ) . '" target="_blank">',
542
  '</a>',
543
  '</p></div>'
544
  );
574
 
575
  // Disables generation of multiple image sizes (thumbnails) in the content import step.
576
  if ( ! apply_filters( 'rrdi/regenerate_thumbnails_in_content_import', true ) ) {
577
+ add_filter(
578
+ 'intermediate_image_sizes_advanced',
579
  function() {
580
  return null;
581
  }
590
 
591
  // Add this message to log file.
592
  $log_added = RRDI_Helpers::append_to_file(
593
+ $message . PHP_EOL . esc_html__( 'Max execution time after content import = ', 'rara-one-click-demo-import' ) . ini_get( 'max_execution_time' ),
594
  $this->log_file_path,
595
+ esc_html__( 'Importing content', 'rara-one-click-demo-import' )
596
  );
597
  }
598
 
643
  $log_added = RRDI_Helpers::append_to_file(
644
  $message,
645
  $this->log_file_path,
646
+ esc_html__( 'Importing widgets', 'rara-one-click-demo-import' )
647
  );
648
  }
649
 
673
  $log_added = RRDI_Helpers::append_to_file(
674
  esc_html__( 'Customizer settings import finished!', 'rara-one-click-demo-import' ),
675
  $this->log_file_path,
676
+ esc_html__( 'Importing customizer settings', 'rara-one-click-demo-import' )
677
  );
678
  }
679
 
723
 
724
  // Add message to log file.
725
  $log_added = RRDI_Helpers::append_to_file(
726
+ __( 'Completed AJAX call number: ', 'rara-one-click-demo-import' ) . $this->ajax_call_number . PHP_EOL . $message,
727
  $this->log_file_path,
728
  ''
729
  );
761
  */
762
  private function get_importer_data() {
763
  if ( $data = get_transient( 'RRDI_importer_data' ) ) {
764
+ $this->frontend_error_messages = empty( $data['frontend_error_messages'] ) ? '' : $data['frontend_error_messages'];
765
+ $this->ajax_call_number = empty( $data['ajax_call_number'] ) ? 1 : $data['ajax_call_number'];
766
+ $this->log_file_path = empty( $data['log_file_path'] ) ? '' : $data['log_file_path'];
767
+ $this->selected_index = empty( $data['selected_index'] ) ? 0 : $data['selected_index'];
768
+ $this->selected_import_files = empty( $data['selected_import_files'] ) ? array() : $data['selected_import_files'];
769
  $this->importer->set_importer_data( $data );
770
 
771
  return true;
790
  $this->import_files = RRDI_Helpers::validate_import_file_info( apply_filters( 'rrdi/import_files', array() ) );
791
 
792
  // Importer options array.
793
+ $importer_options = apply_filters(
794
+ 'rrdi/importer_options',
795
+ array(
796
+ 'fetch_attachments' => true,
797
+ )
798
+ );
799
 
800
  // Logger options for the logger used in the importer.
801
+ $logger_options = apply_filters(
802
+ 'rrdi/logger_options',
803
+ array(
804
+ 'logger_min_level' => 'warning',
805
+ )
806
+ );
807
 
808
  // Configure logger instance and set it to the importer.
809
  $this->logger = new RRDI_Logger();
includes/extras/class-logger-cli.php CHANGED
@@ -6,9 +6,9 @@ class RDDI_WP_Importer_Logger_CLI extends RDDI_WP_Importer_Logger {
6
  /**
7
  * Logs with an arbitrary level.
8
  *
9
- * @param mixed $level
10
  * @param string $message
11
- * @param array $context
12
  * @return null
13
  */
14
  public function log( $level, $message, array $context = array() ) {
@@ -16,11 +16,13 @@ class RDDI_WP_Importer_Logger_CLI extends RDDI_WP_Importer_Logger {
16
  return;
17
  }
18
 
 
19
  printf(
20
  '[%s] %s' . PHP_EOL,
21
  strtoupper( $level ),
22
  $message
23
  );
 
24
  }
25
 
26
  public static function level_to_numeric( $level ) {
@@ -40,4 +42,4 @@ class RDDI_WP_Importer_Logger_CLI extends RDDI_WP_Importer_Logger {
40
 
41
  return $levels[ $level ];
42
  }
43
- }
6
  /**
7
  * Logs with an arbitrary level.
8
  *
9
+ * @param mixed $level
10
  * @param string $message
11
+ * @param array $context
12
  * @return null
13
  */
14
  public function log( $level, $message, array $context = array() ) {
16
  return;
17
  }
18
 
19
+ //phpcs:disable
20
  printf(
21
  '[%s] %s' . PHP_EOL,
22
  strtoupper( $level ),
23
  $message
24
  );
25
+ // phpcs:enable
26
  }
27
 
28
  public static function level_to_numeric( $level ) {
42
 
43
  return $levels[ $level ];
44
  }
45
+ }
includes/settings/installed-demos.php CHANGED
@@ -1,5 +1,6 @@
1
  <div class="RRDI__intro-notice notice notice-warning is-dismissible">
2
- <p><?php $msg = __( 'Before you begin, make sure all the required plugins are activated.', 'rara-one-click-demo-import' ); echo apply_filters( 'rrdi_before_import_msg', $msg); ?>
 
3
  </p>
4
  </div>
5
  <div class="rrdi wrap about-wrap">
@@ -8,8 +9,8 @@
8
  // Display warrning if PHP safe mode is enabled, since we wont be able to change the max_execution_time.
9
  if ( ini_get( 'safe_mode' ) ) {
10
  printf(
11
- esc_html__( '%sWarning: your server is using %sPHP safe mode%s. This means that you might experience server timeout errors.%s', 'rara-one-click-demo-import' ),
12
- '<div class="notice notice-warning is-dismissible"><p>',
13
  '<strong>',
14
  '</strong>',
15
  '</p></div>'
@@ -23,14 +24,25 @@
23
  <div class="RRDI__intro-text">
24
 
25
  <p class="about-description">
26
- <?php
27
- $link = '<a href="https://rarathemes.com/">Rara Theme</a>';
28
- $doc = '<a href="https://rarathemes.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>
@@ -44,9 +56,30 @@
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>
@@ -56,46 +89,63 @@
56
 
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/';
75
  $working_dir = getcwd();
76
- chdir($path); ## chdir to requested dir
77
  $ret_val = false;
78
- if ($p = opendir($path) ) {
79
- while (false !== ($file = readdir($p))) {
80
- if ($file[0] != '.' && is_dir($file)) {
81
- $list[] = date('YmdHis', filemtime($path.'/'.$file)).$path.'/'.$file;
82
  }
83
  }
84
- if( isset($list) )
85
- {
86
- rsort($list);
87
  $ret_val = $list[0];
88
  }
89
  }
90
- chdir($working_dir); ## chdir back to script's dir
91
 
92
  $my_theme = wp_get_theme();
93
- $td = $my_theme->get( 'TextDomain' );
94
 
95
- $sr = explode('/', $ret_val);
96
- $sr = end($sr);
97
 
98
- if ( empty( $this->import_files ) ) : ?>
 
99
 
100
  <?php elseif ( 1 < count( $this->import_files ) ) : ?>
101
 
@@ -122,18 +172,20 @@
122
  }
123
 
124
  if ( $preview_image_is_defined ) :
125
- ?>
126
 
127
  <div class="RRDI__demo-import-preview-container">
128
 
129
  <p><?php esc_html_e( 'Import preview:', 'rara-one-click-demo-import' ); ?></p>
130
 
131
- <p class="RRDI__demo-import-preview-image-message js-rrdi-preview-image-message"><?php
132
- if ( ! isset( $this->import_files[0]['import_preview_image_url'] ) ) {
133
- esc_html_e( 'No preview image defined for this import.', 'rara-one-click-demo-import' );
134
- }
 
135
  // Leave the img tag below and the p tag above available for later changes via JS.
136
- ?></p>
 
137
 
138
  <img id="RRDI__demo-import-preview-image" class="js-rrdi-preview-image" src="<?php echo ! empty( $this->import_files[0]['import_preview_image_url'] ) ? esc_url( $this->import_files[0]['import_preview_image_url'] ) : ''; ?>">
139
 
@@ -143,46 +195,32 @@
143
 
144
  </div>
145
 
146
- <?php endif;
 
147
 
148
  $upload_dir = wp_upload_dir();
149
 
150
- $directory = $upload_dir['basedir']."/rara-demo-pack/";
151
-
152
- //get all files in specified directory
153
- $files = glob($directory . "*",GLOB_ONLYDIR);
154
-
155
- //print each file name
156
- foreach($files as $file)
157
- {
158
- //check to see if the file is a folder/directory
159
- if(is_dir($file))
160
- {
161
- $arr[] = basename($file);
162
- }
163
- }
164
 
165
- function is_url_exists($url){
166
- $ch = curl_init($url);
167
- curl_setopt($ch, CURLOPT_NOBODY, true);
168
- curl_exec($ch);
169
- $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
170
-
171
- if($code == 200){
172
- $status = true;
173
- }else{
174
- $status = false;
175
- }
176
- curl_close($ch);
177
- return $status;
178
  }
 
179
  $my_theme = wp_get_theme();
180
 
181
- if ( is_array( $this->import_files ) && ! empty( $this->import_files[0]['import_notice'] ) ) { ?>
 
182
  <div class="RRDI__demo-import-notice js-rrdi-demo-import-notice">
183
  <?php echo wp_kses_post( $this->import_files[0]['import_notice'] ); ?>
184
  </div>
185
- <?php
186
  }
187
  ?>
188
 
@@ -196,4 +234,4 @@
196
  </p>
197
 
198
  <div class="RRDI__response js-rrdi-ajax-response"></div>
199
- </div>
1
  <div class="RRDI__intro-notice notice notice-warning is-dismissible">
2
+ <p><?php
3
+ echo apply_filters( 'rrdi_before_import_msg', esc_html__( 'Before you begin, make sure all the required plugins are activated.', 'rara-one-click-demo-import' ) ); ?>
4
  </p>
5
  </div>
6
  <div class="rrdi wrap about-wrap">
9
  // Display warrning if PHP safe mode is enabled, since we wont be able to change the max_execution_time.
10
  if ( ini_get( 'safe_mode' ) ) {
11
  printf(
12
+ esc_html__( '%1$sWarning: your server is using %2$sPHP safe mode%3$s. This means that you might experience server timeout errors.%4$s', 'rara-one-click-demo-import' ),
13
+ '<div class="notice notice-warning is-dismissible"><p>',
14
  '<strong>',
15
  '</strong>',
16
  '</p></div>'
24
  <div class="RRDI__intro-text">
25
 
26
  <p class="about-description">
27
+ <?php
28
+ $link = '<a href="https://rarathemes.com/">Rara Theme</a>';
29
+ $doc = '<a href="https://rarathemes.com/documentation/" target="_blank">documentation</a>';
30
+ $bold = '<b>';
31
  $boldclose = '</b>';
32
+ $wpreset = '<a href="https://wordpress.org/plugins/wp-reset" target="_blank">WP Reset</a>';
33
+
34
+ $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 );
35
+ echo wp_kses(
36
+ apply_filters( 'rrdi_import_instruction', $msg ),
37
+ array(
38
+ 'a' => array(
39
+ 'href' => array(),
40
+ 'target' => array(),
41
+ ),
42
+ 'b' => array(),
43
+ )
44
+ );
45
+ ?>
46
  </p>
47
 
48
  <h3><?php esc_html_e( 'The following data will be imported:', 'rara-one-click-demo-import' ); ?></h3>
56
  <li><?php esc_html_e( 'Settings', 'rara-one-click-demo-import' ); ?></li>
57
  </ul>
58
  <?php
59
+ $wpreset = '<a href="https://wordpress.org/plugins/wp-reset" target="_blank">WP Reset</a>';
60
+ ?>
61
+ <p><h4>
62
+ <?php
63
+ $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 );
64
+ echo wp_kses( apply_filters( 'rrdi_fresh_install_instruction', $msg ), array( 'b' => array() ) );
65
+ ?>
66
+ </h4></p>
67
+ <p><h4>
68
+ <?php
69
+ echo wp_kses(
70
+ sprintf(
71
+ __( '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' ),
72
+ $wpreset
73
+ ),
74
+ array(
75
+ 'a' => array(
76
+ 'href' => array(),
77
+ 'target' => array(),
78
+ ),
79
+ )
80
+ );
81
+ ?>
82
+ </h4></p>
83
  <hr>
84
 
85
  </div>
89
 
90
  // Display the plugin intro text (can be replaced with custom text through the filter below).
91
  echo wp_kses_post( apply_filters( 'rrdi/plugin_intro_text', $plugin_intro_text ) );
92
+
93
  $my_theme = wp_get_theme();
94
+ $td = $my_theme->get( 'TextDomain' );
95
 
96
+ if ( strpos( $td, 'pro' ) === false && ! empty( $this->import_files ) ) {
97
+ ?>
98
 
99
  <div class="RRDI__file-upload-container">
100
+ <?php
101
+ $bold = '<b>';
102
+ $boldclose = '</b>';
103
+ ?>
104
+ <br><h4 style="color:red">
105
+ <?php
106
+ echo wp_kses(
107
+ 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 ),
108
+ array(
109
+ 'a' => array(
110
+ 'href' => array(),
111
+ 'target' => array(),
112
+ ),
113
+ 'b' => array(),
114
+ )
115
+ );
116
+ ?>
117
+ </h4>
118
  </div>
119
+ <?php
120
  }
121
 
122
  // Check the folder contains at least 1 valid demo config.
123
+ $upload_dir = wp_upload_dir();
124
+ $path = $upload_dir['basedir'] . '/rara-demo-pack/';
125
  $working_dir = getcwd();
126
+ chdir( $path ); // chdir to requested dir
127
  $ret_val = false;
128
+ if ( $p = opendir( $path ) ) {
129
+ while ( false !== ( $file = readdir( $p ) ) ) {
130
+ if ( $file[0] != '.' && is_dir( $file ) ) {
131
+ $list[] = date( 'YmdHis', filemtime( $path . '/' . $file ) ) . $path . '/' . $file;
132
  }
133
  }
134
+ if ( isset( $list ) ) {
135
+ rsort( $list );
 
136
  $ret_val = $list[0];
137
  }
138
  }
139
+ chdir( $working_dir ); // chdir back to script's dir
140
 
141
  $my_theme = wp_get_theme();
142
+ $td = $my_theme->get( 'TextDomain' );
143
 
144
+ $sr = explode( '/', $ret_val );
145
+ $sr = end( $sr );
146
 
147
+ if ( empty( $this->import_files ) ) :
148
+ ?>
149
 
150
  <?php elseif ( 1 < count( $this->import_files ) ) : ?>
151
 
172
  }
173
 
174
  if ( $preview_image_is_defined ) :
175
+ ?>
176
 
177
  <div class="RRDI__demo-import-preview-container">
178
 
179
  <p><?php esc_html_e( 'Import preview:', 'rara-one-click-demo-import' ); ?></p>
180
 
181
+ <p class="RRDI__demo-import-preview-image-message js-rrdi-preview-image-message">
182
+ <?php
183
+ if ( ! isset( $this->import_files[0]['import_preview_image_url'] ) ) {
184
+ esc_html_e( 'No preview image defined for this import.', 'rara-one-click-demo-import' );
185
+ }
186
  // Leave the img tag below and the p tag above available for later changes via JS.
187
+ ?>
188
+ </p>
189
 
190
  <img id="RRDI__demo-import-preview-image" class="js-rrdi-preview-image" src="<?php echo ! empty( $this->import_files[0]['import_preview_image_url'] ) ? esc_url( $this->import_files[0]['import_preview_image_url'] ) : ''; ?>">
191
 
195
 
196
  </div>
197
 
198
+ <?php
199
+ endif;
200
 
201
  $upload_dir = wp_upload_dir();
202
 
203
+ $directory = $upload_dir['basedir'] . '/rara-demo-pack/';
204
+
205
+ // get all files in specified directory
206
+ $files = glob( $directory . '*', GLOB_ONLYDIR );
 
 
 
 
 
 
 
 
 
 
207
 
208
+ // print each file name
209
+ foreach ( $files as $file ) {
210
+ // check to see if the file is a folder/directory
211
+ if ( is_dir( $file ) ) {
212
+ $arr[] = basename( $file );
213
+ }
 
 
 
 
 
 
 
214
  }
215
+
216
  $my_theme = wp_get_theme();
217
 
218
+ if ( is_array( $this->import_files ) && ! empty( $this->import_files[0]['import_notice'] ) ) {
219
+ ?>
220
  <div class="RRDI__demo-import-notice js-rrdi-demo-import-notice">
221
  <?php echo wp_kses_post( $this->import_files[0]['import_notice'] ); ?>
222
  </div>
223
+ <?php
224
  }
225
  ?>
226
 
234
  </p>
235
 
236
  <div class="RRDI__response js-rrdi-ajax-response"></div>
237
+ </div>
includes/settings/intro.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
  echo '<div class="rddi-import-intro">';
3
- echo '<p>Demo Import works very well under normal circumstances. However, sometimes issues are seen which can be due to different reasons, mostly due to hosting issues. If you are using shared hosting plan, then there is high chance that demo import might not work on your server because your server might have some limitation.</p>';
4
 
5
  echo '<p>For the demo import to work properly, the <b>PHP configuration</b> on your server should be:</p>';
6
- echo
7
- '<ul>
8
  <li>Maximum Execution Time <span>360</span></li>
9
  <li>Memory Limit <span>256M</span></li>
10
  <li>Post Max Size <span>32M</span></li>
@@ -13,12 +12,13 @@ echo
13
 
14
  $link = '<a href="https://rarathemes.com/blog/best-wordpress-hosting/" target="_blank">10 best WordPress Hosting</a>';
15
 
16
- echo '<p>'.sprintf( __( 'Please request your hosting to give you the above configuration and then try the demo import again. If you are constantly having an issue with the hosting, you may want to consider to move to better WordPress hosting. We have reviewed %1$s. If the issue is not fixed after the above configuration, please let us know for the further assistance.','rara-one-click-demo-import'), $link).'</p>';
17
 
18
  $snapshot = '<a href="https://wordpress.org/plugins/wp-serverinfo/" target="_blank">WP Server Info</a>';
19
  ?>
20
- <p><h4><?php echo sprintf( __( 'You can check the PHP configuartion of your site by using any plugins like %1$s.','rara-one-click-demo-import'), $snapshot); ?></h4></p>
21
  <?php
22
- $wpreset = '<a href="https://wordpress.org/plugins/wp-reset" target="_blank">WP Reset</a>'; ?>
23
- <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>
24
- </div>
 
1
  <?php
2
  echo '<div class="rddi-import-intro">';
3
+ echo '<p>Demo Import works very well under normal circumstances. However, sometimes issues are seen which can be due to different reasons, mostly due to hosting issues. If you are using shared hosting plan, then there is high chance that demo import might not work on your server because your server might have some limitation.</p>';
4
 
5
  echo '<p>For the demo import to work properly, the <b>PHP configuration</b> on your server should be:</p>';
6
+ echo '<ul>
 
7
  <li>Maximum Execution Time <span>360</span></li>
8
  <li>Memory Limit <span>256M</span></li>
9
  <li>Post Max Size <span>32M</span></li>
12
 
13
  $link = '<a href="https://rarathemes.com/blog/best-wordpress-hosting/" target="_blank">10 best WordPress Hosting</a>';
14
 
15
+ echo '<p>' . sprintf( __( 'Please request your hosting to give you the above configuration and then try the demo import again. If you are constantly having an issue with the hosting, you may want to consider to move to better WordPress hosting. We have reviewed %1$s. If the issue is not fixed after the above configuration, please let us know for the further assistance.', 'rara-one-click-demo-import' ), esc_url( $link ) ) . '</p>';
16
 
17
  $snapshot = '<a href="https://wordpress.org/plugins/wp-serverinfo/" target="_blank">WP Server Info</a>';
18
  ?>
19
+ <p><h4><?php echo sprintf( __( 'You can check the PHP configuartion of your site by using any plugins like %1$s.', 'rara-one-click-demo-import' ), esc_url( $snapshot ) ); ?></h4></p>
20
  <?php
21
+ $wpreset = '<a href="https://wordpress.org/plugins/wp-reset" target="_blank">WP Reset</a>';
22
+ ?>
23
+ <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' ), esc_url( $wpreset ) ); ?></h4></p>
24
+ </div>
includes/settings/welcome.php CHANGED
@@ -1,6 +1,6 @@
1
  <div class="upload-theme">
2
  <p class="install-help"><?php _e( 'If you have a demo pack in a .zip format, you may install it by uploading it here.', 'rara-one-click-demo-import' ); ?></p>
3
- <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'themes.php?page=rara-demo-import&action=upload-demo' ); ?>">
4
  <?php wp_nonce_field( 'demo-upload' ); ?>
5
  <label class="screen-reader-text" for="demozip"><?php _e( 'Demo zip file', 'rara-one-click-demo-import' ); ?></label>
6
  <input type="file" id="demozip" name="demozip" />
@@ -8,22 +8,45 @@
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://rarathemes.com/documentation/" target="_blank">documentation</a>';
15
  $support = '<a href="https://rarathemes.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://rarathemes.com/" target="_blank">Rara Theme</a>';
21
- $demos = '<a href="https://rarathemes.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>
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="upload-theme">
2
  <p class="install-help"><?php _e( 'If you have a demo pack in a .zip format, you may install it by uploading it here.', 'rara-one-click-demo-import' ); ?></p>
3
+ <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo esc_url( self_admin_url( 'themes.php?page=rara-demo-import&action=upload-demo' ) ); ?>">
4
  <?php wp_nonce_field( 'demo-upload' ); ?>
5
  <label class="screen-reader-text" for="demozip"><?php _e( 'Demo zip file', 'rara-one-click-demo-import' ); ?></label>
6
  <input type="file" id="demozip" name="demozip" />
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>
13
+ <?php
14
  $wpreset = '<a href="https://wordpress.org/plugins/wp-reset" target="_blank">WP Reset</a>';
15
+ $doc = '<a href="https://rarathemes.com/documentation/" target="_blank">documentation</a>';
16
  $support = '<a href="https://rarathemes.com/support-ticket/" target="_blank">contact our support team</a>';
17
+ echo wp_kses(
18
+ 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 ),
19
+ array(
20
+ 'a' => array(
21
+ 'href' => array(),
22
+ 'target' => array(),
23
+ ),
24
+ )
25
+ );
26
+ ?>
27
  </li>
28
  <li>
29
+ <?php
30
+ $link = '<a href="https://rarathemes.com/" target="_blank">Rara Theme</a>';
31
+ $demos = '<a href="https://rarathemes.com/" target="_blank">Theme Demos</a>';
32
+ $bold = '<b>';
33
  $boldclose = '</b>';
34
+ echo wp_kses( sprintf( __( 'Click on the %1$sUpload Demo File%2$s button above.', 'rara-one-click-demo-import' ), $bold, $boldclose ), array( 'b' => array() ) );
35
+ ?>
36
  </li>
37
+ <li><?php echo wp_kses( 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 ), array( 'b' => array() ) ); ?></li>
38
+ <li><?php echo wp_kses( 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 ), array( 'b' => array() ) ); ?></li>
39
+ <h4>
40
+ <?php
41
+ echo wp_kses(
42
+ 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 ),
43
+ array(
44
+ 'a' => array(
45
+ 'href' => array(),
46
+ 'target' => array(),
47
+ ),
48
+ )
49
+ );
50
+ ?>
51
+ </h4>
52
+ </ol>
languages/rara-one-click-demo-import.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2021 raratheme
2
  # This file is distributed under the GPL3.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: RARA One Click Demo Import 1.2.9\n"
6
  "Report-Msgid-Bugs-To: \n"
7
- "POT-Creation-Date: 2021-01-13 10:30:42+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2021-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: WP Travel Engine\n"
13
  "Language-Team: \n"
14
  "X-Poedit-KeywordsList: "
@@ -142,31 +142,31 @@ msgstr ""
142
  msgid "Upload Demo File"
143
  msgstr ""
144
 
145
- #: includes/class-rrdi-main.php:329
146
  msgid "rara"
147
  msgstr ""
148
 
149
- #: includes/class-rrdi-main.php:372 includes/settings/installed-demos.php:133
150
  msgid "No preview image defined for this import."
151
  msgstr ""
152
 
153
- #: includes/class-rrdi-main.php:428
154
  msgid "Manually uploaded files"
155
  msgstr ""
156
 
157
- #: includes/class-rrdi-main.php:445 includes/class-rrdi-main.php:456
158
  msgid "Downloaded files"
159
  msgstr ""
160
 
161
- #: includes/class-rrdi-main.php:452
162
  msgid "The import files for: %s were successfully downloaded!"
163
  msgstr ""
164
 
165
- #: includes/class-rrdi-main.php:462
166
  msgid "No import files specified!"
167
  msgstr ""
168
 
169
- #: includes/class-rrdi-main.php:509
170
  msgid ""
171
  "%1$s%3$sCompleted Successfully!%4$s%2$sThe process has finished. Please "
172
  "check your page and make sure that everything has been imported correctly. "
@@ -174,33 +174,33 @@ msgid ""
174
  "plugin.%5$s"
175
  msgstr ""
176
 
177
- #: includes/class-rrdi-main.php:520
178
  msgid ""
179
  "%1$sUnfortunately, demo import has finished with some errors.%2$sMore "
180
  "details about the errors can be found in this %3$s%5$slog file%6$s%4$s%7$s"
181
  msgstr ""
182
 
183
- #: includes/class-rrdi-main.php:576
184
  msgid "Max execution time after content import = "
185
  msgstr ""
186
 
187
- #: includes/class-rrdi-main.php:578
188
  msgid "Importing content"
189
  msgstr ""
190
 
191
- #: includes/class-rrdi-main.php:617 includes/class-rrdi-main.php:629
192
  msgid "Importing widgets"
193
  msgstr ""
194
 
195
- #: includes/class-rrdi-main.php:651 includes/class-rrdi-main.php:659
196
  msgid "Importing customizer settings"
197
  msgstr ""
198
 
199
- #: includes/class-rrdi-main.php:657
200
  msgid "Customizer settings import finished!"
201
  msgstr ""
202
 
203
- #: includes/class-rrdi-main.php:709
204
  msgid "Completed AJAX call number: "
205
  msgstr ""
206
 
@@ -351,94 +351,94 @@ msgstr ""
351
  msgid "Could not update comment #%d with mapped data"
352
  msgstr ""
353
 
354
- #: includes/settings/installed-demos.php:2
355
  msgid "Before you begin, make sure all the required plugins are activated."
356
  msgstr ""
357
 
358
- #: includes/settings/installed-demos.php:11
359
  msgid ""
360
- "%sWarning: your server is using %sPHP safe mode%s. This means that you "
361
- "might experience server timeout errors.%s"
362
  msgstr ""
363
 
364
- #: includes/settings/installed-demos.php:33
365
  msgid ""
366
  "If you are using premium themes by %1$s, just click Import Now button "
367
  "below. Alternatively, you can download zip files from the %2$s page of your "
368
  "theme and upload it as mentioned in Demo Import tab. As simple as that."
369
  msgstr ""
370
 
371
- #: includes/settings/installed-demos.php:36
372
  msgid "The following data will be imported:"
373
  msgstr ""
374
 
375
- #: includes/settings/installed-demos.php:39
376
  msgid "Posts"
377
  msgstr ""
378
 
379
- #: includes/settings/installed-demos.php:40
380
  msgid "Pages"
381
  msgstr ""
382
 
383
- #: includes/settings/installed-demos.php:41
384
  msgid "Images"
385
  msgstr ""
386
 
387
- #: includes/settings/installed-demos.php:42
388
  msgid "Widgets"
389
  msgstr ""
390
 
391
- #: includes/settings/installed-demos.php:43
392
  msgid "Menus"
393
  msgstr ""
394
 
395
- #: includes/settings/installed-demos.php:44
396
  msgid "Settings"
397
  msgstr ""
398
 
399
- #: includes/settings/installed-demos.php:48
400
  msgid ""
401
  "Note: To import demo content for the free themes, please follow the "
402
  "step-by-step instructions mentioned in the %1$s Demo Import %2$s tab."
403
  msgstr ""
404
 
405
- #: includes/settings/installed-demos.php:49 includes/settings/intro.php:23
406
- #: includes/settings/welcome.php:28
407
  msgid ""
408
  "Note: We highly recommend to import the demo content on a fresh WordPress "
409
  "installation. You can reset your website to a fresh WordPress installation "
410
  "using a reset plugin like %1$s."
411
  msgstr ""
412
 
413
- #: includes/settings/installed-demos.php:67
414
  msgid ""
415
  "Note: For free themes, always upload the appropriate demo zip file from "
416
  "%1$s Demo Import %2$s tab and import demo data as mentioned there."
417
  msgstr ""
418
 
419
- #: includes/settings/installed-demos.php:104
420
  msgid "Choose which demo you want to import:"
421
  msgstr ""
422
 
423
- #: includes/settings/installed-demos.php:129
424
  msgid "Import preview:"
425
  msgstr ""
426
 
427
- #: includes/settings/installed-demos.php:190
428
  msgid "Import Now"
429
  msgstr ""
430
 
431
- #: includes/settings/installed-demos.php:191
432
  msgid ""
433
  "Click the button to begin the importing process. Please be patient, the "
434
  "process might take a few minutes."
435
  msgstr ""
436
 
437
- #: includes/settings/installed-demos.php:195
438
  msgid "Importing now, please wait!"
439
  msgstr ""
440
 
441
- #: includes/settings/intro.php:16
442
  msgid ""
443
  "Please request your hosting to give you the above configuration and then "
444
  "try the demo import again. If you are constantly having an issue with the "
@@ -447,7 +447,7 @@ msgid ""
447
  "configuration, please let us know for the further assistance."
448
  msgstr ""
449
 
450
- #: includes/settings/intro.php:20
451
  msgid ""
452
  "You can check the PHP configuartion of your site by using any plugins like "
453
  "%1$s."
@@ -471,23 +471,23 @@ msgstr ""
471
  msgid "A Step-by-Step Guide to Import the Demo Content"
472
  msgstr ""
473
 
474
- #: includes/settings/welcome.php:16
475
  msgid ""
476
  "Download the demo file from your theme %1$s page. If you are unable to "
477
  "download the demo file, please %2$s."
478
  msgstr ""
479
 
480
- #: includes/settings/welcome.php:24
481
  msgid "Click on the %1$sUpload Demo File%2$s button above."
482
  msgstr ""
483
 
484
- #: includes/settings/welcome.php:26
485
  msgid ""
486
  "Click on %1$sChoose File%2$s button and upload the demo file downloaded in "
487
  "step 1. Then, click on the %3$sInstall Now%4$s button."
488
  msgstr ""
489
 
490
- #: includes/settings/welcome.php:27
491
  msgid ""
492
  "Click on the %1$sImport Demo Now!%2$s button to begin demo installation. It "
493
  "will take few minutes to successfully import the demo."
1
+ # Copyright (C) 2022 raratheme
2
  # This file is distributed under the GPL3.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: RARA One Click Demo Import 1.3.0\n"
6
  "Report-Msgid-Bugs-To: \n"
7
+ "POT-Creation-Date: 2022-05-05 14:30:58+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: WP Travel Engine\n"
13
  "Language-Team: \n"
14
  "X-Poedit-KeywordsList: "
142
  msgid "Upload Demo File"
143
  msgstr ""
144
 
145
+ #: includes/class-rrdi-main.php:346
146
  msgid "rara"
147
  msgstr ""
148
 
149
+ #: includes/class-rrdi-main.php:391 includes/settings/installed-demos.php:184
150
  msgid "No preview image defined for this import."
151
  msgstr ""
152
 
153
+ #: includes/class-rrdi-main.php:447
154
  msgid "Manually uploaded files"
155
  msgstr ""
156
 
157
+ #: includes/class-rrdi-main.php:463 includes/class-rrdi-main.php:474
158
  msgid "Downloaded files"
159
  msgstr ""
160
 
161
+ #: includes/class-rrdi-main.php:470
162
  msgid "The import files for: %s were successfully downloaded!"
163
  msgstr ""
164
 
165
+ #: includes/class-rrdi-main.php:479
166
  msgid "No import files specified!"
167
  msgstr ""
168
 
169
+ #: includes/class-rrdi-main.php:526
170
  msgid ""
171
  "%1$s%3$sCompleted Successfully!%4$s%2$sThe process has finished. Please "
172
  "check your page and make sure that everything has been imported correctly. "
174
  "plugin.%5$s"
175
  msgstr ""
176
 
177
+ #: includes/class-rrdi-main.php:536
178
  msgid ""
179
  "%1$sUnfortunately, demo import has finished with some errors.%2$sMore "
180
  "details about the errors can be found in this %3$s%5$slog file%6$s%4$s%7$s"
181
  msgstr ""
182
 
183
+ #: includes/class-rrdi-main.php:593
184
  msgid "Max execution time after content import = "
185
  msgstr ""
186
 
187
+ #: includes/class-rrdi-main.php:595
188
  msgid "Importing content"
189
  msgstr ""
190
 
191
+ #: includes/class-rrdi-main.php:634 includes/class-rrdi-main.php:646
192
  msgid "Importing widgets"
193
  msgstr ""
194
 
195
+ #: includes/class-rrdi-main.php:668 includes/class-rrdi-main.php:676
196
  msgid "Importing customizer settings"
197
  msgstr ""
198
 
199
+ #: includes/class-rrdi-main.php:674
200
  msgid "Customizer settings import finished!"
201
  msgstr ""
202
 
203
+ #: includes/class-rrdi-main.php:726
204
  msgid "Completed AJAX call number: "
205
  msgstr ""
206
 
351
  msgid "Could not update comment #%d with mapped data"
352
  msgstr ""
353
 
354
+ #: includes/settings/installed-demos.php:3
355
  msgid "Before you begin, make sure all the required plugins are activated."
356
  msgstr ""
357
 
358
+ #: includes/settings/installed-demos.php:12
359
  msgid ""
360
+ "%1$sWarning: your server is using %2$sPHP safe mode%3$s. This means that "
361
+ "you might experience server timeout errors.%4$s"
362
  msgstr ""
363
 
364
+ #: includes/settings/installed-demos.php:34
365
  msgid ""
366
  "If you are using premium themes by %1$s, just click Import Now button "
367
  "below. Alternatively, you can download zip files from the %2$s page of your "
368
  "theme and upload it as mentioned in Demo Import tab. As simple as that."
369
  msgstr ""
370
 
371
+ #: includes/settings/installed-demos.php:48
372
  msgid "The following data will be imported:"
373
  msgstr ""
374
 
375
+ #: includes/settings/installed-demos.php:51
376
  msgid "Posts"
377
  msgstr ""
378
 
379
+ #: includes/settings/installed-demos.php:52
380
  msgid "Pages"
381
  msgstr ""
382
 
383
+ #: includes/settings/installed-demos.php:53
384
  msgid "Images"
385
  msgstr ""
386
 
387
+ #: includes/settings/installed-demos.php:54
388
  msgid "Widgets"
389
  msgstr ""
390
 
391
+ #: includes/settings/installed-demos.php:55
392
  msgid "Menus"
393
  msgstr ""
394
 
395
+ #: includes/settings/installed-demos.php:56
396
  msgid "Settings"
397
  msgstr ""
398
 
399
+ #: includes/settings/installed-demos.php:63
400
  msgid ""
401
  "Note: To import demo content for the free themes, please follow the "
402
  "step-by-step instructions mentioned in the %1$s Demo Import %2$s tab."
403
  msgstr ""
404
 
405
+ #: includes/settings/installed-demos.php:71 includes/settings/intro.php:23
406
+ #: includes/settings/welcome.php:42
407
  msgid ""
408
  "Note: We highly recommend to import the demo content on a fresh WordPress "
409
  "installation. You can reset your website to a fresh WordPress installation "
410
  "using a reset plugin like %1$s."
411
  msgstr ""
412
 
413
+ #: includes/settings/installed-demos.php:107
414
  msgid ""
415
  "Note: For free themes, always upload the appropriate demo zip file from "
416
  "%1$s Demo Import %2$s tab and import demo data as mentioned there."
417
  msgstr ""
418
 
419
+ #: includes/settings/installed-demos.php:154
420
  msgid "Choose which demo you want to import:"
421
  msgstr ""
422
 
423
+ #: includes/settings/installed-demos.php:179
424
  msgid "Import preview:"
425
  msgstr ""
426
 
427
+ #: includes/settings/installed-demos.php:228
428
  msgid "Import Now"
429
  msgstr ""
430
 
431
+ #: includes/settings/installed-demos.php:229
432
  msgid ""
433
  "Click the button to begin the importing process. Please be patient, the "
434
  "process might take a few minutes."
435
  msgstr ""
436
 
437
+ #: includes/settings/installed-demos.php:233
438
  msgid "Importing now, please wait!"
439
  msgstr ""
440
 
441
+ #: includes/settings/intro.php:15
442
  msgid ""
443
  "Please request your hosting to give you the above configuration and then "
444
  "try the demo import again. If you are constantly having an issue with the "
447
  "configuration, please let us know for the further assistance."
448
  msgstr ""
449
 
450
+ #: includes/settings/intro.php:19
451
  msgid ""
452
  "You can check the PHP configuartion of your site by using any plugins like "
453
  "%1$s."
471
  msgid "A Step-by-Step Guide to Import the Demo Content"
472
  msgstr ""
473
 
474
+ #: includes/settings/welcome.php:18
475
  msgid ""
476
  "Download the demo file from your theme %1$s page. If you are unable to "
477
  "download the demo file, please %2$s."
478
  msgstr ""
479
 
480
+ #: includes/settings/welcome.php:34
481
  msgid "Click on the %1$sUpload Demo File%2$s button above."
482
  msgstr ""
483
 
484
+ #: includes/settings/welcome.php:37
485
  msgid ""
486
  "Click on %1$sChoose File%2$s button and upload the demo file downloaded in "
487
  "step 1. Then, click on the %3$sInstall Now%4$s button."
488
  msgstr ""
489
 
490
+ #: includes/settings/welcome.php:38
491
  msgid ""
492
  "Click on the %1$sImport Demo Now!%2$s button to begin demo installation. It "
493
  "will take few minutes to successfully import the demo."
rara-one-click-demo-import.php CHANGED
@@ -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 with just one click.
6
- Version: 1.2.9
7
  Author: raratheme
8
  Author URI: https://www.rarathemes.com
9
  License: GPL3
@@ -17,7 +17,7 @@ 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.2.9' );
21
 
22
  // Path/URL to root of this plugin, with trailing slash.
23
  define( 'RRDI_URL', plugin_dir_url( __FILE__ ) );
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 with just one click.
6
+ Version: 1.3.0
7
  Author: raratheme
8
  Author URI: https://www.rarathemes.com
9
  License: GPL3
17
  define( 'RRDI_PATH', plugin_dir_path( __FILE__ ) );
18
 
19
  // Current version of the plugin.
20
+ define( 'RRDI_VERSION', '1.3.0' );
21
 
22
  // Path/URL to root of this plugin, with trailing slash.
23
  define( 'RRDI_URL', plugin_dir_url( __FILE__ ) );
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: raratheme
3
  Tags: import, content, demo, data, widgets, settings
4
  Requires at least: 4.4.0
5
- Tested up to: 5.7
6
  Requires PHP: 5.6
7
- Stable tag: 1.2.9
8
  License: GPLv3 or later
9
 
10
  Make your website look like the live demo of the theme with a click!
@@ -113,6 +113,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
113
 
114
  == Changelog ==
115
 
 
 
 
 
116
  = 1.2.9 =
117
  * WORDPRESS 5.6 AND PHP 8 COMPATIBILITY FIXES
118
 
2
  Contributors: raratheme
3
  Tags: import, content, demo, data, widgets, settings
4
  Requires at least: 4.4.0
5
+ Tested up to: 5.9
6
  Requires PHP: 5.6
7
+ Stable tag: 1.3.0
8
  License: GPLv3 or later
9
 
10
  Make your website look like the live demo of the theme with a click!
113
 
114
  == Changelog ==
115
 
116
+ = 1.3.0 =
117
+ * fixes: Fixed CSRF related security issues in demo file upload.
118
+ * Fixes: Minor Bug Fixes.
119
+
120
  = 1.2.9 =
121
  * WORDPRESS 5.6 AND PHP 8 COMPATIBILITY FIXES
122