From a2b7ba6d72d6eb2107cb14a504013cf5ac97b795 Mon Sep 17 00:00:00 2001
From: Marcus Quinn <marcus@agentdesign.co.uk>
Date: Mon, 24 Mar 2025 21:37:09 +0000
Subject: [PATCH] Rename About tab to Read Me and display README.md content

---
 admin/css/wp-allstars-admin.css               |  8 ++--
 admin/data/about.php                          | 47 -------------------
 admin/data/readme.php                         | 46 ++++++++++++++++++
 admin/includes/class-admin-manager.php        |  8 ++--
 ...t-manager.php => class-readme-manager.php} | 25 +++++-----
 wp-allstars-plugin.php                        |  4 +-
 6 files changed, 69 insertions(+), 69 deletions(-)
 delete mode 100644 admin/data/about.php
 create mode 100644 admin/data/readme.php
 rename admin/includes/{class-about-manager.php => class-readme-manager.php} (83%)

diff --git a/admin/css/wp-allstars-admin.css b/admin/css/wp-allstars-admin.css
index 460d817..48a4be5 100644
--- a/admin/css/wp-allstars-admin.css
+++ b/admin/css/wp-allstars-admin.css
@@ -897,20 +897,20 @@ input:checked + .wp-toggle-slider:before {
     margin: 1em 0;
 }
 
-/* About Tab Panel */
-#about .wpa-pro-plugins {
+/* Read Me Tab Panel */
+#readme .wpa-pro-plugins {
     display: block;
     padding: 20px;
 }
 
