← All changes
|
modules/promotions/admin-menu-items/editor-one-popups-menu.php
+1
-44
4.3.1
→
3.35.0-dev2
View file →
| @@ -2,9 +2,8 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace Elementor\Modules\Promotions\AdminMenuItems; |
| 4 | 4 | |
| 5 | 5 | use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Interface; |
| 6 | -use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager; | |
| 7 | 6 | use Elementor\Modules\EditorOne\Classes\Menu_Config; |
| 8 | 7 | |
| 9 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | 9 | exit; |
| @@ -9,28 +8,10 @@ | ||
| 9 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | 9 | exit; |
| 11 | 10 | } |
| 12 | 11 | |
| 13 | -class Editor_One_Popups_Menu extends Base_Promotion_Item implements Menu_Item_Interface { | |
| 12 | +class Editor_One_Popups_Menu extends Popups_Promotion_Item implements Menu_Item_Interface { | |
| 14 | 13 | |
| 15 | - private array $promotion_data; | |
| 16 | - | |
| 17 | - public function __construct() { | |
| 18 | - $this->promotion_data = [ | |
| 19 | - 'title' => esc_html__( 'Get Popup Builder', 'elementor' ), | |
| 20 | - 'content' => esc_html__( | |
| 21 | - 'The Popup Builder lets you take advantage of all the amazing features in Elementor, so you can build beautiful & highly converting popups. Get Elementor Pro and start designing your popups today.', | |
| 22 | - 'elementor' | |
| 23 | - ), | |
| 24 | - 'action_button' => [ | |
| 25 | - 'text' => esc_html__( 'Upgrade Now', 'elementor' ), | |
| 26 | - 'url' => 'https://go.elementor.com/go-pro-popup-builder/', | |
| 27 | - ], | |
| 28 | - ]; | |
| 29 | - | |
| 30 | - $this->promotion_data = Filtered_Promotions_Manager::get_filtered_promotion_data( $this->promotion_data, 'elementor/templates/popup', 'action_button', 'url' ); | |
| 31 | - } | |
| 32 | - | |
| 33 | 14 | public function get_position(): int { |
| 34 | 15 | return 50; |
| 35 | 16 | } |
| 36 | 17 | |
| @@ -47,30 +28,6 @@ | ||
| 47 | 28 | } |
| 48 | 29 | |
| 49 | 30 | public function get_group_id(): string { |
| 50 | 31 | return Menu_Config::TEMPLATES_GROUP_ID; |
| 51 | - } | |
| 52 | - | |
| 53 | - public function get_name(): string { | |
| 54 | - return 'popups'; | |
| 55 | - } | |
| 56 | - | |
| 57 | - public function get_page_title() { | |
| 58 | - return esc_html__( 'Popups', 'elementor' ); | |
| 59 | - } | |
| 60 | - | |
| 61 | - public function get_promotion_title() { | |
| 62 | - return $this->promotion_data['title']; | |
| 63 | - } | |
| 64 | - | |
| 65 | - public function get_promotion_description() { | |
| 66 | - return $this->promotion_data['content']; | |
| 67 | - } | |
| 68 | - | |
| 69 | - public function get_cta_url() { | |
| 70 | - return $this->promotion_data['action_button']['url']; | |
| 71 | - } | |
| 72 | - | |
| 73 | - public function get_cta_text() { | |
| 74 | - return $this->promotion_data['action_button']['text']; | |
| 75 | 32 | } |
| 76 | 33 | } |