export.php
2 years ago
feedback.php
11 years ago
help.php
12 years ago
manage.php
4 years ago
partners.php
1 year ago
settings.php
4 years ago
partners.php
92 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 | echo render_partner_discount_ui($this->get_partners()); |
| 31 | echo '</div>'; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Get partner discount data |
| 36 | * |
| 37 | * Returns an array of partner discount information including |
| 38 | * company details, discount codes, promotional links, and branding. |
| 39 | * |
| 40 | * @return array Array of partner discount data with the following structure: |
| 41 | * - name: Partner company name |
| 42 | * - desc: Description of the partner's product/service |
| 43 | * - code: Discount/coupon code |
| 44 | * - discount: Percentage or amount of discount |
| 45 | * - link: Promotional/checkout URL |
| 46 | * - image: Partner logo/brand image URL |
| 47 | */ |
| 48 | private function get_partners() { |
| 49 | return [ |
| 50 | [ |
| 51 | 'name' => 'AnalyticsWP', |
| 52 | '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.', |
| 53 | 'code' => 'wpallimport2024', |
| 54 | 'discount' => '20%', |
| 55 | 'link' => 'https://analyticswp.com/pricing/?wt_coupon=wpallimport2024', |
| 56 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/05/analyticswp-logo.svg' |
| 57 | ], |
| 58 | [ |
| 59 | 'name' => 'Breakdance', |
| 60 | '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.', |
| 61 | 'code' => 'WPAI', |
| 62 | 'discount' => '35%', |
| 63 | 'link' => 'https://breakdance.com/checkout?edd_action=add_to_cart&discount=WPAI&download_id=14&edd_options%5Bprice_id%5D=1', |
| 64 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2024/08/cropped-favicon.png' |
| 65 | ], |
| 66 | [ |
| 67 | 'name' => 'WPCodeBox', |
| 68 | '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.', |
| 69 | 'code' => 'KMWOV0WBKJ', |
| 70 | 'discount' => '20%', |
| 71 | 'link' => 'https://wpcodebox.com/', |
| 72 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2024/08/WPCodeBox-Logo-Small-Dark.png' |
| 73 | ], |
| 74 | [ |
| 75 | 'name' => 'Oxygen', |
| 76 | '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.', |
| 77 | 'code' => 'WPAI20', |
| 78 | 'discount' => '20%', |
| 79 | 'link' => 'https://oxygenbuilder.com/checkout/?edd_action=add_to_cart&download_id=4790638&discount=WPAI20', |
| 80 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/01/logo-minimal-black.png' |
| 81 | ], |
| 82 | [ |
| 83 | 'name' => 'Meta Box', |
| 84 | 'desc' => 'Meta Box is a WordPress custom fields plugin for flexible content management using custom post types and custom fields.', |
| 85 | 'code' => 'BREAKDANCE20', |
| 86 | 'discount' => '20%', |
| 87 | 'link' => 'https://metabox.io/pricing/', |
| 88 | 'image' => 'https://www.wpallimport.com/wp-content/uploads/2025/03/metabox-logo-square.png' |
| 89 | ] |
| 90 | ]; |
| 91 | } |
| 92 | } |