← All changes
|
modules/promotions/admin-menu-items/go-pro-promotion-item.php
+3
-22
4.2.0-dev2
→
3.19.0-beta5
View file →
| @@ -2,23 +2,17 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace Elementor\Modules\Promotions\AdminMenuItems; |
| 4 | 4 | |
| 5 | 5 | use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page; |
| 6 | -use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager; | |
| 7 | 6 | use Elementor\Settings; |
| 8 | -use Elementor\Utils; | |
| 9 | 7 | |
| 10 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | - exit; // Exit if accessed directly. | |
| 9 | + exit; // Exit if accessed directly | |
| 12 | 10 | } |
| 13 | 11 | |
| 14 | 12 | class Go_Pro_Promotion_Item implements Admin_Menu_Item_With_Page { |
| 15 | - const URL = 'https://go.elementor.com/go-pro-upgrade-one-wp-menu/'; | |
| 13 | + const URL = 'https://go.elementor.com/pro-admin-menu/'; | |
| 16 | 14 | |
| 17 | - public function get_name() { | |
| 18 | - return 'admin_menu_promo'; | |
| 19 | - } | |
| 20 | - | |
| 21 | 15 | public function is_visible() { |
| 22 | 16 | return true; |
| 23 | 17 | } |
| 24 | 18 | |
| @@ -26,15 +20,9 @@ | ||
| 26 | 20 | return Settings::PAGE_ID; |
| 27 | 21 | } |
| 28 | 22 | |
| 29 | 23 | public function get_label() { |
| 30 | - $upgrade_text = esc_html__( 'Upgrade', 'elementor' ); | |
| 31 | - | |
| 32 | - if ( Utils::is_sale_time() ) { | |
| 33 | - $upgrade_text = esc_html__( 'Upgrade Sale Now', 'elementor' ); | |
| 34 | - } | |
| 35 | - | |
| 36 | - return apply_filters( 'elementor/admin_menu/custom_promotion', [ 'upgrade_text' => $upgrade_text ] )['upgrade_text'] ?? $upgrade_text; | |
| 24 | + return esc_html__( 'Upgrade', 'elementor' ); | |
| 37 | 25 | } |
| 38 | 26 | |
| 39 | 27 | public function get_page_title() { |
| 40 | 28 | return ''; |
| @@ -41,15 +29,8 @@ | ||
| 41 | 29 | } |
| 42 | 30 | |
| 43 | 31 | public function get_capability() { |
| 44 | 32 | return 'manage_options'; |
| 45 | - } | |
| 46 | - | |
| 47 | - public static function get_url() { | |
| 48 | - $url = self::URL; | |
| 49 | - $filtered_url = apply_filters( 'elementor/admin_menu/custom_promotion', [ 'upgrade_url' => $url ] )['upgrade_url'] ?? ''; | |
| 50 | - $promotion_data = Filtered_Promotions_Manager::get_filtered_promotion_data( [ 'upgrade_url' => $filtered_url ], 'elementor/admin_menu/custom_promotion', 'upgrade_url' ); | |
| 51 | - return $promotion_data ['upgrade_url']; | |
| 52 | 33 | } |
| 53 | 34 | |
| 54 | 35 | public function render() { |
| 55 | 36 | // Redirects from the module on `admin_init`. |