PluginProbe
Elementor Website Builder – more than just a page builder / 3.17.2
Elementor Website Builder – more than just a page builder v3.17.2
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 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
elementor / modules / promotions / admin-menu-items / base-promotion-item.php

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

53 lines 1.2 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\Modules\Promotions\AdminMenuItems\Interfaces\Promotion_Menu_Item;
6 use Elementor\Settings;
7 use Elementor\Utils;
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly
11 }
12
13 abstract class Base_Promotion_Item implements Promotion_Menu_Item {
14
15 public function is_visible() {
16 return true;
17 }
18
19 public function get_parent_slug() {
20 return Settings::PAGE_ID;
21 }
22
23 public function get_capability() {
24 return 'manage_options';
25 }
26
27 public function get_cta_text() {
28 return esc_html__( 'Upgrade Now', 'elementor' );
29 }
30
31 public function get_image_url() {
32 return ELEMENTOR_ASSETS_URL . 'images/go-pro-wp-dashboard.svg';
33 }
34
35 public function render() {
36 ?>
37 <div class="wrap">
38 <div class="elementor-blank_state">
39 <img src="<?php echo esc_url( $this->get_image_url() ); ?>" loading="lazy" />
40
41 <h3><?php Utils::print_unescaped_internal_string( $this->get_promotion_title() ); ?></h3>
42
43 <p><?php $this->render_promotion_description(); ?></p>
44
45 <a class="elementor-button go-pro" href="<?php echo esc_url( $this->get_cta_url() ); ?>">
46 <?php Utils::print_unescaped_internal_string( $this->get_cta_text() ); ?>
47 </a>
48 </div>
49 </div>
50 <?php
51 }
52 }
53