export.php
3 weeks ago
feedback.php
10 years ago
help.php
12 years ago
manage.php
3 weeks ago
partners.php
3 weeks ago
settings.php
3 weeks ago
partners.php
175 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Partner Discounts page |
| 4 | * |
| 5 | * Handles the display and management of partner discount offers |
| 6 | * within the admin interface. |
| 7 | * |
| 8 | * @author Prabch <prabch.soflyy@gmail.com> |
| 9 | */ |
| 10 | |
| 11 | // Load the Partner Discount SDK for rendering discount UI components |
| 12 | require_once plugin_dir_path(__FILE__) . '../../classes/partner-discount-sdk/partner-discount-sdk.php'; |
| 13 | |
| 14 | class PMXE_Admin_Partners extends PMXE_Controller_Admin { |
| 15 | |
| 16 | public function init() { |
| 17 | parent::init(); |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Display the partner discounts page |
| 22 | * |
| 23 | * Renders the main partner discounts interface showing all available |
| 24 | * partner offers with discount codes and promotional information. |
| 25 | * |
| 26 | * @return void |
| 27 | */ |
| 28 | public function index() { |
| 29 | echo '<div class="wrap">'; |
| 30 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- render_partner_discount_ui returns escaped HTML built from a hardcoded partners array |
| 31 | echo render_partner_discount_ui($this->get_partners(), [], $this->get_filters()); |
| 32 | echo '</div>'; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Get filter categories |
| 37 | * |
| 38 | * Returns an array of predefined filter categories used to |
| 39 | * group partners. |
| 40 | * Each filter contains a display name and a corresponding slug identifier. |
| 41 | * |
| 42 | * @return array Array of filter data with the following structure: |
| 43 | * - name: Display name of the filter category |
| 44 | * - slug: URL-friendly identifier for the filter |
| 45 | */ |
| 46 | private function get_filters() { |
| 47 | return [ |
| 48 | [ |
| 49 | 'name' => 'Analytics', |
| 50 | 'slug' => 'analytics' |
| 51 | ], |
| 52 | [ |
| 53 | 'name' => 'Builders', |
| 54 | 'slug' => 'builder' |
| 55 | ], |
| 56 | [ |
| 57 | 'name' => 'Dev Tools', |
| 58 | 'slug' => 'dev-tools' |
| 59 | ], |
| 60 | [ |
| 61 | 'name' => 'Marketing & Growth', |
| 62 | 'slug' => 'marketing-and-growth' |
| 63 | ] |
| 64 | ]; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Get partner discount data |
| 69 | * |
| 70 | * Returns an array of partner discount information including |
| 71 | * company details, discount codes, promotional links, and branding. |
| 72 | * |
| 73 | * @return array Array of partner discount data with the following structure: |
| 74 | * - name: Partner company name |
| 75 | * - desc: Description of the partner's product/service |
| 76 | * - code: Discount/coupon code |
| 77 | * - discount: Percentage or amount of discount |
| 78 | * - link: Promotional/checkout URL |
| 79 | * - image: Partner logo/brand image URL |
| 80 | */ |
| 81 | private function get_partners() { |
| 82 | return [ |
| 83 | [ |
| 84 | 'name' => 'AnalyticsWP', |
| 85 | 'desc' => 'This privacy-compliant WordPress analytics plugin gives detailed insights into user behavior beyond what traditional tools can provide, and has a dedicated integration for WooCommerce.', |
| 86 | 'code' => 'wpallimport2024', |
| 87 | 'discount' => '20%', |
| 88 | 'link' => 'https://analyticswp.com/pricing/?wt_coupon=wpallimport2024', |
| 89 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/05/analyticswp-logo.svg', |
| 90 | 'category' => 'analytics', |
| 91 | ], |
| 92 | [ |
| 93 | 'name' => 'WPCodeBox', |
| 94 | 'desc' => 'Save code from inside Breakdance to WPCodebox in one click. Use cloud snippets to share across your sites and explore the Code Snippet Repository full of tested snippets.', |
| 95 | 'code' => 'KMWOV0WBKJ', |
| 96 | 'discount' => '20%', |
| 97 | 'link' => 'https://wpcodebox.com/', |
| 98 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2024/08/WPCodeBox-Logo-Small-Dark.png', |
| 99 | 'category' => 'dev-tools', |
| 100 | ], |
| 101 | [ |
| 102 | 'name' => 'Solid Affiliate', |
| 103 | 'desc' => 'The all-in-one affiliate solution for high-performing WooCommerce stores. Trusted by 10,000+ store owners, it’s the professional way to scale referrals and rankings, all from your WordPress dashboard.', |
| 104 | 'code' => 'BREAKDANCEPARTNER', |
| 105 | 'discount' => '15%', |
| 106 | 'link' => 'https://solidaffiliate.com/pricing?_gl=1*1v5voof*_gcl_au*OTM3MDQ1Mjk3LjE3NTU3NzI2MTYuMTc2ODM2MDE2LjE3NjExMzI3MjguMTc2MTEzMjcyNw..', |
| 107 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/08/solid-affiliate.webp', |
| 108 | 'category' => 'marketing-and-growth', |
| 109 | ], |
| 110 | [ |
| 111 | 'name' => 'WP Debug Toolkit', |
| 112 | 'desc' => 'The best WordPress error log viewer for WordPress. Easily centralize, filter, and understand your WordPress errors without touching FTP or SSH.', |
| 113 | 'code' => 'BD20', |
| 114 | 'discount' => '20%', |
| 115 | 'link' => 'https://wpdebugtoolkit.com/', |
| 116 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/10/wpdebugtoolkit.jpg', |
| 117 | 'category' => 'dev-tools', |
| 118 | ], |
| 119 | [ |
| 120 | 'name' => 'Breakdance', |
| 121 | 'desc' => 'Created by the same team behind WP All Import, Breakdance is a modern visual site builder for WordPress that combines professional power with drag & drop ease of use.', |
| 122 | 'code' => 'WPAI', |
| 123 | 'discount' => '35%', |
| 124 | 'link' => 'https://breakdance.com/checkout?edd_action=add_to_cart&discount=WPAI&download_id=14&edd_options%5Bprice_id%5D=1', |
| 125 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2024/08/cropped-favicon.png', |
| 126 | 'category' => 'builder', |
| 127 | ], |
| 128 | [ |
| 129 | 'name' => 'Oxygen', |
| 130 | 'desc' => 'Created by the same team behind WP All Import, Oxygen is the go-to WordPress website builder for highly advanced users & developers who love to code.', |
| 131 | 'code' => 'WPAI20', |
| 132 | 'discount' => '20%', |
| 133 | 'link' => 'https://oxygenbuilder.com/checkout/?edd_action=add_to_cart&download_id=4790638&discount=WPAI20', |
| 134 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/01/logo-minimal-black.png', |
| 135 | 'category' => 'builder', |
| 136 | ], |
| 137 | [ |
| 138 | 'name' => 'Meta Box', |
| 139 | 'desc' => 'Meta Box is a WordPress custom fields plugin for flexible content management using custom post types and custom fields.', |
| 140 | 'code' => 'BREAKDANCE20', |
| 141 | 'discount' => '20%', |
| 142 | 'link' => 'https://metabox.io/pricing/', |
| 143 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/03/metabox-logo-square.png', |
| 144 | 'category' => 'dev-tools', |
| 145 | ], |
| 146 | [ |
| 147 | 'name' => 'Elevated Discount Rules', |
| 148 | 'desc' => 'Create flexible and powerful discount rules for your WooCommerce Store. Boost your sales with bulk or store wide discounts.', |
| 149 | 'code' => 'All Extensions for Life for $199', |
| 150 | 'discount' => 'Special Launch Price', |
| 151 | 'link' => 'https://elevatedextensions.com/extensions/elevated-discount-rules/', |
| 152 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/10/elex_discount_i.svg', |
| 153 | 'category' => 'marketing-and-growth', |
| 154 | ], |
| 155 | [ |
| 156 | 'name' => 'Elevated Instagram Feed', |
| 157 | 'desc' => 'Blow your visitors away showing a lightweight, fully customizable Instagram feed on any part of your site without any technical knowledge.', |
| 158 | 'code' => 'All Extensions for Life for $199', |
| 159 | 'discount' => 'Special Launch Price', |
| 160 | 'link' => 'https://elevatedextensions.com/extensions/elevated-instagram-feed/', |
| 161 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/10/elex_instagram_i.svg', |
| 162 | 'category' => 'marketing-and-growth', |
| 163 | ], |
| 164 | [ |
| 165 | 'name' => 'Elevated AJAX Search', |
| 166 | 'desc' => 'Blazing fast, high-performing WooCommerce live search for your store. A powerful search engine that shows instant results and offers your customers a great shopping experience.', |
| 167 | 'code' => 'All Extensions for Life for $199', |
| 168 | 'discount' => 'Special Launch Price', |
| 169 | 'link' => 'https://elevatedextensions.com/extensions/elevated-ajax-search/', |
| 170 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/10/elex_search_i.svg', |
| 171 | 'category' => 'marketing-and-growth', |
| 172 | ], |
| 173 | ]; |
| 174 | } |
| 175 | } |