| 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 |
|