Changeset 3048698
- Timestamp:
- 03/10/2024 06:44:56 PM (2 years ago)
- Location:
- demo-awesome/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (2 diffs)
-
demo-awesome.php (modified) (1 diff)
-
inc/admin/class-demo-awesome-admin.php (modified) (4 diffs)
-
inc/admin/required-plugins.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
demo-awesome/trunk/README.txt
r2952567 r3048698 3 3 Tags: theme4press, data importer, one-click demo import, theme demo, demos, importer, theme4press demo 4 4 Requires at least: 4.7 5 Tested up to: 6. 35 Tested up to: 6.4.3 6 6 Requires PHP: 7.0 7 7 Stable tag: trunk … … 49 49 == Changelog == 50 50 51 = 1.0.2 = 52 * Fixed some security vulnerablities 53 51 54 = 1.0.1 = 52 55 * Corrected a bug, which caused the message "Missing plugins" to appear, when all required plugins are actually installed. -
demo-awesome/trunk/demo-awesome.php
r2662336 r3048698 10 10 * Plugin URI: https://theme4press.com/demo-awesome-the-data-importer/ 11 11 * Description: Import the Theme4Press theme demo content including theme settings, menus, widgets, sliders, and much more with just one click. Awesome! 12 * Version: 1.0. 112 * Version: 1.0.2 13 13 * Author: Theme4Press 14 14 * Author URI: https://theme4press.com -
demo-awesome/trunk/inc/admin/class-demo-awesome-admin.php
r2158733 r3048698 202 202 } 203 203 } 204 204 205 205 206 /** … … 208 209 function call_import_function_from_ajax() 209 210 { 210 211 $data_demo = isset($_REQUEST['data_demo']) ? $_REQUEST['data_demo'] : array(); 211 if ( !current_user_can('manage_options') ) { 212 wp_die('You do not have sufficient permissions to access this feature.'); 213 } 214 $data_demo_raw = isset($_REQUEST['data_demo']) ? $_REQUEST['data_demo'] : array(); 215 $data_demo = array(); 216 217 //TODO (EvgenyViner): Look for a more elegant way to sanitize the data 218 219 if (is_array($data_demo_raw)) { 220 foreach($data_demo_raw as $key => $item) { 221 if(is_array($data_demo_raw[$key])) { 222 foreach($data_demo_raw[$key] as $key2 => $item2) { 223 if(is_array($data_demo_raw[$key][$key2])) { 224 foreach($data_demo_raw[$key][$key2] as $key3 => $item3) { 225 $data_demo[$key][$key2][$key3] = esc_attr($item3); 226 } 227 } 228 else $data_demo[$key][$key2] = esc_attr($item2); 229 } 230 } 231 else $data_demo[$key] = esc_attr($item); 232 } 233 } 234 else { 235 $data_demo = htmlspecialchars((string)$data_demo_raw, ENT_QUOTES, 'UTF-8'); 236 } 212 237 213 238 $template_name = isset($data_demo['folder_path']) ? $data_demo['folder_path'] : ''; … … 317 342 // Include the required plugins list 318 343 require dirname(__FILE__).'/required-plugins.php'; 319 $data_demo = isset($_REQUEST['data_demo']) ? $_REQUEST['data_demo'] : array(); 344 $data_demo_raw = isset($_REQUEST['data_demo']) ? $_REQUEST['data_demo'] : array(); 345 $data_demo = array(); 346 347 //TODO (EvgenyViner): Look for a more elegant way to sanitize the data 348 349 if (is_array($data_demo_raw)) { 350 foreach($data_demo_raw as $key => $item) { 351 if(is_array($data_demo_raw[$key])) { 352 foreach($data_demo_raw[$key] as $key2 => $item2) { 353 if(is_array($data_demo_raw[$key][$key2])) { 354 foreach($data_demo_raw[$key][$key2] as $key3 => $item3) { 355 $data_demo[$key][$key2][$key3] = esc_attr($item3); 356 } 357 } 358 else $data_demo[$key][$key2] = esc_attr($item2); 359 } 360 } 361 else $data_demo[$key] = esc_attr($item); 362 } 363 } 364 else { 365 $data_demo = htmlspecialchars((string)$data_demo_raw, ENT_QUOTES, 'UTF-8'); 366 } 367 320 368 demo_awesome_required_plugins($data_demo); 321 369 wp_die(); // this is required to terminate immediately and return a proper response … … 371 419 372 420 } 421 373 422 $all_plugins = apply_filters('all_plugins', get_plugins()); 374 423 -
demo-awesome/trunk/inc/admin/required-plugins.php
r2158733 r3048698 127 127 $plugin['disable_description'] 128 128 ); 129 // var_dump($plugin); 130 $plugin['slug'] = isset( $plugin['slug']{1} ) ? $plugin['slug'] : $plugin['keyword']; 129 131 $premium_plugin = sprintf( 130 132 '<a class="button evole-install-plugin button-proceed" target="_blank"
Note: See TracChangeset
for help on using the changeset viewer.