editor-one-theme-builder-menu.php
57 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Elementor\App\AdminMenuItems; |
| 4 | |
| 5 | use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Interface; |
| 6 | use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_With_Custom_Url_Interface; |
| 7 | use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page; |
| 8 | use Elementor\Modules\EditorOne\Classes\Menu_Config; |
| 9 | use Elementor\Modules\EditorOne\Classes\Menu_Data_Provider; |
| 10 | use Elementor\App\App; |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | class Editor_One_Theme_Builder_Menu implements Menu_Item_Interface, Admin_Menu_Item_With_Page, Menu_Item_With_Custom_Url_Interface { |
| 17 | |
| 18 | public function get_capability(): string { |
| 19 | return 'manage_options'; |
| 20 | } |
| 21 | |
| 22 | public function get_parent_slug(): string { |
| 23 | return Menu_Config::ELEMENTOR_MENU_SLUG; |
| 24 | } |
| 25 | |
| 26 | public function is_visible(): bool { |
| 27 | return true; |
| 28 | } |
| 29 | |
| 30 | public function get_label(): string { |
| 31 | return esc_html__( 'Theme Builder', 'elementor' ); |
| 32 | } |
| 33 | |
| 34 | public function get_position(): int { |
| 35 | return 15; |
| 36 | } |
| 37 | |
| 38 | public function get_slug(): string { |
| 39 | return App::PAGE_ID; |
| 40 | } |
| 41 | |
| 42 | public function get_menu_url(): string { |
| 43 | return Menu_Data_Provider::instance()->get_theme_builder_url(); |
| 44 | } |
| 45 | |
| 46 | public function get_group_id(): string { |
| 47 | return Menu_Config::TEMPLATES_GROUP_ID; |
| 48 | } |
| 49 | |
| 50 | public function get_page_title(): string { |
| 51 | return esc_html__( 'Theme Builder', 'elementor' ); |
| 52 | } |
| 53 | |
| 54 | public function render(): void { |
| 55 | } |
| 56 | } |
| 57 |