first commit
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
namespace Elementor\Includes\Settings\AdminMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page;
|
||||
use Elementor\Settings;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Admin_Menu_Item implements Admin_Menu_Item_With_Page {
|
||||
private $settings_page;
|
||||
|
||||
public function __construct( Settings $settings_page ) {
|
||||
$this->settings_page = $settings_page;
|
||||
}
|
||||
|
||||
public function is_visible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get_parent_slug() {
|
||||
return $this->settings_page->home_module->is_experiment_active() ? 'elementor' : null;
|
||||
}
|
||||
|
||||
public function get_label() {
|
||||
return $this->settings_page->home_module->is_experiment_active()
|
||||
? esc_html__( 'Settings', 'elementor' )
|
||||
: esc_html__( 'Elementor', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_page_title() {
|
||||
return $this->get_label();
|
||||
}
|
||||
|
||||
public function get_position() {
|
||||
return '58.5';
|
||||
}
|
||||
|
||||
public function get_capability() {
|
||||
return 'manage_options';
|
||||
}
|
||||
|
||||
public function render() {
|
||||
$this->settings_page->display_settings_page();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Elementor\Includes\Settings\AdminMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Third_Level_Interface;
|
||||
use Elementor\Modules\EditorOne\Classes\Menu_Config;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Editor_One_Home_Menu implements Menu_Item_Third_Level_Interface {
|
||||
|
||||
public function get_capability(): string {
|
||||
return 'manage_options';
|
||||
}
|
||||
|
||||
public function get_parent_slug(): string {
|
||||
return Menu_Config::ELEMENTOR_MENU_SLUG;
|
||||
}
|
||||
|
||||
public function is_visible(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get_group_id(): string {
|
||||
return Menu_Config::EDITOR_GROUP_ID;
|
||||
}
|
||||
|
||||
public function get_label(): string {
|
||||
return esc_html__( 'Quick start', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_position(): int {
|
||||
return 10;
|
||||
}
|
||||
|
||||
public function get_slug(): string {
|
||||
return 'elementor';
|
||||
}
|
||||
|
||||
public function get_icon(): string {
|
||||
return 'home';
|
||||
}
|
||||
|
||||
public function has_children(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function get_page_title() {
|
||||
return $this->get_label();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace Elementor\Includes\Settings\AdminMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page;
|
||||
use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Third_Level_Interface;
|
||||
use Elementor\Modules\EditorOne\Classes\Menu_Config;
|
||||
use Elementor\Plugin;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Editor_One_Settings_Menu implements Menu_Item_Third_Level_Interface, Admin_Menu_Item_With_Page {
|
||||
|
||||
public function get_capability(): string {
|
||||
return 'manage_options';
|
||||
}
|
||||
|
||||
public function get_parent_slug(): string {
|
||||
return Menu_Config::ELEMENTOR_MENU_SLUG;
|
||||
}
|
||||
|
||||
public function is_visible(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get_group_id(): string {
|
||||
return Menu_Config::EDITOR_GROUP_ID;
|
||||
}
|
||||
|
||||
public function get_label(): string {
|
||||
return esc_html__( 'Settings', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_position(): int {
|
||||
return 20;
|
||||
}
|
||||
|
||||
public function get_slug(): string {
|
||||
return 'elementor-settings';
|
||||
}
|
||||
|
||||
public function get_icon(): string {
|
||||
return 'settings';
|
||||
}
|
||||
|
||||
public function has_children(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function get_page_title() {
|
||||
return $this->get_label();
|
||||
}
|
||||
|
||||
public function render() {
|
||||
Plugin::$instance->settings->display_settings_page();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace Elementor\Includes\Settings\AdminMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page;
|
||||
use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Third_Level_Interface;
|
||||
use Elementor\Modules\EditorOne\Classes\Menu_Config;
|
||||
use Elementor\Plugin;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Editor_One_Tools_Menu implements Menu_Item_Third_Level_Interface, Admin_Menu_Item_With_Page {
|
||||
|
||||
public function get_capability(): string {
|
||||
return 'manage_options';
|
||||
}
|
||||
|
||||
public function get_parent_slug(): string {
|
||||
return Menu_Config::ELEMENTOR_MENU_SLUG;
|
||||
}
|
||||
|
||||
public function is_visible(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get_group_id(): string {
|
||||
return Menu_Config::EDITOR_GROUP_ID;
|
||||
}
|
||||
|
||||
public function get_label(): string {
|
||||
return esc_html__( 'Tools', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_position(): int {
|
||||
return 30;
|
||||
}
|
||||
|
||||
public function get_slug(): string {
|
||||
return 'elementor-tools';
|
||||
}
|
||||
|
||||
public function get_icon(): string {
|
||||
return 'tool';
|
||||
}
|
||||
|
||||
public function has_children(): bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function get_page_title() {
|
||||
return $this->get_label();
|
||||
}
|
||||
|
||||
public function render() {
|
||||
Plugin::$instance->tools->display_settings_page();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace Elementor\Includes\Settings\AdminMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page;
|
||||
use Elementor\Settings;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Get_Help_Menu_Item implements Admin_Menu_Item_With_Page {
|
||||
const URL = 'https://go.elementor.com/docs-admin-menu/';
|
||||
|
||||
public function is_visible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get_parent_slug() {
|
||||
return Settings::PAGE_ID;
|
||||
}
|
||||
|
||||
public function get_label() {
|
||||
return esc_html__( 'Get Help', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_page_title() {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function get_capability() {
|
||||
return 'manage_options';
|
||||
}
|
||||
|
||||
public function render() {
|
||||
// Redirects from the settings page on `admin_init`.
|
||||
die;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
namespace Elementor\Includes\Settings\AdminMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page;
|
||||
use Elementor\Settings;
|
||||
use Elementor\Tools;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Tools_Menu_Item implements Admin_Menu_Item_With_Page {
|
||||
|
||||
private $tools_page;
|
||||
|
||||
public function __construct( Tools $tools_page ) {
|
||||
$this->tools_page = $tools_page;
|
||||
}
|
||||
|
||||
public function is_visible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get_parent_slug() {
|
||||
return Settings::PAGE_ID;
|
||||
}
|
||||
|
||||
public function get_label() {
|
||||
return esc_html__( 'Tools', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_page_title() {
|
||||
return esc_html__( 'Tools', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_capability() {
|
||||
return Tools::CAPABILITY;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
$this->tools_page->display_settings_page();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user