diff --git a/admin/settings.php b/admin/settings.php index 9343396..b3fdf34 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -199,7 +199,7 @@ function wp_allstars_ajax_get_plugins() { wp_die(-1); } - $category = isset($_GET['category']) ? sanitize_key($_GET['category']) : 'minimal'; + $category = isset($_POST['category']) ? sanitize_key($_POST['category']) : 'minimal'; require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; @@ -446,7 +446,7 @@ function wp_allstars_set_cached_theme($data) { } // Add AJAX endpoint for theme -function wp_allstars_ajax_get_theme() { +function wp_allstars_ajax_get_themes() { // Check nonce with the correct action name if (!check_ajax_referer('wp-allstars-nonce', '_wpnonce', false)) { wp_send_json_error('Invalid security token sent.'); @@ -506,60 +506,6 @@ function wp_allstars_ajax_get_theme() { // Generate custom HTML for the theme ob_start(); ?> -