Changeset 3417135
- Timestamp:
- 12/11/2025 08:49:12 AM (4 months ago)
- Location:
- blaze-demo-importer
- Files:
-
- 2 deleted
- 6 edited
-
tags/1.0.14/admin-menu (deleted)
-
tags/1.0.14/assets/main.js (modified) (2 diffs)
-
tags/1.0.14/blaze-demo-importer.php (modified) (9 diffs)
-
tags/1.0.14/readme.txt (modified) (3 diffs)
-
trunk/admin-menu (deleted)
-
trunk/assets/main.js (modified) (2 diffs)
-
trunk/blaze-demo-importer.php (modified) (9 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blaze-demo-importer/tags/1.0.14/assets/main.js
r3417026 r3417135 59 59 }, 60 60 success: function (response) { 61 var info = JSON.parse(response); 62 console.log( info ) 61 var info = response.data; 63 62 if (!info.error) { 64 63 if (info.complete_message) { … … 199 198 }, 200 199 success: function (response) { 201 var info = JSON.parse(response); 200 var info = response.data; 201 console.log( info ) 202 202 if (!info.error) { 203 203 if (info.complete_message) { -
blaze-demo-importer/tags/1.0.14/blaze-demo-importer.php
r3417026 r3417135 41 41 $this->plugin_install_count = 0; 42 42 $this->plugin_active_count = 0; 43 $this->current_admin_page_type = isset( $_GET['page'] ) ? $_GET['page']: 'no-page';43 $this->current_admin_page_type = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ): 'no-page'; 44 44 if( file_exists( get_template_directory() . '/inc/admin/assets/demos.php' ) ) $this->configFile = include get_template_directory() . '/inc/admin/assets/demos.php'; 45 45 require_once BLAZE_DEMO_IMPORTER_PATH . 'classes/class-demo-importer.php'; 46 46 require_once BLAZE_DEMO_IMPORTER_PATH . 'classes/class-customizer-importer.php'; 47 47 require_once BLAZE_DEMO_IMPORTER_PATH . 'classes/class-widget-importer.php'; 48 require_once BLAZE_DEMO_IMPORTER_PATH . 'admin-menu/menu.php';49 add_action('init', array($this, 'load_plugin_textdomain')); // i118 file50 48 add_action('admin_enqueue_scripts', array($this, 'admin_scripts')); // admin scripts 51 49 add_action('wp_ajax_blaze_demo_importer_install_demo', array($this, 'blaze_demo_importer_install_demo')); … … 60 58 add_action('wp_ajax_blaze_demo_importer_importing_revslider', array($this, 'blaze_demo_importer_importing_revslider')); 61 59 } 62 // language file 63 public function load_plugin_textdomain() { 64 load_plugin_textdomain('blaze-demo-importer', false, BLAZE_DEMO_IMPORTER_PATH . '/languages'); 65 } 60 66 61 // install demo call 67 62 function blaze_demo_importer_install_demo() { … … 69 64 70 65 // Get the demo content from the right file 71 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';66 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 72 67 $required_plugins = isset($_POST['plugins']) ? wp_unslash($_POST['plugins']) : []; 73 68 $required_files = isset($_POST['files']) ? wp_unslash($_POST['files']) : []; … … 94 89 check_ajax_referer('demo-importer-ajax', 'security'); 95 90 96 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';91 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 97 92 $required_plugins = isset($_POST['plugins']) ? wp_unslash($_POST['plugins']) : []; 98 93 $required_files = isset($_POST['files']) ? wp_unslash($_POST['files']) : []; … … 235 230 check_ajax_referer('demo-importer-ajax', 'security'); 236 231 237 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';238 $required_files = isset($_POST['files']) ? wp_unslash($_POST['files']) : [];239 $admin_page = isset($_POST['admin_page']) ? wp_unslash($_POST['admin_page']) : '';232 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 233 $required_files = isset($_POST['files']) ? sanitize_text_field(wp_unslash($_POST['files'])) : []; 234 $admin_page = isset($_POST['admin_page']) ? sanitize_text_field(wp_unslash($_POST['admin_page'])) : ''; 240 235 241 236 $customizer_filepath = $this->demo_upload_dir($demo_slug) . '/customizer.dat'; … … 301 296 check_ajax_referer('demo-importer-ajax', 'security'); 302 297 303 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';304 $required_files = isset($_POST['files']) ? wp_unslash($_POST['files']) : [];305 $admin_page = isset($_POST['admin_page']) ? wp_unslash($_POST['admin_page']) : '';298 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 299 $required_files = isset($_POST['files']) ? sanitize_text_field(wp_unslash($_POST['files'])) : []; 300 $admin_page = isset($_POST['admin_page']) ? sanitize_text_field(wp_unslash($_POST['admin_page'])) : ''; 306 301 // admin_page 307 302 if( $admin_page == 'news-kit-elementor-addons-starter-sites' ) { … … 572 567 // Import demo content from XML 573 568 if (class_exists('BLAZE_DEMO_IMPORTER_Import')) { 574 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';575 $admin_page = isset($_POST['admin_page']) ? wp_unslash($_POST['admin_page']) : '';569 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 570 $admin_page = isset($_POST['admin_page']) ? sanitize_text_field(wp_unslash($_POST['admin_page'])) : ''; 576 571 // admin_page 577 572 if( $admin_page == 'news-kit-elementor-addons-starter-sites' ) { … … 809 804 810 805 public function send_ajax_response() { 811 $json = wp_json_encode($this->ajax_response); 812 echo $json; 813 die(); 806 wp_send_json_success($this->ajax_response); 807 // $json = wp_json_encode($this->ajax_response); 808 // echo esc_html( $json ); 809 // echo $json; 810 // die(); 814 811 } 815 812 … … 818 815 $this->ajax_response['error_message'] = esc_html__('You do not have permission to perform this action', 'blaze-demo-importer'); 819 816 $json = wp_json_encode($this->ajax_response); 820 echo $json; 821 die(); 817 wp_send_json_error($this->ajax_response); 818 // echo esc_html( $json ); 819 // echo $json; 820 // die(); 822 821 } 823 822 -
blaze-demo-importer/tags/1.0.14/readme.txt
r3417026 r3417135 1 1 === Blaze Demo Importer === 2 2 Contributors: BlazeThemes 3 Tags: demo importer, blazethemes, widgets, content, import, one click import, widgets, customizer3 Tags: demo importer, widgets, import, one click import, customizer 4 4 Requires at least: 5.3 5 Tested up to: 6. 85 Tested up to: 6.9 6 6 Stable tag: 1.0.14 7 7 Requires PHP: 5.4 … … 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Blaze Demo Importer can be used in all the official themes developed by BlazeThemes. Plugin can be used to import any of the available starter sites settings in your website. Within just a few steps your website will look exactly like the starter website. Provides information about the plugin required to be installed and activated and proceeds automatically.11 Blaze Demo Importer can be used in all the official themes developed by BlazeThemes. 12 12 13 13 == Description == … … 50 50 = 1.0.14 - Dec 11th, 2025 = 51 51 * Added - compatibility check for database reset 52 * Removed - system info admin menu removed 52 53 53 54 = 1.0.13 - Sept 14th, 2025 = -
blaze-demo-importer/trunk/assets/main.js
r3417026 r3417135 59 59 }, 60 60 success: function (response) { 61 var info = JSON.parse(response); 62 console.log( info ) 61 var info = response.data; 63 62 if (!info.error) { 64 63 if (info.complete_message) { … … 199 198 }, 200 199 success: function (response) { 201 var info = JSON.parse(response); 200 var info = response.data; 201 console.log( info ) 202 202 if (!info.error) { 203 203 if (info.complete_message) { -
blaze-demo-importer/trunk/blaze-demo-importer.php
r3417026 r3417135 41 41 $this->plugin_install_count = 0; 42 42 $this->plugin_active_count = 0; 43 $this->current_admin_page_type = isset( $_GET['page'] ) ? $_GET['page']: 'no-page';43 $this->current_admin_page_type = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ): 'no-page'; 44 44 if( file_exists( get_template_directory() . '/inc/admin/assets/demos.php' ) ) $this->configFile = include get_template_directory() . '/inc/admin/assets/demos.php'; 45 45 require_once BLAZE_DEMO_IMPORTER_PATH . 'classes/class-demo-importer.php'; 46 46 require_once BLAZE_DEMO_IMPORTER_PATH . 'classes/class-customizer-importer.php'; 47 47 require_once BLAZE_DEMO_IMPORTER_PATH . 'classes/class-widget-importer.php'; 48 require_once BLAZE_DEMO_IMPORTER_PATH . 'admin-menu/menu.php';49 add_action('init', array($this, 'load_plugin_textdomain')); // i118 file50 48 add_action('admin_enqueue_scripts', array($this, 'admin_scripts')); // admin scripts 51 49 add_action('wp_ajax_blaze_demo_importer_install_demo', array($this, 'blaze_demo_importer_install_demo')); … … 60 58 add_action('wp_ajax_blaze_demo_importer_importing_revslider', array($this, 'blaze_demo_importer_importing_revslider')); 61 59 } 62 // language file 63 public function load_plugin_textdomain() { 64 load_plugin_textdomain('blaze-demo-importer', false, BLAZE_DEMO_IMPORTER_PATH . '/languages'); 65 } 60 66 61 // install demo call 67 62 function blaze_demo_importer_install_demo() { … … 69 64 70 65 // Get the demo content from the right file 71 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';66 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 72 67 $required_plugins = isset($_POST['plugins']) ? wp_unslash($_POST['plugins']) : []; 73 68 $required_files = isset($_POST['files']) ? wp_unslash($_POST['files']) : []; … … 94 89 check_ajax_referer('demo-importer-ajax', 'security'); 95 90 96 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';91 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 97 92 $required_plugins = isset($_POST['plugins']) ? wp_unslash($_POST['plugins']) : []; 98 93 $required_files = isset($_POST['files']) ? wp_unslash($_POST['files']) : []; … … 235 230 check_ajax_referer('demo-importer-ajax', 'security'); 236 231 237 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';238 $required_files = isset($_POST['files']) ? wp_unslash($_POST['files']) : [];239 $admin_page = isset($_POST['admin_page']) ? wp_unslash($_POST['admin_page']) : '';232 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 233 $required_files = isset($_POST['files']) ? sanitize_text_field(wp_unslash($_POST['files'])) : []; 234 $admin_page = isset($_POST['admin_page']) ? sanitize_text_field(wp_unslash($_POST['admin_page'])) : ''; 240 235 241 236 $customizer_filepath = $this->demo_upload_dir($demo_slug) . '/customizer.dat'; … … 301 296 check_ajax_referer('demo-importer-ajax', 'security'); 302 297 303 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';304 $required_files = isset($_POST['files']) ? wp_unslash($_POST['files']) : [];305 $admin_page = isset($_POST['admin_page']) ? wp_unslash($_POST['admin_page']) : '';298 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 299 $required_files = isset($_POST['files']) ? sanitize_text_field(wp_unslash($_POST['files'])) : []; 300 $admin_page = isset($_POST['admin_page']) ? sanitize_text_field(wp_unslash($_POST['admin_page'])) : ''; 306 301 // admin_page 307 302 if( $admin_page == 'news-kit-elementor-addons-starter-sites' ) { … … 572 567 // Import demo content from XML 573 568 if (class_exists('BLAZE_DEMO_IMPORTER_Import')) { 574 $demo_slug = isset($_POST['demo']) ? sanitize_text_field( $_POST['demo']) : '';575 $admin_page = isset($_POST['admin_page']) ? wp_unslash($_POST['admin_page']) : '';569 $demo_slug = isset($_POST['demo']) ? sanitize_text_field(wp_unslash($_POST['demo'])) : ''; 570 $admin_page = isset($_POST['admin_page']) ? sanitize_text_field(wp_unslash($_POST['admin_page'])) : ''; 576 571 // admin_page 577 572 if( $admin_page == 'news-kit-elementor-addons-starter-sites' ) { … … 809 804 810 805 public function send_ajax_response() { 811 $json = wp_json_encode($this->ajax_response); 812 echo $json; 813 die(); 806 wp_send_json_success($this->ajax_response); 807 // $json = wp_json_encode($this->ajax_response); 808 // echo esc_html( $json ); 809 // echo $json; 810 // die(); 814 811 } 815 812 … … 818 815 $this->ajax_response['error_message'] = esc_html__('You do not have permission to perform this action', 'blaze-demo-importer'); 819 816 $json = wp_json_encode($this->ajax_response); 820 echo $json; 821 die(); 817 wp_send_json_error($this->ajax_response); 818 // echo esc_html( $json ); 819 // echo $json; 820 // die(); 822 821 } 823 822 -
blaze-demo-importer/trunk/readme.txt
r3417026 r3417135 1 1 === Blaze Demo Importer === 2 2 Contributors: BlazeThemes 3 Tags: demo importer, blazethemes, widgets, content, import, one click import, widgets, customizer3 Tags: demo importer, widgets, import, one click import, customizer 4 4 Requires at least: 5.3 5 Tested up to: 6. 85 Tested up to: 6.9 6 6 Stable tag: 1.0.14 7 7 Requires PHP: 5.4 … … 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Blaze Demo Importer can be used in all the official themes developed by BlazeThemes. Plugin can be used to import any of the available starter sites settings in your website. Within just a few steps your website will look exactly like the starter website. Provides information about the plugin required to be installed and activated and proceeds automatically.11 Blaze Demo Importer can be used in all the official themes developed by BlazeThemes. 12 12 13 13 == Description == … … 50 50 = 1.0.14 - Dec 11th, 2025 = 51 51 * Added - compatibility check for database reset 52 * Removed - system info admin menu removed 52 53 53 54 = 1.0.13 - Sept 14th, 2025 =
Note: See TracChangeset
for help on using the changeset viewer.