diff --git a/admin/settings.php b/admin/settings.php index c08a6d3..88e3bcc 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -329,50 +329,62 @@ function wpa_superstar_ajax_get_theme() { error_log('WPA Superstar: Successfully fetched theme data'); - // Create the list table - $wp_list_table = _get_list_table('WP_Theme_Install_List_Table', array( - 'screen' => get_current_screen() - )); - - if (!$wp_list_table) { - error_log('WPA Superstar: Failed to create list table instance'); - wp_send_json_error('Failed to create theme list table'); - return; - } - - // Set up the theme data - $theme = array( - 'name' => $theme_data->name, - 'slug' => $theme_data->slug, - 'version' => $theme_data->version, - 'author' => $theme_data->author, - 'preview_url' => $theme_data->preview_url, - 'screenshot_url' => $theme_data->screenshot_url, - 'rating' => $theme_data->rating, - 'num_ratings' => $theme_data->num_ratings, - 'downloaded' => $theme_data->downloaded, - 'last_updated' => $theme_data->last_updated, - 'homepage' => $theme_data->homepage, - 'description' => $theme_data->description, - 'download_link' => $theme_data->download_link, - 'active_installs' => $theme_data->active_installs, - ); - - error_log('WPA Superstar: Theme data prepared'); - - // Set up the list table - $wp_list_table->items = array((object) $theme); - $wp_list_table->set_pagination_args(array( - 'total_items' => 1, - 'per_page' => 1, - )); - - error_log('WPA Superstar: Preparing to display theme'); - - // Get the HTML + // Generate custom HTML for the theme ob_start(); - $wp_list_table->prepare_items(); - $wp_list_table->display(); + ?> +