first commit
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace ElementorPro\License\EditorOneMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Interface;
|
||||
use Elementor\Modules\EditorOne\Classes\Menu_Config;
|
||||
use ElementorPro\License\Admin;
|
||||
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page;
|
||||
use ElementorPro\Plugin;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Editor_One_License_Menu_Item implements Menu_Item_Interface, Admin_Menu_Item_With_Page {
|
||||
|
||||
public function get_page_title() : string {
|
||||
return esc_html__( 'License', 'elementor-pro' );
|
||||
}
|
||||
|
||||
public function get_capability() : string {
|
||||
return 'manage_options';
|
||||
}
|
||||
|
||||
public function get_label() : string {
|
||||
return esc_html__( 'License', 'elementor-pro' );
|
||||
}
|
||||
|
||||
public function get_parent_slug() : string {
|
||||
return Menu_Config::ELEMENTOR_MENU_SLUG;
|
||||
}
|
||||
|
||||
public function is_visible() : bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get_position() : int {
|
||||
return 60;
|
||||
}
|
||||
|
||||
public function get_slug() : string {
|
||||
return Admin::PAGE_ID;
|
||||
}
|
||||
|
||||
public function get_group_id() : string {
|
||||
return Menu_Config::SYSTEM_GROUP_ID;
|
||||
}
|
||||
|
||||
public function render() : void {
|
||||
Plugin::instance()->license_admin->display_page();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace ElementorPro\License\EditorOneMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Interface;
|
||||
use Elementor\Modules\EditorOne\Classes\Menu_Config;
|
||||
use ElementorPro\License\API;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Editor_One_Renew_Menu_Item implements Menu_Item_Interface {
|
||||
|
||||
const RENEW_URL = 'https://go.elementor.com/wp-menu-renew/';
|
||||
|
||||
public function get_capability() : string {
|
||||
return 'manage_options';
|
||||
}
|
||||
|
||||
public function get_label() : string {
|
||||
return esc_html__( 'Renew Now', 'elementor-pro' );
|
||||
}
|
||||
|
||||
public function get_parent_slug() : string {
|
||||
return Menu_Config::ELEMENTOR_MENU_SLUG;
|
||||
}
|
||||
|
||||
public function is_visible() : bool {
|
||||
return API::is_license_expired();
|
||||
}
|
||||
|
||||
public function get_position() : int {
|
||||
return 61;
|
||||
}
|
||||
|
||||
public function get_slug() : string {
|
||||
return self::RENEW_URL;
|
||||
}
|
||||
|
||||
public function get_group_id(): string {
|
||||
return Menu_Config::SYSTEM_GROUP_ID;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace ElementorPro\License\EditorOneMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Interface;
|
||||
use Elementor\Modules\EditorOne\Classes\Menu_Config;
|
||||
use ElementorPro\Core\Utils as Pro_Utils;
|
||||
use ElementorPro\License\API;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Editor_One_Upgrade_Menu_Item implements Menu_Item_Interface {
|
||||
|
||||
const UPGRADE_URL = 'https://go.elementor.com/go-pro-advanced-elementor-menu/';
|
||||
|
||||
public function get_capability() : string {
|
||||
return 'manage_options';
|
||||
}
|
||||
|
||||
public function get_label() : string {
|
||||
if ( Pro_Utils::is_sale_time() ) {
|
||||
return esc_html__( 'Discounted Upgrades', 'elementor-pro' );
|
||||
}
|
||||
|
||||
return esc_html__( 'Unlock More Features', 'elementor-pro' );
|
||||
}
|
||||
|
||||
public function get_parent_slug() : string {
|
||||
return Menu_Config::ELEMENTOR_MENU_SLUG;
|
||||
}
|
||||
|
||||
public function is_visible() : bool {
|
||||
return ! API::is_license_expired() && API::is_need_to_show_upgrade_promotion();
|
||||
}
|
||||
|
||||
public function get_position() : int {
|
||||
return 62;
|
||||
}
|
||||
|
||||
public function get_slug() : string {
|
||||
return self::UPGRADE_URL;
|
||||
}
|
||||
|
||||
public function get_group_id(): string {
|
||||
return Menu_Config::SYSTEM_GROUP_ID;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user