diff --git a/.gitignore b/.gitignore
index 0cd6eb0..dc50bd5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,7 +38,7 @@ $RECYCLE.BIN/
.git_status_temp.txt
project-documents/
reference-plugins/
-*.bak
+*.bak*
node_modules/
composer.lock
package-lock.json
diff --git a/admin/css/wp-allstars-plugins.css b/admin/css/wp-allstars-plugins.css
index 5f914f8..427a71e 100644
--- a/admin/css/wp-allstars-plugins.css
+++ b/admin/css/wp-allstars-plugins.css
@@ -342,6 +342,40 @@ body.wp-admin .wp-list-table.plugin-install #the-list .plugin-card .action-links
line-height: 28px !important;
padding-top: 0 !important;
padding-bottom: 0 !important;
+ background-color: #d35400 !important;
+ color: #fff !important;
+ border-color: #c24e00 !important;
+ transition: all 0.3s ease !important;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
+ position: relative !important;
+ overflow: hidden !important;
+}
+
+body.wp-admin .wp-list-table.plugin-install #the-list .plugin-card .action-links .button.go-pro::before {
+ content: '' !important;
+ position: absolute !important;
+ top: 0 !important;
+ left: -100% !important;
+ width: 100% !important;
+ height: 100% !important;
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
+ transition: all 0.5s ease !important;
+}
+
+body.wp-admin .wp-list-table.plugin-install #the-list .plugin-card .action-links .button.go-pro:hover {
+ background-color: #aa4300 !important;
+ border-color: #953b00 !important;
+ transform: translateY(-2px) !important;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
+}
+
+body.wp-admin .wp-list-table.plugin-install #the-list .plugin-card .action-links .button.go-pro:hover::before {
+ left: 100% !important;
+}
+
+body.wp-admin .wp-list-table.plugin-install #the-list .plugin-card .action-links .button.go-pro:active {
+ transform: translateY(0) !important;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}
/* Ensure consistent layout for action buttons */
diff --git a/admin/data/free-plugins.php b/admin/data/free-plugins.php
new file mode 100644
index 0000000..0501df2
--- /dev/null
+++ b/admin/data/free-plugins.php
@@ -0,0 +1,161 @@
+ array(
+ 'antispam-bee',
+ 'compressx',
+ 'fluent-smtp',
+ 'kadence-blocks',
+ 'simple-cloudflare-turnstile'
+ ),
+ 'admin' => array(
+ 'admin-bar-dashboard-control',
+ 'codepress-admin-columns',
+ 'admin-menu-editor',
+ 'hide-admin-notices',
+ 'mainwp-child',
+ 'mainwp-child-reports',
+ 'magic-login',
+ 'manage-notification-emails',
+ 'plugin-groups',
+ 'plugin-toggle'
+ ),
+ 'affiliates' => array(
+ 'pretty-links',
+ 'simple-urls',
+ 'slicewp'
+ ),
+ 'ai' => array(
+ 'ai-engine',
+ ),
+ 'cms' => array(
+ 'auto-post-scheduler',
+ 'block-options',
+ 'bookmark-card',
+ 'browser-shots',
+ 'bulk-actions-select-all',
+ 'bulk-edit-categories-tags',
+ 'bulk-edit-user-profiles-in-spreadsheet',
+ 'carbon-copy',
+ 'code-block-pro',
+ 'iframe-block',
+ 'ics-calendar',
+ 'mammoth-docx-converter',
+ 'nav-menu-roles',
+ 'ninja-tables',
+ 'post-draft-preview',
+ 'post-type-switcher',
+ 'simple-custom-post-order',
+ 'simple-icons',
+ 'sticky-posts-switch',
+ 'term-management-tools',
+ 'the-paste',
+ 'ultimate-addons-for-gutenberg',
+ 'wikipedia-preview',
+ 'wp-sheet-editor-bulk-spreadsheet-editor-for-posts-and-pages'
+ ),
+ 'compliance' => array(
+ 'avatar-privacy',
+ 'complianz-gdpr',
+ 'complianz-terms-conditions',
+ 'really-simple-ssl'
+ ),
+ 'crm' => array(
+ 'fluent-boards',
+ 'fluent-booking',
+ 'fluent-community',
+ 'fluent-crm',
+ 'fluentform',
+ 'fluentforms-pdf',
+ 'fluentform-block',
+ 'fluent-support'
+ ),
+ 'ecommerce' => array(
+ 'woocommerce',
+ 'woo-bulk-edit-products',
+ 'woo-coupons-bulk-editor',
+ 'woocommerce-gateway-gocardless',
+ 'kadence-woocommerce-email-designer',
+ 'pymntpl-paypal-woocommerce',
+ 'woo-stripe-payment'
+ ),
+ 'lms' => array(
+ 'fluent-community',
+ 'masterstudy-lms-learning-management-system',
+ 'tutor'
+ ),
+ 'media' => array(
+ 'easy-watermark',
+ 'enable-media-replace',
+ 'image-copytrack',
+ 'imsanity',
+ 'media-file-renamer',
+ 'safe-svg'
+ ),
+ 'seo' => array(
+ 'burst-statistics',
+ 'pretty-link',
+ 'revive-so',
+ 'seo-by-rank-math',
+ 'syndication-links',
+ 'ultimate-410',
+ 'webmention'
+ ),
+ 'setup' => array(
+ 'kadence-starter-templates',
+ 'wordpress-importer'
+ ),
+ 'social' => array(
+ 'bit-social',
+ 'easy-video-reviews',
+ 'social-engine',
+ 'wp-social-ninja',
+ 'wp-social-reviews'
+ ),
+ 'speed' => array(
+ 'disable-wordpress-updates',
+ 'flying-analytics',
+ 'flying-pages',
+ 'flying-scripts',
+ 'freesoul-deactivate-plugins',
+ 'index-wp-mysql-for-speed',
+ 'litespeed-cache',
+ 'performant-translations',
+ 'wp-optimize',
+ 'wp-widget-disable'
+ ),
+ 'translation' => array(
+ 'hreflang-manager-lite',
+ 'performant-translations',
+ 'translatepress-multilingual'
+ ),
+ 'advanced' => array(
+ 'acf-better-search',
+ 'advanced-custom-fields',
+ 'automatorwp',
+ 'bit-pi',
+ 'bit-integrations',
+ 'code-snippets',
+ 'easy-code-manager',
+ 'favorites',
+ 'remove-cpt-base',
+ 'remove-old-slugspermalinks',
+ 'secure-custom-fields',
+ 'yellow-pencil-visual-theme-customizer'
+ ),
+ 'debug' => array(
+ 'advanced-database-cleaner',
+ 'debug-log-manager',
+ 'gotmls',
+ 'query-monitor',
+ 'string-locator',
+ 'user-switching',
+ 'wp-crontrol'
+ )
+ );
+}
diff --git a/admin/data/pro-plugins.php b/admin/data/pro-plugins.php
new file mode 100644
index 0000000..e5c03f1
--- /dev/null
+++ b/admin/data/pro-plugins.php
@@ -0,0 +1,530 @@
+ array(
+ 'name' => 'Magic Login Pro',
+ 'description' => 'Enable passwordless authentication with magic login links and enhance WordPress site security.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://handyplugins.co/magic-login-pro/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://handyplugins.co/magic-login-pro/#pricing'
+ )
+ ),
+ 'free_slug' => 'magic-login'
+ ),
+ 'admin-columns' => array(
+ 'name' => 'Admin Columns Pro',
+ 'description' => 'Advanced admin columns management with sorting, filtering, and editing capabilities.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://www.admincolumns.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://www.admincolumns.com/pricing/'
+ )
+ ),
+ 'free_slug' => 'codepress-admin-columns'
+ ),
+ 'admin-menu-editor' => array(
+ 'name' => 'Admin Menu Editor Pro',
+ 'description' => 'Customize the WordPress admin menu with advanced features and role management.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://adminmenueditor.com/upgrade-to-pro/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://adminmenueditor.com/upgrade-to-pro/'
+ )
+ ),
+ 'free_slug' => 'admin-menu-editor'
+ ),
+ 'advanced-custom-fields' => array(
+ 'name' => 'Advanced Custom Fields PRO',
+ 'description' => 'Create custom fields and content types with advanced features and options.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://www.advancedcustomfields.com/pro/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://www.advancedcustomfields.com/pro/#pricing'
+ )
+ ),
+ 'free_slug' => 'advanced-custom-fields'
+ ),
+ 'advanced-database-cleaner' => array(
+ 'name' => 'Advanced Database Cleaner PRO',
+ 'description' => 'Clean and optimize your WordPress database with advanced tools and automation.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://sigmaplugin.com/downloads/wordpress-advanced-database-cleaner',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://sigmaplugin.com/downloads/wordpress-advanced-database-cleaner/#price_table'
+ )
+ ),
+ 'free_slug' => 'advanced-database-cleaner'
+ ),
+ 'ai-engine' => array(
+ 'name' => 'AI Engine (Pro)',
+ 'description' => 'Enhanced AI capabilities for content generation, analysis, and automation.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://meowapps.com/plugin/ai-engine/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://meowapps.com/ai-engine-pricing/'
+ )
+ ),
+ 'free_slug' => 'ai-engine'
+ ),
+ 'code-profiler' => array(
+ 'name' => 'Code Profiler Pro',
+ 'description' => 'Advanced performance monitoring and debugging tools for WordPress.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://codeprofiler.io/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://codeprofiler.io/#pricing'
+ )
+ )
+ ),
+ 'code-snippets' => array(
+ 'name' => 'Code Snippets Pro',
+ 'description' => 'Add and manage custom code snippets with advanced features and management tools.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://codesnippets.pro/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://codesnippets.pro/pricing/'
+ )
+ ),
+ 'free_slug' => 'code-snippets'
+ ),
+ 'comment-goblin' => array(
+ 'name' => 'Comment Goblin',
+ 'description' => 'Advanced comment management and spam protection system.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://commentgoblin.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://commentgoblin.com/#pricing'
+ )
+ )
+ ),
+ 'complianz-gdpr' => array(
+ 'name' => 'Complianz Privacy Suite',
+ 'description' => 'Complete GDPR/CCPA compliance solution with advanced features.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://complianz.io/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://complianz.io/pricing/'
+ )
+ ),
+ 'free_slug' => 'complianz-gdpr'
+ ),
+ 'disable-bloat' => array(
+ 'name' => 'Disable Bloat PRO',
+ 'description' => 'Advanced optimization for WordPress & WooCommerce with premium features.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://disablebloat.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://disablebloat.com/#pricing'
+ )
+ )
+ ),
+ 'fluent-crm' => array(
+ 'name' => 'FluentCRM Pro',
+ 'description' => 'Advanced CRM and email marketing automation.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://fluentcrm.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://fluentcrm.com/pricing/'
+ ),
+ array(
+ 'text' => 'Automation Pack',
+ 'url' => 'https://fluentcrm.com/modules/automation-pack/'
+ )
+ ),
+ 'free_slug' => 'fluent-crm'
+ ),
+ 'fluent-forms' => array(
+ 'name' => 'Fluent Forms Pro',
+ 'description' => 'Advanced form builder with conversational forms and powerful integrations.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://fluentforms.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://fluentforms.com/pricing/'
+ )
+ ),
+ 'free_slug' => 'fluentform'
+ ),
+ 'fluent-smtp' => array(
+ 'name' => 'FluentSMTP Pro',
+ 'description' => 'Advanced SMTP and email delivery solution with analytics and logs.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://fluentsmtp.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://fluentsmtp.com/pricing/'
+ )
+ ),
+ 'free_slug' => 'fluent-smtp'
+ ),
+ 'flyingpress' => array(
+ 'name' => 'FlyingPress',
+ 'description' => 'Advanced WordPress performance optimization with automatic critical CSS and more.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://flyingpress.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://flyingpress.com/pricing/'
+ )
+ )
+ ),
+ 'freesoul-deactivate-plugins' => array(
+ 'name' => 'Freesoul Deactivate Plugins PRO',
+ 'description' => 'Advanced plugin management with selective deactivation and performance optimization.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://freesoul-deactivate-plugins.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://freesoul-deactivate-plugins.com/pricing/'
+ )
+ ),
+ 'free_slug' => 'freesoul-deactivate-plugins'
+ ),
+ 'generateblocks-pro' => array(
+ 'name' => 'GenerateBlocks Pro',
+ 'description' => 'Advanced block library extension with powerful features for GenerateBlocks.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://generateblocks.com/pro/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://generateblocks.com/pro/#pricing'
+ )
+ ),
+ 'free_slug' => 'generateblocks'
+ ),
+ 'oxygen-builder' => array(
+ 'name' => 'Oxygen Builder',
+ 'description' => 'Advanced visual website builder with unlimited design flexibility.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://oxygenbuilder.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://oxygenbuilder.com/pricing/'
+ )
+ )
+ ),
+ 'perfmatters' => array(
+ 'name' => 'Perfmatters',
+ 'description' => 'Lightweight performance plugin for WordPress to disable unused features.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://perfmatters.io/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://perfmatters.io/pricing/'
+ )
+ )
+ ),
+ 'pixelbuddha' => array(
+ 'name' => 'PixelBuddha PRO',
+ 'description' => 'Premium design assets and templates for WordPress.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://pixelbuddha.net/membership',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://pixelbuddha.net/membership'
+ )
+ )
+ ),
+ 'rank-math-pro' => array(
+ 'name' => 'Rank Math PRO',
+ 'description' => 'Advanced SEO features including schema markup, rank tracking, and content analysis.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://rankmath.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://rankmath.com/pricing/'
+ )
+ ),
+ 'free_slug' => 'seo-by-rank-math'
+ ),
+ 'self-hosted-google-fonts' => array(
+ 'name' => 'OMGF Pro',
+ 'description' => 'Advanced control over Google Fonts with local hosting and optimization.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://daan.dev/wordpress/omgf-pro/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://daan.dev/wordpress/omgf-pro/#pricing'
+ )
+ ),
+ 'free_slug' => 'host-webfonts-local'
+ ),
+ 'shortpixel-image-optimizer' => array(
+ 'name' => 'ShortPixel Image Optimizer',
+ 'description' => 'Premium image optimization with advanced compression algorithms.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://shortpixel.com/otp/af/WMBPNHN1231799',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://shortpixel.com/otp/af/WMBPNHN1231799#pricing'
+ )
+ ),
+ 'free_slug' => 'shortpixel-image-optimiser'
+ ),
+ 'simpletoc-pro' => array(
+ 'name' => 'Simple TOC Pro',
+ 'description' => 'Advanced table of contents with custom designs and display options.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://marc.tv/simpletoc-pro/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://marc.tv/en/checkout/purchase-history/?level=6'
+ )
+ ),
+ 'free_slug' => 'simpletoc'
+ ),
+ 'swift-control-pro' => array(
+ 'name' => 'Swift Control Pro',
+ 'description' => 'Advanced admin bar replacement with customizable controls and shortcuts.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://swiftcontrolpro.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://swiftcontrolpro.com/#pricing'
+ )
+ ),
+ 'free_slug' => 'swift-control'
+ ),
+ 'swiftperformance' => array(
+ 'name' => 'Swift Performance',
+ 'description' => 'Advanced performance optimization with caching, minification, and CDN integration.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://swiftperformance.io/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://swiftperformance.io/pricing/'
+ )
+ ),
+ 'free_slug' => 'swift-performance-lite'
+ ),
+ 'wp-rocket' => array(
+ 'name' => 'WP Rocket',
+ 'description' => 'Premium caching and performance plugin with advanced optimization features.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://wp-rocket.me/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://wp-rocket.me/pricing/'
+ )
+ )
+ ),
+ 'wp-seopress-pro' => array(
+ 'name' => 'SEOPress Pro',
+ 'description' => 'Advanced SEO plugin with premium features for optimization and analytics.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://www.seopress.org/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://www.seopress.org/pricing/'
+ )
+ ),
+ 'free_slug' => 'wp-seopress'
+ ),
+ 'woocommerce-color-swatches' => array(
+ 'name' => 'Variation Swatches for WooCommerce Pro',
+ 'description' => 'Advanced color and image swatches for WooCommerce product variations.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://getwooplugins.com/plugins/woocommerce-variation-swatches/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://getwooplugins.com/plugins/woocommerce-variation-swatches/'
+ )
+ ),
+ 'free_slug' => 'woo-variation-swatches'
+ ),
+ 'woocommerce-subscriptions' => array(
+ 'name' => 'WooCommerce Subscriptions',
+ 'description' => 'Add subscription-based products and recurring payments to WooCommerce.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://woocommerce.com/products/woocommerce-subscriptions/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://woocommerce.com/products/woocommerce-subscriptions/'
+ )
+ )
+ ),
+ 'woocommerce-wholesale-suite' => array(
+ 'name' => 'WooCommerce Wholesale Suite',
+ 'description' => 'Add wholesale functionality to your WooCommerce store.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://wholesalesuiteplugin.com/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://wholesalesuiteplugin.com/pricing/'
+ )
+ )
+ ),
+ 'yoast-seo-premium' => array(
+ 'name' => 'Yoast SEO Premium',
+ 'description' => 'Advanced SEO tools with premium features for optimization and content analysis.',
+ 'button_group' => array(
+ array(
+ 'text' => 'Home Page',
+ 'url' => 'https://yoast.com/wordpress/plugins/seo/',
+ 'primary' => true
+ ),
+ array(
+ 'text' => 'Pricing',
+ 'url' => 'https://yoast.com/wordpress/plugins/seo/#licenses'
+ )
+ ),
+ 'free_slug' => 'wordpress-seo'
+ )
+ );
+}
diff --git a/admin/includes/class-admin-manager.php b/admin/includes/class-admin-manager.php
index a9ce1f6..c77d0c1 100644
--- a/admin/includes/class-admin-manager.php
+++ b/admin/includes/class-admin-manager.php
@@ -1,53 +1,42 @@
'Option updated successfully',
+ 'option' => $option,
+ 'value' => $value
+ ));
+ } else {
+ wp_send_json_success(array(
+ 'message' => 'No changes made to option',
+ 'option' => $option
+ ));
+ }
}
/**
* Register the admin menu item
- *
- * Adds the WP ALLSTARS menu item under the Settings menu
- * in the WordPress admin dashboard.
- *
- * @return void
*/
public static function register_admin_menu() {
add_options_page(
@@ -130,14 +159,12 @@ class WP_Allstars_Admin_Manager {
$active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'general';
$active_category = isset($_GET['category']) ? $_GET['category'] : 'minimal';
- // Clear cache and load required files
+ // Tab-specific resources
if ($active_tab === 'recommended') {
WP_Allstars_Plugin_Manager::clear_plugin_cache();
- require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
wp_enqueue_script('plugin-install');
wp_enqueue_script('updates');
add_thickbox();
- wp_enqueue_style('wp-allstars-admin', plugins_url('css/wp-allstars-admin.css', dirname(__FILE__)));
wp_enqueue_style('wp-allstars-plugins', plugins_url('css/wp-allstars-plugins.css', dirname(__FILE__)));
// Add inline script to load plugins on page load
@@ -237,7 +264,7 @@ class WP_Allstars_Admin_Manager {
break;
case 'workflow':
- self::display_workflow_tab();
+ WP_Allstars_Workflow_Manager::display_tab_content();
break;
case 'theme':
@@ -245,7 +272,7 @@ class WP_Allstars_Admin_Manager {
break;
case 'recommended':
- WP_Allstars_Recommended_Plugins_Manager::display_tab_content();
+ WP_Allstars_Free_Plugins_Manager::display_tab_content();
break;
case 'pro':
@@ -275,91 +302,4 @@ class WP_Allstars_Admin_Manager {
public static function enqueue_scripts($hook) {
self::enqueue_admin_scripts($hook);
}
-
- /**
- * Display the Workflow tab content
- */
- public static function display_workflow_tab() {
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
- %filename%, %post_id%, %postname%, %timestamp%, %date%, %year%, %month%, %day%
-
-
-
-
-
-
-
- %filename%, %post_title%, %post_id%, %postname%, %timestamp%
-
-
-
-
-
-
+
+ slug])) {
$pro_plugin = $pro_plugins[$plugin->slug];
@@ -355,7 +355,7 @@ class WP_Allstars_Plugin_Manager {
* Clear plugin cache when plugins are updated, activated, or deactivated
*/
public static function clear_plugin_cache() {
- $recommended_plugins = wp_allstars_get_recommended_plugins();
+ $recommended_plugins = wp_allstars_get_free_plugins();
foreach (array_keys($recommended_plugins) as $category) {
delete_transient('wp_allstars_plugins_' . $category);
}
diff --git a/admin/includes/class-pro-plugins-manager.php b/admin/includes/class-pro-plugins-manager.php
index 5002e8d..6e021d1 100644
--- a/admin/includes/class-pro-plugins-manager.php
+++ b/admin/includes/class-pro-plugins-manager.php
@@ -43,8 +43,8 @@ class WP_Allstars_Pro_Plugins_Manager {
* @return array Array of premium plugin data
*/
public static function get_pro_plugins() {
- // Load pro plugin configuration from the function defined in pro-plugins-config.php
- return wp_allstars_get_pro_plugins_config();
+ // Load pro plugin configuration from the data file
+ return wp_allstars_get_pro_plugins();
}
/**
diff --git a/admin/includes/class-recommended-plugins-manager.php b/admin/includes/class-recommended-plugins-manager.php
deleted file mode 100644
index 8d8542f..0000000
--- a/admin/includes/class-recommended-plugins-manager.php
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
-
+
+
+
+
+
+
@@ -178,13 +108,16 @@ class WP_Allstars_Tools_Manager {
}
/**
- * Enqueue styles specific to tools
- *
- * Note: This method is no longer used as styles are now directly included in the display_tab_content method
- * for immediate application. Kept for reference or future use if needed.
+ * Sanitize tool data
+ *
+ * @param array $tool Raw tool data
+ * @return array Sanitized tool data
*/
- public static function enqueue_styles($hook) {
- // This method is currently not in use as styles are directly included in the HTML output
- // to ensure immediate application without relying on the WordPress hook system timing
+ private static function sanitize_tool_data($tool) {
+ return array(
+ 'name' => isset($tool['name']) ? sanitize_text_field($tool['name']) : '',
+ 'description' => isset($tool['description']) ? sanitize_text_field($tool['description']) : '',
+ 'button_group' => isset($tool['button_group']) ? $tool['button_group'] : array(),
+ );
}
}
diff --git a/admin/includes/class-workflow-manager.php b/admin/includes/class-workflow-manager.php
new file mode 100644
index 0000000..5e01ccd
--- /dev/null
+++ b/admin/includes/class-workflow-manager.php
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %filename%, %post_id%, %postname%, %timestamp%, %date%, %year%, %month%, %day%
+
+
+
+
+
+
+
+ %filename%, %post_title%, %post_id%, %postname%, %timestamp%
+
+
+
+
+
+ array(
- 'name' => 'Magic Login Pro',
- 'description' => 'Enable passwordless authentication with magic login links and enhance WordPress site security.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://handyplugins.co/magic-login-pro/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://handyplugins.co/magic-login-pro/#pricing'
- )
- ),
- 'free_slug' => 'magic-login'
- ),
- 'admin-columns' => array(
- 'name' => 'Admin Columns Pro',
- 'description' => 'Advanced admin columns management with sorting, filtering, and editing capabilities.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://www.admincolumns.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://www.admincolumns.com/pricing/'
- )
- ),
- 'free_slug' => 'codepress-admin-columns'
- ),
- 'admin-menu-editor' => array(
- 'name' => 'Admin Menu Editor Pro',
- 'description' => 'Customize the WordPress admin menu with advanced features and role management.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://adminmenueditor.com/upgrade-to-pro/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://adminmenueditor.com/upgrade-to-pro/'
- )
- ),
- 'free_slug' => 'admin-menu-editor'
- ),
- 'advanced-custom-fields' => array(
- 'name' => 'Advanced Custom Fields PRO',
- 'description' => 'Create custom fields and content types with advanced features and options.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://www.advancedcustomfields.com/pro/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://www.advancedcustomfields.com/pro/#pricing'
- )
- ),
- 'free_slug' => 'advanced-custom-fields'
- ),
- 'advanced-database-cleaner' => array(
- 'name' => 'Advanced Database Cleaner PRO',
- 'description' => 'Clean and optimize your WordPress database with advanced tools and automation.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://sigmaplugin.com/downloads/wordpress-advanced-database-cleaner',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://sigmaplugin.com/downloads/wordpress-advanced-database-cleaner/#price_table'
- )
- ),
- 'free_slug' => 'advanced-database-cleaner'
- ),
- 'ai-engine' => array(
- 'name' => 'AI Engine (Pro)',
- 'description' => 'Enhanced AI capabilities for content generation, analysis, and automation.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://meowapps.com/plugin/ai-engine/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://meowapps.com/ai-engine-pricing/'
- )
- ),
- 'free_slug' => 'ai-engine'
- ),
- 'code-profiler' => array(
- 'name' => 'Code Profiler Pro',
- 'description' => 'Advanced performance monitoring and debugging tools for WordPress.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://codeprofiler.io/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://codeprofiler.io/#pricing'
- )
- )
- ),
- 'code-snippets' => array(
- 'name' => 'Code Snippets Pro',
- 'description' => 'Add and manage custom code snippets with advanced features and management tools.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://codesnippets.pro/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://codesnippets.pro/pricing/'
- )
- ),
- 'free_slug' => 'code-snippets'
- ),
- 'comment-goblin' => array(
- 'name' => 'Comment Goblin',
- 'description' => 'Advanced comment management and spam protection system.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://commentgoblin.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://commentgoblin.com/#pricing'
- )
- )
- ),
- 'complianz-gdpr' => array(
- 'name' => 'Complianz Privacy Suite',
- 'description' => 'Complete GDPR/CCPA compliance solution with advanced features.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://complianz.io/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://complianz.io/pricing/'
- )
- ),
- 'free_slug' => 'complianz-gdpr'
- ),
- 'disable-bloat' => array(
- 'name' => 'Disable Bloat PRO',
- 'description' => 'Advanced optimization for WordPress & WooCommerce with premium features.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://disablebloat.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://disablebloat.com/#pricing'
- )
- )
- ),
- 'fluent-crm' => array(
- 'name' => 'FluentCRM Pro',
- 'description' => 'Advanced CRM and email marketing automation.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://fluentcrm.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://fluentcrm.com/pricing/'
- ),
- array(
- 'text' => 'Automation Pack',
- 'url' => 'https://fluentcrm.com/modules/automation-pack/'
- )
- ),
- 'free_slug' => 'fluent-crm'
- ),
- 'fluent-forms' => array(
- 'name' => 'Fluent Forms Pro',
- 'description' => 'Advanced form builder with premium features.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://fluentforms.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://fluentforms.com/pricing/'
- ),
- array(
- 'text' => 'PDF Add-on',
- 'url' => 'https://fluentforms.com/modules/pdf-add-on/'
- )
- ),
- 'free_slug' => 'fluentform'
- ),
- 'mainwp' => array(
- 'name' => 'MainWP Pro',
- 'description' => 'Manage multiple WordPress sites from a single dashboard with advanced features.',
- 'button_group' => array(
- array(
- 'text' => 'Go Pro',
- 'url' => 'https://mainwp.com/upgrade/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://mainwp.com/purchase/'
- )
- ),
- 'free_slug' => 'mainwp-child'
- ),
- 'revive-so' => array(
- 'name' => 'Revive.so Pro',
- 'description' => 'Advanced content optimization and SEO tool for WordPress.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://revive.so/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://revive.so/pricing/'
- )
- ),
- 'free_slug' => 'revive-so'
- ),
- 'fluent-support' => array(
- 'name' => 'Fluent Support Pro',
- 'description' => 'Premium help desk and support ticket system.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://fluentsupport.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://fluentsupport.com/pricing/'
- )
- ),
- 'free_slug' => 'fluent-support'
- ),
- 'fluentbooking' => array(
- 'name' => 'FluentBooking Pro',
- 'description' => 'Advanced booking and scheduling system.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://fluentbooking.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://fluentbooking.com/pricing/'
- )
- ),
- 'free_slug' => 'fluent-booking'
- ),
- 'freesoul-deactivate-plugins' => array(
- 'name' => 'Freesoul Deactivate Plugins PRO',
- 'description' => 'Advanced plugin management with conditional loading and optimization.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://freesoul-deactivate-plugins.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://freesoul-deactivate-plugins.com/pro/'
- )
- ),
- 'free_slug' => 'freesoul-deactivate-plugins'
- ),
- 'kadence-blocks' => array(
- 'name' => 'Kadence Blocks Pro',
- 'description' => 'Premium blocks and templates for the WordPress editor.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://www.kadencewp.com/kadence-blocks/pro/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://www.kadencewp.com/pricing/'
- ),
- array(
- 'text' => 'Theme Pro',
- 'url' => 'https://www.kadencewp.com/kadence-theme/pro/'
- )
- ),
- 'free_slug' => 'kadence-blocks'
- ),
- 'link-whisper' => array(
- 'name' => 'Link Whisper',
- 'description' => 'AI-powered internal linking suggestions and management.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://linkwhisper.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://linkwhisper.com/pricing/'
- )
- )
- ),
- 'media-file-renamer' => array(
- 'name' => 'Media File Renamer Pro',
- 'description' => 'AI-Powered media file renaming for better SEO.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://meowapps.com/plugin/media-file-renamer/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://meowapps.com/media-file-renamer-pricing/'
- )
- ),
- 'free_slug' => 'media-file-renamer'
- ),
- 'ninja-tables' => array(
- 'name' => 'Ninja Tables Pro',
- 'description' => 'Advanced table creation and management with premium features.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://wpmanageninja.com/ninja-tables/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://wpmanageninja.com/downloads/ninja-tables-pro-add-on/'
- )
- ),
- 'free_slug' => 'ninja-tables'
- ),
- 'seo-by-rank-math' => array(
- 'name' => 'Rank Math SEO PRO',
- 'description' => 'Advanced SEO tools and features for better search engine optimization.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://rankmath.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://rankmath.com/pricing/'
- )
- ),
- 'free_slug' => 'seo-by-rank-math'
- ),
- 'really-simple-ssl' => array(
- 'name' => 'Really Simple SSL Pro',
- 'description' => 'Advanced SSL management and security features.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://really-simple-ssl.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://really-simple-ssl.com/pro/'
- )
- ),
- 'free_slug' => 'really-simple-ssl'
- ),
- 'scalability-pro' => array(
- 'name' => 'Scalability Pro',
- 'description' => 'Advanced performance optimization and scaling tools.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://scalability.pro/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://scalability.pro/#pricing'
- )
- )
- ),
- 'social-engine' => array(
- 'name' => 'Social Engine Pro',
- 'description' => 'Advanced social media scheduling and management.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://meowapps.com/plugin/social-engine/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://meowapps.com/social-engine-pricing/'
- )
- ),
- 'free_slug' => 'social-engine'
- ),
- 'taxopress' => array(
- 'name' => 'TaxoPress Pro',
- 'description' => 'Advanced taxonomy and tag management tools.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://taxopress.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://taxopress.com/pro/'
- )
- )
- ),
- 'tutor' => array(
- 'name' => 'Tutor LMS Pro',
- 'description' => 'Premium LMS features including certificate builder.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://www.themeum.com/product/tutor-lms/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://www.themeum.com/product/tutor-lms/#pricing'
- ),
- array(
- 'text' => 'Certificate Builder',
- 'url' => 'https://www.themeum.com/product/tutor-lms-certificate-builder/'
- ),
- array(
- 'text' => 'Course Preview',
- 'url' => 'https://www.themeum.com/product/tutor-lms-course-preview/'
- )
- ),
- 'free_slug' => 'tutor'
- ),
- 'wp-migrate' => array(
- 'name' => 'WP Migrate',
- 'description' => 'Professional WordPress migration and backup solution.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://deliciousbrains.com/wp-migrate-db-pro/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://deliciousbrains.com/wp-migrate-db-pro/pricing/'
- )
- )
- ),
- 'wp-social-ninja' => array(
- 'name' => 'WP Social Ninja Pro',
- 'description' => 'Advanced social media integration and management tools.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://wpsocialninja.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://wpsocialninja.com/price/'
- )
- ),
- 'free_slug' => 'wp-social-ninja'
- ),
- 'yellow-pencil' => array(
- 'name' => 'YellowPencil Pro',
- 'description' => 'Advanced visual CSS style editor and customization tool.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://yellowpencil.waspthemes.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://yellowpencil.waspthemes.com/pricing/'
- )
- ),
- 'free_slug' => 'yellow-pencil-visual-theme-customizer'
- ),
- 'fluent-boards' => array(
- 'name' => 'FluentBoards Pro',
- 'description' => 'Advanced dashboard and reporting solution for WordPress.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://fluentboards.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://fluentboards.com/pricing/'
- )
- ),
- 'free_slug' => 'fluent-boards'
- ),
- 'fluent-community' => array(
- 'name' => 'FluentCommunity Pro',
- 'description' => 'Advanced community and membership platform for WordPress.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://fluentcommunity.co/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://fluentcommunity.co/pricing/'
- )
- ),
- 'free_slug' => 'fluent-community'
- ),
- 'wp-sheet-editor' => array(
- 'name' => 'WP Sheet Editor',
- 'description' => 'Edit WordPress content in spreadsheet-like interface with bulk editing capabilities.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://wpsheeteditor.com/',
- 'primary' => true
- )
- ),
- 'free_slug' => 'wp-sheet-editor-bulk-spreadsheet-editor-for-posts-and-pages'
- ),
- 'masterstudy-lms' => array(
- 'name' => 'MasterStudy LMS Pro',
- 'description' => 'Complete learning management system for WordPress with courses, lessons, quizzes, and more.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://stylemixthemes.com/wordpress-lms-plugin/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://stylemixthemes.com/wordpress-lms-plugin/pricing/'
- )
- ),
- 'free_slug' => 'masterstudy-lms-learning-management-system'
- ),
- 'pretty-link' => array(
- 'name' => 'Pretty Links Pro',
- 'description' => 'Advanced link management, tracking, and marketing tools for WordPress.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://prettylinks.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://prettylinks.com/pricing/plans/'
- )
- ),
- 'free_slug' => 'pretty-link'
- ),
- 'kadence-starter-templates' => array(
- 'name' => 'AI Powered Starter Templates by Kadence WP',
- 'description' => 'Premium AI-powered starter templates for WordPress with advanced customization options.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://www.kadencewp.com/',
- 'primary' => true
- )
- ),
- 'free_slug' => 'kadence-starter-templates'
- ),
- 'bit-social' => array(
- 'name' => 'Bit Social Pro',
- 'description' => 'Premium social networking features for WordPress with advanced community building tools.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://bit-social.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://bit-social.com/#pricing'
- )
- ),
- 'free_slug' => 'bit-social'
- ),
- 'easy-video-reviews' => array(
- 'name' => 'Easy Video Reviews Pro',
- 'description' => 'Premium video review collection and display features for WordPress.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://wppool.dev/easy-video-reviews/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://wppool.dev/easy-video-reviews-pricing/'
- )
- ),
- 'free_slug' => 'easy-video-reviews'
- ),
- 'flying-press' => array(
- 'name' => 'Flying Press',
- 'description' => 'Advanced WordPress performance optimization and speed enhancement suite.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://flyingpress.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://flyingpress.com/pricing/'
- )
- ),
- 'free_slug' => ['flying-analytics', 'flying-pages', 'flying-scripts']
- ),
- 'translatepress' => array(
- 'name' => 'TranslatePress Pro',
- 'description' => 'Advanced WordPress translation plugin with premium features for multilingual websites.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://translatepress.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://translatepress.com/pricing/'
- )
- ),
- 'free_slug' => 'translatepress-multilingual'
- ),
- 'hreflang-manager' => array(
- 'name' => 'Hreflang Manager Pro',
- 'description' => 'Advanced hreflang tag management for multilingual and multi-regional WordPress websites.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://daext.com/hreflang-manager/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://daext.com/hreflang-manager/#pricing'
- )
- ),
- 'free_slug' => 'hreflang-manager-lite'
- ),
- 'automatorwp' => array(
- 'name' => 'AutomatorWP Pro',
- 'description' => 'Advanced WordPress automation toolkit with premium integrations and features.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://automatorwp.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://automatorwp.com/'
- ),
- array(
- 'text' => 'Integrations',
- 'url' => 'https://automatorwp.com/all-triggers-and-actions/'
- )
- ),
- 'free_slug' => 'automatorwp'
- ),
- 'bit-integrations' => array(
- 'name' => 'Bit Integrations Pro',
- 'description' => 'Advanced WordPress integration platform with premium connectors and automation features.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://bit-integrations.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://bit-integrations.com/#pricing'
- ),
- array(
- 'text' => 'Integrations',
- 'url' => 'https://bit-integrations.com/all-integrations/'
- )
- ),
- 'free_slug' => 'bit-integrations'
- ),
- 'bit-flows' => array(
- 'name' => 'Bit Flows Pro',
- 'description' => 'Advanced workflow automation platform for WordPress with premium features and integrations.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://bit-flows.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://bit-flows.com/pricing/'
- ),
- array(
- 'text' => 'Integrations',
- 'url' => 'https://bit-flows.com/integrations-list/'
- )
- ),
- 'free_slug' => 'bit-pi'
- ),
- 'yellow-pencil' => array(
- 'name' => 'Yellow Pencil Pro',
- 'description' => 'Advanced visual CSS style editor for WordPress with premium features.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://yellowpencil.waspthemes.com/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://codecanyon.net/item/yellow-pencil-visual-css-style-editor/11322180'
- )
- ),
- 'free_slug' => 'yellow-pencil-visual-theme-customizer'
- ),
- 'gotmls' => array(
- 'name' => 'Anti-Malware Pro',
- 'description' => 'Advanced WordPress malware scanner and security toolkit with premium features.',
- 'button_group' => array(
- array(
- 'text' => 'Home Page',
- 'url' => 'https://gotmls.net/',
- 'primary' => true
- ),
- array(
- 'text' => 'Pricing',
- 'url' => 'https://gotmls.net/donate/'
- )
- ),
- 'free_slug' => 'gotmls'
- )
- );
-}
\ No newline at end of file
diff --git a/admin/settings.php b/admin/settings.php
index a3ab719..8983d01 100644
--- a/admin/settings.php
+++ b/admin/settings.php
@@ -11,7 +11,7 @@
// Include data configuration files
require_once dirname(__FILE__) . '/data/tools.php';
require_once dirname(__FILE__) . '/data/hosting-providers.php';
-require_once dirname(__FILE__) . '/data/recommended-plugins.php';
+require_once dirname(__FILE__) . '/data/free-plugins.php';
// Include manager classes - each handles a specific plugin functionality area
require_once dirname(__FILE__) . '/includes/class-plugin-manager.php';
@@ -20,7 +20,7 @@ require_once dirname(__FILE__) . '/includes/class-settings-manager.php';
require_once dirname(__FILE__) . '/includes/class-tools-manager.php';
require_once dirname(__FILE__) . '/includes/class-theme-manager.php';
require_once dirname(__FILE__) . '/includes/class-hosting-manager.php';
-require_once dirname(__FILE__) . '/includes/class-recommended-plugins-manager.php';
+require_once dirname(__FILE__) . '/includes/class-free-plugins-manager.php';
require_once dirname(__FILE__) . '/includes/class-admin-manager.php';
/**
@@ -35,5 +35,5 @@ WP_Allstars_Settings_Manager::init();
WP_Allstars_Tools_Manager::init();
WP_Allstars_Theme_Manager::init();
WP_Allstars_Hosting_Manager::init();
-WP_Allstars_Recommended_Plugins_Manager::init();
+WP_Allstars_Free_Plugins_Manager::init();
WP_Allstars_Admin_Manager::init();
diff --git a/includes/class-wp-allstars-auto-upload.php b/includes/class-wp-allstars-auto-upload.php
index 4d7c290..8e37990 100644
--- a/includes/class-wp-allstars-auto-upload.php
+++ b/includes/class-wp-allstars-auto-upload.php
@@ -2,15 +2,20 @@
/**
* Auto Upload Images functionality
*
- * @package WP_Allstars
+ * @package WP_ALLSTARS
+ * @since 0.2.0
*/
+if (!defined('ABSPATH')) {
+ exit;
+}
+
class WP_Allstars_Auto_Upload {
/**
* Initialize the class
*/
public function __construct() {
- add_filter('content_save_pre', array($this, 'process_content'), 10, 1);
+ add_filter('content_save_pre', array($this, 'process_content'));
add_action('wp_allstars_image_upload_error', array($this, 'log_error'), 10, 2);
}
@@ -57,7 +62,8 @@ class WP_Allstars_Auto_Upload {
return str_replace($url, $local_url, $matches[0]);
}
} catch (Exception $e) {
- do_action('wp_allstars_image_upload_error', $url, $e->getMessage());
+ // Trigger error action for logging
+ do_action('wp_allstars_image_upload_error', esc_url($url), $e->getMessage());
}
return $matches[0];
@@ -80,11 +86,12 @@ class WP_Allstars_Auto_Upload {
*
* @param string $url External image URL
* @return string|false Local URL on success, false on failure
+ * @throws Exception If download or upload fails
*/
private function upload_image($url) {
- // Get file info
- $file_array = array();
- $file_array['name'] = basename($url);
+ $file_array = array(
+ 'name' => sanitize_file_name(basename($url))
+ );
// Download file to temp location
$file_array['tmp_name'] = download_url($url);
@@ -93,17 +100,18 @@ class WP_Allstars_Auto_Upload {
throw new Exception('Failed to download image: ' . $file_array['tmp_name']->get_error_message());
}
- // Check file type
+ // Check file type for security
$wp_filetype = wp_check_filetype_and_ext($file_array['tmp_name'], $file_array['name']);
if (!$wp_filetype['type']) {
unlink($file_array['tmp_name']);
throw new Exception('Invalid file type');
}
- // Upload the file
+ // Upload the file to media library
$attachment_id = media_handle_sideload($file_array, 0);
if (is_wp_error($attachment_id)) {
+ unlink($file_array['tmp_name']);
throw new Exception('Failed to upload image: ' . $attachment_id->get_error_message());
}
@@ -117,10 +125,12 @@ class WP_Allstars_Auto_Upload {
* @param string $error Error message
*/
public function log_error($url, $error) {
- error_log(sprintf(
- '[WP ALLSTARS] Auto Upload Images Error - URL: %s, Error: %s',
- $url,
- $error
- ));
+ if (WP_DEBUG) {
+ error_log(sprintf(
+ '[WP ALLSTARS] Auto Upload Images Error - URL: %s, Error: %s',
+ esc_url_raw($url),
+ sanitize_text_field($error)
+ ));
+ }
}
-}
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/wp-allstars-plugin.php b/wp-allstars-plugin.php
index 6545567..79c0bb8 100644
--- a/wp-allstars-plugin.php
+++ b/wp-allstars-plugin.php
@@ -22,14 +22,11 @@
* Requires PHP: 7.2
*/
-// If this file is called directly, abort.
if (!defined('WPINC')) {
- die;
+ exit;
}
-/**
- * Define plugin version from the file header
- */
+// Define plugin version from the file header
if (!function_exists('get_plugin_data')) {
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
}
@@ -39,14 +36,9 @@ define('WP_ALLSTARS_VERSION', $plugin_data['Version']);
/**
* Plugin activation hook
- *
- * Called when the plugin is activated.
- * Initialize plugin settings and defaults here.
*/
function wp_allstars_activate() {
- // Create initial plugin settings
- // Register cron jobs if needed
- // Initialize defaults
+ // Setup initial configuration when needed
}
register_activation_hook(__FILE__, 'wp_allstars_activate');
@@ -55,60 +47,41 @@ register_activation_hook(__FILE__, 'wp_allstars_activate');
*/
require_once plugin_dir_path(__FILE__) . 'includes/class-wp-allstars-auto-upload.php';
-/**
- * Load admin-specific components
- */
+// Load admin-specific components
if (is_admin()) {
- require_once plugin_dir_path(__FILE__) . 'admin/pro-plugins-config.php';
+ // Include manager classes
+ require_once plugin_dir_path(__FILE__) . 'admin/includes/class-admin-manager.php';
+ require_once plugin_dir_path(__FILE__) . 'admin/includes/class-settings-manager.php';
+ require_once plugin_dir_path(__FILE__) . 'admin/includes/class-theme-manager.php';
+ require_once plugin_dir_path(__FILE__) . 'admin/includes/class-workflow-manager.php';
+ require_once plugin_dir_path(__FILE__) . 'admin/includes/class-tools-manager.php';
+ require_once plugin_dir_path(__FILE__) . 'admin/includes/class-hosting-manager.php';
+ 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';
+
+ // Initialize the admin manager
+ add_action('plugins_loaded', array('WP_Allstars_Admin_Manager', 'init'));
+
+ // Legacy files (for backward compatibility)
+ require_once plugin_dir_path(__FILE__) . 'admin/data/pro-plugins.php';
require_once plugin_dir_path(__FILE__) . 'admin/settings.php';
}
/**
- * Enqueue admin assets
+ * Auto Upload feature initialization
*
- * Loads the CSS and JavaScript files for the admin interface.
- * Localizes the JavaScript with necessary data for AJAX operations.
+ * Initialize the Auto Upload feature when a user is logged in
*/
-function wp_allstars_admin_assets() {
- // Only load assets on plugin pages to avoid conflicts
- $screen = get_current_screen();
- if (!isset($screen->id) || strpos($screen->id, 'wp-allstars') === false) {
- return;
+function wp_allstars_init_auto_upload() {
+ // Only initialize for logged-in users
+ if (is_user_logged_in()) {
+ new WP_Allstars_Auto_Upload();
}
-
- // Enqueue CSS
- wp_enqueue_style(
- 'wp-allstars-admin',
- plugins_url('admin/css/wp-allstars-admin.css', __FILE__),
- [],
- WP_ALLSTARS_VERSION
- );
-
- // Enqueue WordPress updates script for theme/plugin installation
- wp_enqueue_script('updates');
-
- // Enqueue main admin script
- wp_enqueue_script(
- 'wp-allstars-admin',
- plugins_url('admin/js/wp-allstars-admin.js', __FILE__),
- ['jquery', 'updates'],
- WP_ALLSTARS_VERSION,
- true
- );
-
- // Localize script with AJAX and security data
- $ajax_data = [
- 'ajaxurl' => admin_url('admin-ajax.php'),
- 'adminUrl' => admin_url(),
- 'nonce' => wp_create_nonce('wp-allstars-nonce'),
- 'updateNonce' => wp_create_nonce('updates')
- ];
-
- wp_localize_script('wp-allstars-admin', 'wpAllstars', $ajax_data);
}
-add_action('admin_enqueue_scripts', 'wp_allstars_admin_assets');
+add_action('init', 'wp_allstars_init_auto_upload');
/**
* Initialize core plugin classes