PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0
Elementor Website Builder – more than just a page builder v4.3.0
4.3.1 4.3.0 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 All 454 releases
elementor / app / modules / kit-library / admin-menu-items / editor-one-website-templates-menu.php

editor-one-website-templates-menu.php in Elementor Website Builder – more than just a page builder 4.3.0, at app/modules/kit-library/admin-menu-items/editor-one-website-templates-menu.php

56 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Elementor\App\Modules\KitLibrary\AdminMenuItems;
4
5 use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Interface;
6 use Elementor\Modules\EditorOne\Classes\Menu_Config;
7 use Elementor\Plugin;
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 class Editor_One_Website_Templates_Menu implements Menu_Item_Interface {
14
15 public function get_capability(): string {
16 return 'manage_options';
17 }
18
19 public function get_parent_slug(): string {
20 return Menu_Config::ELEMENTOR_MENU_SLUG;
21 }
22
23 public function is_visible(): bool {
24 return true;
25 }
26
27 public function get_label(): string {
28 return esc_html__( 'Website Templates', 'elementor' );
29 }
30
31 public function get_position(): int {
32 return 30;
33 }
34
35 public function get_slug(): string {
36 $app = Plugin::$instance->app;
37
38 if ( $app ) {
39 $return_to = esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ?? '' ) );
40 return add_query_arg(
41 [
42 'return_to' => $return_to,
43 'source' => 'wp_db_templates_menu',
44 ],
45 $app->get_base_url()
46 ) . '#/kit-library';
47 }
48
49 return 'elementor-app#/kit-library';
50 }
51
52 public function get_group_id(): string {
53 return Menu_Config::TEMPLATES_GROUP_ID;
54 }
55 }
56