| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\Mcp\AdminMenuItems; |
| 4 |
|
| 5 |
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page; |
| 6 |
use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Third_Level_Interface; |
| 7 |
use Elementor\MCP\Composer\Admin\Page; |
| 8 |
use Elementor\Modules\EditorOne\Classes\Menu_Config; |
| 9 |
use Elementor\Modules\Mcp\Module; |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
class Editor_One_Mcp_Menu implements Menu_Item_Third_Level_Interface, Admin_Menu_Item_With_Page { |
| 16 |
|
| 17 |
const REGISTER_PRIORITY_AFTER_SUBMISSIONS = 11; |
| 18 |
|
| 19 |
private Page $page; |
| 20 |
|
| 21 |
public function __construct() { |
| 22 |
$this->page = Page::instance(); |
| 23 |
} |
| 24 |
|
| 25 |
public function get_capability(): string { |
| 26 |
return $this->page->get_capability(); |
| 27 |
} |
| 28 |
|
| 29 |
public function get_parent_slug(): string { |
| 30 |
return Menu_Config::ELEMENTOR_HOME_MENU_SLUG; |
| 31 |
} |
| 32 |
|
| 33 |
public function is_visible(): bool { |
| 34 |
return true; |
| 35 |
} |
| 36 |
|
| 37 |
public function get_group_id(): string { |
| 38 |
return Menu_Config::EDITOR_GROUP_ID; |
| 39 |
} |
| 40 |
|
| 41 |
public function get_label(): string { |
| 42 |
return $this->page->get_label(); |
| 43 |
} |
| 44 |
|
| 45 |
public function get_position(): int { |
| 46 |
return 25; |
| 47 |
} |
| 48 |
|
| 49 |
public function get_slug(): string { |
| 50 |
return $this->page->get_slug(); |
| 51 |
} |
| 52 |
|
| 53 |
public function get_icon(): string { |
| 54 |
return 'extension'; |
| 55 |
} |
| 56 |
|
| 57 |
public function has_children(): bool { |
| 58 |
return false; |
| 59 |
} |
| 60 |
|
| 61 |
public function get_page_title() { |
| 62 |
return $this->page->get_page_title(); |
| 63 |
} |
| 64 |
|
| 65 |
public function render() { |
| 66 |
Module::instance()->enqueue_analytics_registrar(); |
| 67 |
$this->page->render(); |
| 68 |
} |
| 69 |
} |
| 70 |
|