-#about .wpa-pro-plugin {
+#readme .wpa-pro-plugin {
     max-width: 50%;
     margin: 0 auto;
     box-sizing: border-box;
 }
 
 @media screen and (max-width: 960px) {
-    #about .wpa-pro-plugin {
+    #readme .wpa-pro-plugin {
         max-width: 100%;
         margin: 0 auto;
         padding: 20px;
diff --git a/admin/data/about.php b/admin/data/about.php
deleted file mode 100644
index c6bacdc..0000000
--- a/admin/data/about.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
- * About page data for WP ALLSTARS plugin
- * Content supports markdown formatting
- */
-
-if (!defined('ABSPATH')) {
-    exit;
-}
-
-// Define about page content
-function wp_allstars_get_about_content() {
-    return [
-        'title' => 'About WP ALLSTARS',
-        'content' => <<<MARKDOWN
-## Welcome to WP ALLSTARS
-
-WP ALLSTARS is a powerful all-in-one WordPress toolkit designed to help you build, manage, and optimize your WordPress websites more efficiently.
-
-### Our Mission
-
-Our mission is to simplify WordPress development and management by providing a comprehensive suite of tools that work seamlessly together.
-
-### Key Features
-
-* **Theme Management**: Easily install and manage professional WordPress themes
-* **Plugin Recommendations**: Curated lists of the best free and premium plugins
-* **Workflow Optimization**: Tools to streamline your development process
-* **Hosting Recommendations**: Find the perfect hosting provider for your needs
-* **Advanced Settings**: Fine-tune your WordPress installation
-
-### Get in Touch
-
-Have questions or suggestions? We'd love to hear from you!
-
-* **Website**: [wpallstars.com](https://wpallstars.com)
-* **Documentation**: [docs.wpallstars.com](https://docs.wpallstars.com)
-* **Support**: [support@wpallstars.com](mailto:support@wpallstars.com)
-
-### Credits
-
-WP ALLSTARS is developed and maintained by a team of WordPress enthusiasts dedicated to creating the best possible WordPress experience.
-
-Version: {WP_ALLSTARS_VERSION}
-MARKDOWN
-    ];
-}
diff --git a/admin/data/readme.php b/admin/data/readme.php
new file mode 100644
index 0000000..7018c6d
--- /dev/null
+++ b/admin/data/readme.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Read Me data for WP ALLSTARS plugin
+ * Content is pulled from the README.md file
+ */
+
+if (!defined('ABSPATH')) {
+    exit;
+}
+
+// Define readme content
+function wp_allstars_get_readme_content() {
+    // Get README.md content
+    $readme_path = WP_PLUGIN_DIR . '/wpa-superstar-plugin/README.md';
+    $readme_content = '';
+    
+    if (file_exists($readme_path)) {
+        $readme_content = file_get_contents($readme_path);
+    } else {
+        // Fallback content if README.md is not found
+        $readme_content = <<<MARKDOWN
+# WP Allstars
+
+A WordPress plugin that enhances your WordPress experience with curated plugins, themes, and optimization tools.
+
+## Description
+
+WP Allstars is a powerful WordPress plugin designed to help site owners and developers optimize their WordPress installations. It provides a curated collection of recommended plugins, themes, and optimization tools all in one place.
+
+## Features
+
+- **Curated Plugin Recommendations**: Browse and install recommended free plugins organized by category.
+- **Pro Plugin Showcase**: Discover premium plugins with direct links to purchase.
+- **Theme Integration**: Easily install and activate the Kadence theme.
+- **Workflow Optimization**: Tools to streamline your WordPress workflow.
+- **Advanced Settings**: Fine-tune your WordPress installation with advanced configuration options.
+
+Version: {WP_ALLSTARS_VERSION}
+MARKDOWN;
+    }
+    
+    return [
+        'title' => 'Read Me',
+        'content' => $readme_content
+    ];
+}
diff --git a/admin/includes/class-admin-manager.php b/admin/includes/class-admin-manager.php
index 4c1a011..cca5175 100644
--- a/admin/includes/class-admin-manager.php
+++ b/admin/includes/class-admin-manager.php
@@ -250,8 +250,8 @@ class WP_Allstars_Admin_Manager {
                     <a href="?page=wp-allstars&tab=tools" class="nav-tab <?php echo $active_tab === 'tools' ? 'nav-tab-active' : ''; ?>">
                         <?php esc_html_e('Tools', 'wp-allstars'); ?>
                     </a>
-                    <a href="?page=wp-allstars&tab=about" class="nav-tab <?php echo $active_tab === 'about' ? 'nav-tab-active' : ''; ?>">
-                        <?php esc_html_e('About', 'wp-allstars'); ?>
+                    <a href="?page=wp-allstars&tab=readme" class="nav-tab <?php echo $active_tab === 'readme' ? 'nav-tab-active' : ''; ?>">
+                        <?php esc_html_e('Read Me', 'wp-allstars'); ?>
                     </a>
                 </h2>
                 
@@ -291,8 +291,8 @@ class WP_Allstars_Admin_Manager {
                             WP_Allstars_Tools_Manager::display_tab_content();
                             break;
                             
-                        case 'about':
-                            WP_Allstars_About_Manager::display_tab_content();
+                        case 'readme':
+                            WP_Allstars_Readme_Manager::display_tab_content();
                             break;
                     }
                     ?>
diff --git a/admin/includes/class-about-manager.php b/admin/includes/class-readme-manager.php
similarity index 83%
rename from admin/includes/class-about-manager.php
rename to admin/includes/class-readme-manager.php
index f753f27..145e672 100644
--- a/admin/includes/class-about-manager.php
+++ b/admin/includes/class-readme-manager.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * About Page Manager Class
+ * Read Me Manager Class
  * 
  * @package WP_ALLSTARS
  * @since 0.2.0
@@ -10,7 +10,7 @@ if (!defined('ABSPATH')) {
     exit;
 }
 
-class WP_Allstars_About_Manager {
+class WP_Allstars_Readme_Manager {
     
     /**
      * Initialize the class
@@ -20,7 +20,7 @@ class WP_Allstars_About_Manager {
     }
     
     /**
-     * Enqueue styles for the about tab
+     * Enqueue styles for the readme tab
      *
      * @param string $hook Current admin page hook
      */
@@ -38,28 +38,28 @@ class WP_Allstars_About_Manager {
     }
     
     /**
-     * Get the about page content
+     * Get the readme content
      * 
      * @return array
      */
-    public static function get_about_content() {
-        return wp_allstars_get_about_content();
+    public static function get_readme_content() {
+        return wp_allstars_get_readme_content();
     }
     
     /**
-     * Display the about tab content
+     * Display the readme tab content
      */
     public static function display_tab_content() {
-        $about = self::get_about_content();
+        $readme = self::get_readme_content();
         
         ?>
-        <div class="wp-allstars-settings-content tab-content" id="about">
+        <div class="wp-allstars-settings-content tab-content" id="readme">
             <div class="wpa-pro-plugins">
                 <div class="wpa-pro-plugin">
-                    <h3><?php echo esc_html($about['title']); ?></h3>
+                    <h3><?php echo esc_html($readme['title']); ?></h3>
                     
                     <div class="wp-allstars-markdown-content">
-                        <?php echo self::parse_markdown($about['content']); ?>
+                        <?php echo self::parse_markdown($readme['content']); ?>
                     </div>
                 </div>
             </div>
@@ -89,6 +89,7 @@ class WP_Allstars_About_Manager {
         $markdown = preg_replace('/\*(.*?)\*/s', '<em>$1</em>', $markdown);
         
         // Lists
+        $markdown = preg_replace('/^- (.*?)$/m', '<li>$1</li>', $markdown);
         $markdown = preg_replace('/^\* (.*?)$/m', '<li>$1</li>', $markdown);
         $markdown = preg_replace('/(<li>.*?<\/li>\n)+/s', '<ul>$0</ul>', $markdown);
         
@@ -111,4 +112,4 @@ class WP_Allstars_About_Manager {
 }
 
 // Initialize the class
-WP_Allstars_About_Manager::init();
+WP_Allstars_Readme_Manager::init();
diff --git a/wp-allstars-plugin.php b/wp-allstars-plugin.php
index 76b47b1..5b942c6 100644
--- a/wp-allstars-plugin.php
+++ b/wp-allstars-plugin.php
@@ -59,14 +59,14 @@ if (is_admin()) {
     require_once plugin_dir_path(__FILE__) . 'admin/includes/class-pro-plugins-manager.php';
     require_once plugin_dir_path(__FILE__) . 'admin/includes/class-plugin-manager.php';
     require_once plugin_dir_path(__FILE__) . 'admin/includes/class-free-plugins-manager.php';
-    require_once plugin_dir_path(__FILE__) . 'admin/includes/class-about-manager.php';
+    require_once plugin_dir_path(__FILE__) . 'admin/includes/class-readme-manager.php';
     
     // Initialize the admin manager
     add_action('plugins_loaded', array('WP_Allstars_Admin_Manager', 'init'));
     
     // Data files
     require_once plugin_dir_path(__FILE__) . 'admin/data/pro-plugins.php';
-    require_once plugin_dir_path(__FILE__) . 'admin/data/about.php';
+    require_once plugin_dir_path(__FILE__) . 'admin/data/readme.php';
     
     // Legacy files (for backward compatibility)
     require_once plugin_dir_path(__FILE__) . 'admin/settings.php';