first commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Elementor\Modules\FloatingButtons\AdminMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Interface;
|
||||
use Elementor\Modules\EditorOne\Classes\Menu_Config;
|
||||
use Elementor\Modules\FloatingButtons\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Editor_One_Floating_Elements_Menu implements Menu_Item_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_label(): string {
|
||||
return esc_html__( 'Floating Elements', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_position(): int {
|
||||
return 40;
|
||||
}
|
||||
|
||||
public function get_slug(): string {
|
||||
return Module::ADMIN_PAGE_SLUG_CONTACT;
|
||||
}
|
||||
|
||||
public function get_group_id(): string {
|
||||
return Menu_Config::TEMPLATES_GROUP_ID;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Elementor\Modules\FloatingButtons\AdminMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Floating_Buttons_Empty_View_Menu_Item extends Floating_Buttons_Menu_Item implements Admin_Menu_Item_With_Page {
|
||||
|
||||
private $render_callback;
|
||||
|
||||
public function __construct( callable $render_callback ) {
|
||||
$this->render_callback = $render_callback;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
( $this->render_callback )();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
namespace Elementor\Modules\FloatingButtons\AdminMenuItems;
|
||||
|
||||
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item;
|
||||
use Elementor\TemplateLibrary\Source_Local;
|
||||
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_Has_Position;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Floating_Buttons_Menu_Item implements Admin_Menu_Item, Admin_Menu_Item_Has_Position {
|
||||
|
||||
public function is_visible() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get_parent_slug() {
|
||||
return Source_Local::ADMIN_MENU_SLUG;
|
||||
}
|
||||
|
||||
public function get_label() {
|
||||
return esc_html__( 'Floating Elements', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_page_title() {
|
||||
return esc_html__( 'Floating Elements', 'elementor' );
|
||||
}
|
||||
|
||||
public function get_capability() {
|
||||
return 'manage_options';
|
||||
}
|
||||
|
||||
public function get_position() {
|
||||
return 40;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user