PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.3
Elementor Website Builder – more than just a page builder v3.25.3
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
elementor / modules / promotions / admin-menu-items / popups-promotion-item.php

popups-promotion-item.php in Elementor Website Builder – more than just a page builder 3.25.3, at modules/promotions/admin-menu-items/popups-promotion-item.php

73 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\Modules\Promotions\AdminMenuItems;
4
5 use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager;
6 use Elementor\TemplateLibrary\Source_Local;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly
10 }
11
12 class Popups_Promotion_Item extends Base_Promotion_Item {
13
14 private array $promotion_data;
15
16 public function __construct() {
17 $this->promotion_data = [
18 'title' => esc_html__( 'Get Popup Builder', 'elementor' ),
19 'content' => esc_html__(
20 '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.',
21 'elementor'
22 ),
23 'action_button' => [
24 'text' => esc_html__( 'Upgrade Now', 'elementor' ),
25 'url' => 'https://go.elementor.com/go-pro-popup-builder/',
26 ],
27 ];
28
29 $this->promotion_data = Filtered_Promotions_Manager::get_filtered_promotion_data( $this->promotion_data, 'elementor/templates/popup', 'action_button', 'url' );
30 }
31
32 public function get_parent_slug() {
33 return Source_Local::ADMIN_MENU_SLUG;
34 }
35
36 public function get_name() {
37 return 'popups';
38 }
39
40
41 public function get_label() {
42 return esc_html__( 'Popups', 'elementor' );
43 }
44
45 public function get_page_title() {
46 return esc_html__( 'Popups', 'elementor' );
47 }
48
49 public function get_promotion_title() {
50 return $this->promotion_data['title'];
51 }
52
53 public function get_promotion_description() {
54 return $this->promotion_data['content'];
55 }
56
57 /**
58 * @deprecated use get_promotion_description instead
59 * @return void
60 */
61 public function render_promotion_description() {
62 echo $this->get_promotion_description(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
63 }
64
65 public function get_cta_url() {
66 return $this->promotion_data['action_button']['url'];
67 }
68
69 public function get_cta_text() {
70 return $this->promotion_data['action_button']['text'];
71 }
72 }
73