Version Description
- 24th November 2022 =
- Fix - Improved code as per WordPress and PHPCS standards
Download this release
Release Info
Developer | cyberchimps |
Plugin | Responsive Add Ons |
Version | 2.6.8 |
Comparing to | |
See all releases |
Code changes from version 2.6.7 to 2.6.8
includes/class-responsive-add-ons.php
CHANGED
@@ -564,16 +564,26 @@ class Responsive_Add_Ons {
|
|
564 |
wp_send_json_error( $response );
|
565 |
}
|
566 |
|
567 |
-
$
|
568 |
|
569 |
-
if (
|
570 |
-
foreach ( $required_plugins as $key => $plugin ) {
|
571 |
|
572 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
|
574 |
$response['inactive'][] = $plugin;
|
575 |
|
576 |
-
} elseif ( ! file_exists( WP_PLUGIN_DIR . '/' . $
|
577 |
|
578 |
$response['notinstalled'][] = $plugin;
|
579 |
|
@@ -610,7 +620,7 @@ class Responsive_Add_Ons {
|
|
610 |
);
|
611 |
}
|
612 |
|
613 |
-
if ( ! isset( $_POST['init'] ) ||
|
614 |
wp_send_json_error(
|
615 |
array(
|
616 |
'success' => false,
|
@@ -620,7 +630,7 @@ class Responsive_Add_Ons {
|
|
620 |
}
|
621 |
|
622 |
$data = array();
|
623 |
-
$plugin_init = ( isset( $_POST['init'] ) ) ?
|
624 |
|
625 |
$activate = activate_plugin( $plugin_init, '', false, true );
|
626 |
|
564 |
wp_send_json_error( $response );
|
565 |
}
|
566 |
|
567 |
+
$required_plugins_count = ( isset( $_POST['required_plugins'] ) ) ? count( $_POST['required_plugins'] ) : array();
|
568 |
|
569 |
+
if ( $required_plugins_count > 0 ) {
|
|
|
570 |
|
571 |
+
for ( $i = 0; $i < $required_plugins_count; $i++ ) {
|
572 |
+
$name = isset( $_POST['required_plugins'][ $i ]['name'] ) ? sanitize_text_field( wp_unslash( $_POST['required_plugins'][ $i ]['name'] ) ) : '';
|
573 |
+
$slug = isset( $_POST['required_plugins'][ $i ]['slug'] ) ? sanitize_text_field( wp_unslash( $_POST['required_plugins'][ $i ]['slug'] ) ) : '';
|
574 |
+
$init = isset( $_POST['required_plugins'][ $i ]['init'] ) ? sanitize_text_field( wp_unslash( $_POST['required_plugins'][ $i ]['init'] ) ) : '';
|
575 |
+
|
576 |
+
$plugin = array(
|
577 |
+
'name' => $name,
|
578 |
+
'slug' => $slug,
|
579 |
+
'init' => $init,
|
580 |
+
);
|
581 |
+
|
582 |
+
if ( file_exists( WP_PLUGIN_DIR . '/' . $init ) && is_plugin_inactive( $init ) ) {
|
583 |
|
584 |
$response['inactive'][] = $plugin;
|
585 |
|
586 |
+
} elseif ( ! file_exists( WP_PLUGIN_DIR . '/' . $init ) ) {
|
587 |
|
588 |
$response['notinstalled'][] = $plugin;
|
589 |
|
620 |
);
|
621 |
}
|
622 |
|
623 |
+
if ( ! isset( $_POST['init'] ) || empty( $_POST['init'] ) ) {
|
624 |
wp_send_json_error(
|
625 |
array(
|
626 |
'success' => false,
|
630 |
}
|
631 |
|
632 |
$data = array();
|
633 |
+
$plugin_init = ( isset( $_POST['init'] ) ) ? wp_kses_post( wp_unslash( $_POST['init'] ) ) : '';
|
634 |
|
635 |
$activate = activate_plugin( $plugin_init, '', false, true );
|
636 |
|
includes/importers/batch-processing/helpers/class-wp-background-process.php
CHANGED
@@ -187,27 +187,32 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
|
|
187 |
protected function is_queue_empty() {
|
188 |
global $wpdb;
|
189 |
|
190 |
-
$
|
191 |
-
$column = 'option_name';
|
192 |
|
193 |
if ( is_multisite() ) {
|
194 |
-
$
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
}
|
197 |
|
198 |
-
$key = $this->identifier . '_batch_%';
|
199 |
-
|
200 |
-
$count = $wpdb->get_var(
|
201 |
-
$wpdb->prepare(
|
202 |
-
"
|
203 |
-
SELECT COUNT(*)
|
204 |
-
FROM {$table}
|
205 |
-
WHERE {$column} LIKE %s
|
206 |
-
",
|
207 |
-
$key
|
208 |
-
)
|
209 |
-
);
|
210 |
-
|
211 |
return ( $count > 0 ) ? false : true;
|
212 |
}
|
213 |
|
@@ -263,33 +268,40 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
|
|
263 |
protected function get_batch() {
|
264 |
global $wpdb;
|
265 |
|
266 |
-
$
|
267 |
-
|
268 |
-
$
|
269 |
-
$value_column = 'option_value';
|
270 |
|
271 |
if ( is_multisite() ) {
|
272 |
-
$table = $wpdb->sitemeta;
|
273 |
-
$column = 'meta_key';
|
274 |
-
$key_column = 'meta_id';
|
275 |
$value_column = 'meta_value';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
}
|
277 |
|
278 |
-
$key = $this->identifier . '_batch_%';
|
279 |
-
|
280 |
-
$query = $wpdb->get_row(
|
281 |
-
$wpdb->prepare(
|
282 |
-
"
|
283 |
-
SELECT *
|
284 |
-
FROM {$table}
|
285 |
-
WHERE {$column} LIKE %s
|
286 |
-
ORDER BY {$key_column} ASC
|
287 |
-
LIMIT 1
|
288 |
-
",
|
289 |
-
$key
|
290 |
-
)
|
291 |
-
);
|
292 |
-
|
293 |
$batch = new stdClass();
|
294 |
$batch->key = $query->$column;
|
295 |
$batch->data = maybe_unserialize( $query->$value_column );
|
187 |
protected function is_queue_empty() {
|
188 |
global $wpdb;
|
189 |
|
190 |
+
$key = $this->identifier . '_batch_%';
|
|
|
191 |
|
192 |
if ( is_multisite() ) {
|
193 |
+
$count = $wpdb->get_var(
|
194 |
+
$wpdb->prepare(
|
195 |
+
"
|
196 |
+
SELECT COUNT(*)
|
197 |
+
FROM wp_sitemeta
|
198 |
+
WHERE 'meta_key' LIKE %s
|
199 |
+
",
|
200 |
+
$key
|
201 |
+
)
|
202 |
+
);
|
203 |
+
} else {
|
204 |
+
$count = $wpdb->get_var(
|
205 |
+
$wpdb->prepare(
|
206 |
+
"
|
207 |
+
SELECT COUNT(*)
|
208 |
+
FROM wp_options
|
209 |
+
WHERE 'option_name' LIKE %s
|
210 |
+
",
|
211 |
+
$key
|
212 |
+
)
|
213 |
+
);
|
214 |
}
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
return ( $count > 0 ) ? false : true;
|
217 |
}
|
218 |
|
268 |
protected function get_batch() {
|
269 |
global $wpdb;
|
270 |
|
271 |
+
$column = 'option_name';
|
272 |
+
|
273 |
+
$key = $this->identifier . '_batch_%';
|
|
|
274 |
|
275 |
if ( is_multisite() ) {
|
|
|
|
|
|
|
276 |
$value_column = 'meta_value';
|
277 |
+
$query = $wpdb->get_row(
|
278 |
+
$wpdb->prepare(
|
279 |
+
"
|
280 |
+
SELECT *
|
281 |
+
FROM wp_sitemeta
|
282 |
+
WHERE 'meta_key' LIKE %s
|
283 |
+
ORDER BY 'meta_id' ASC
|
284 |
+
LIMIT 1
|
285 |
+
",
|
286 |
+
$key
|
287 |
+
)
|
288 |
+
);
|
289 |
+
} else {
|
290 |
+
$value_column = 'option_value';
|
291 |
+
$query = $wpdb->get_row(
|
292 |
+
$wpdb->prepare(
|
293 |
+
"
|
294 |
+
SELECT *
|
295 |
+
FROM wp_options
|
296 |
+
WHERE 'option_name' LIKE %s
|
297 |
+
ORDER BY 'option_id' ASC
|
298 |
+
LIMIT 1
|
299 |
+
",
|
300 |
+
$key
|
301 |
+
)
|
302 |
+
);
|
303 |
}
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
$batch = new stdClass();
|
306 |
$batch->key = $query->$column;
|
307 |
$batch->data = maybe_unserialize( $query->$value_column );
|
includes/importers/class-responsive-ready-sites-importer.php
CHANGED
@@ -824,19 +824,18 @@ if ( ! class_exists( 'Responsive_Ready_Sites_Importer' ) ) :
|
|
824 |
wp_send_json_error( __( 'You are not allowed to perform this action', 'responsive-addons' ) );
|
825 |
}
|
826 |
|
827 |
-
|
828 |
-
|
829 |
-
if ( empty( $data ) ) {
|
830 |
wp_send_json_error( 'Page Data is empty.' );
|
831 |
}
|
832 |
|
833 |
-
$current_page_api = isset( $_POST['current_page_api'] ) ? $_POST['current_page_api'] : '';
|
|
|
834 |
update_option( 'current_page_api', $current_page_api );
|
835 |
|
836 |
-
$page_id = isset( $_POST['data']['id'] ) ? $_POST['data']['id'] : '';
|
837 |
-
$title = isset( $_POST['data']['title']['rendered'] ) ? $_POST['data']['title']['rendered'] : '';
|
838 |
-
$excerpt = isset( $_POST['data']['excerpt']['rendered'] ) ? $_POST['data']['excerpt']['rendered'] : '';
|
839 |
-
$content = isset( $_POST['data']['original_content'] ) ? $_POST['data']['original_content'] : ( isset( $_POST['data']['content']['rendered'] ) ? $_POST['data']['content']['rendered'] : '' );
|
840 |
|
841 |
$post_args = array(
|
842 |
'post_type' => 'page',
|
824 |
wp_send_json_error( __( 'You are not allowed to perform this action', 'responsive-addons' ) );
|
825 |
}
|
826 |
|
827 |
+
if ( isset( $_POST['data'] ) && empty( $_POST['data'] ) ) {
|
|
|
|
|
828 |
wp_send_json_error( 'Page Data is empty.' );
|
829 |
}
|
830 |
|
831 |
+
$current_page_api = isset( $_POST['current_page_api'] ) ? sanitize_text_field( wp_unslash( $_POST['current_page_api'] ) ) : '';
|
832 |
+
|
833 |
update_option( 'current_page_api', $current_page_api );
|
834 |
|
835 |
+
$page_id = isset( $_POST['data']['id'] ) ? sanitize_key( wp_unslash( $_POST['data']['id'] ) ) : '';
|
836 |
+
$title = isset( $_POST['data']['title']['rendered'] ) ? sanitize_text_field( wp_unslash( $_POST['data']['title'] )['rendered'] ) : '';
|
837 |
+
$excerpt = isset( $_POST['data']['excerpt']['rendered'] ) ? wp_kses_post( wp_unslash( $_POST['data']['excerpt'] )['rendered'] ) : '';
|
838 |
+
$content = isset( $_POST['data']['original_content'] ) ? wp_kses_post( wp_unslash( $_POST['data']['original_content'] ) ) : ( isset( $_POST['data']['content']['rendered'] ) ? wp_kses_post( wp_unslash( $_POST['data']['content']['rendered'] ) ) : '' );
|
839 |
|
840 |
$post_args = array(
|
841 |
'post_type' => 'page',
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: elementor templates, block templates, one click demo import, readymade web
|
|
5 |
Requires at least: 5.0
|
6 |
Tested up to: 6.1.1
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.6.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -183,6 +183,9 @@ With the Pro version you will get Premium templates, Priority support and automa
|
|
183 |
|
184 |
== Changelog ==
|
185 |
|
|
|
|
|
|
|
186 |
= 2.6.7 - 21st November 2022 =
|
187 |
* Fix - Improved code as per WordPress and PHPCS standards
|
188 |
|
5 |
Requires at least: 5.0
|
6 |
Tested up to: 6.1.1
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.6.8
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
183 |
|
184 |
== Changelog ==
|
185 |
|
186 |
+
= 2.6.8 - 24th November 2022 =
|
187 |
+
* Fix - Improved code as per WordPress and PHPCS standards
|
188 |
+
|
189 |
= 2.6.7 - 21st November 2022 =
|
190 |
* Fix - Improved code as per WordPress and PHPCS standards
|
191 |
|
responsive-add-ons.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Responsive Starter Templates
|
4 |
* Plugin URI: http://wordpress.org/plugins/responsive-add-ons/
|
5 |
* Description: Responsive Starter Templates offers you a library of premium Elementor and block templates so you can launch your website quickly. Just select your favorite website template, click import and launch your website.
|
6 |
-
* Version: 2.6.
|
7 |
* Author: CyberChimps
|
8 |
* Author URI: https://cyberchimps.com
|
9 |
* License: GPL2
|
@@ -46,7 +46,7 @@ if ( ! defined( 'RESPONSIVE_ADDONS_URI' ) ) {
|
|
46 |
}
|
47 |
|
48 |
if ( ! defined( 'RESPONSIVE_ADDONS_VER' ) ) {
|
49 |
-
define( 'RESPONSIVE_ADDONS_VER', '2.6.
|
50 |
}
|
51 |
|
52 |
/**
|
3 |
* Plugin Name: Responsive Starter Templates
|
4 |
* Plugin URI: http://wordpress.org/plugins/responsive-add-ons/
|
5 |
* Description: Responsive Starter Templates offers you a library of premium Elementor and block templates so you can launch your website quickly. Just select your favorite website template, click import and launch your website.
|
6 |
+
* Version: 2.6.8
|
7 |
* Author: CyberChimps
|
8 |
* Author URI: https://cyberchimps.com
|
9 |
* License: GPL2
|
46 |
}
|
47 |
|
48 |
if ( ! defined( 'RESPONSIVE_ADDONS_VER' ) ) {
|
49 |
+
define( 'RESPONSIVE_ADDONS_VER', '2.6.8' );
|
50 |
}
|
51 |
|
52 |
/**
|