first commit

This commit is contained in:
Roman Pyrih
2026-03-10 09:50:10 +01:00
commit 64c4a90405
7289 changed files with 2645777 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
<?php
namespace Elementor\Modules\LandingPages\AdminMenuItems;
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page;
use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Interface;
use Elementor\Modules\EditorOne\Classes\Menu_Config;
use Elementor\Modules\LandingPages\Module;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Editor_One_Landing_Pages_Menu implements Menu_Item_Interface, Admin_Menu_Item_With_Page {
private $module;
private $menu_item;
public function __construct( Module $module ) {
$this->module = $module;
$this->initialize_menu_item();
}
private function initialize_menu_item() {
$menu_args = $this->module->get_menu_args();
$slug = $menu_args['menu_slug'];
$function = $menu_args['function'];
if ( is_callable( $function ) ) {
$this->menu_item = new Landing_Pages_Empty_View_Menu_Item( $function );
} else {
$this->menu_item = new Landing_Pages_Menu_Item();
}
}
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__( 'Landing Pages', 'elementor' );
}
public function get_position(): int {
return 20;
}
public function get_slug(): string {
$menu_args = $this->module->get_menu_args();
return $menu_args['menu_slug'];
}
public function get_group_id(): string {
return Menu_Config::TEMPLATES_GROUP_ID;
}
public function get_page_title(): string {
return $this->get_label();
}
public function render() {
if ( $this->menu_item instanceof Admin_Menu_Item_With_Page ) {
$this->menu_item->render();
} else {
wp_safe_redirect( admin_url( Module::ADMIN_PAGE_SLUG ) );
exit;
}
}
}

View File

@@ -0,0 +1,21 @@
<?php
namespace Elementor\Modules\LandingPages\AdminMenuItems;
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Landing_Pages_Empty_View_Menu_Item extends Landing_Pages_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 )();
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace Elementor\Modules\LandingPages\AdminMenuItems;
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item;
use Elementor\TemplateLibrary\Source_Local;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Landing_Pages_Menu_Item implements Admin_Menu_Item {
public function is_visible() {
return true;
}
public function get_parent_slug() {
return Source_Local::ADMIN_MENU_SLUG;
}
public function get_label() {
return esc_html__( 'Landing Pages', 'elementor' );
}
public function get_page_title() {
return esc_html__( 'Landing Pages', 'elementor' );
}
public function get_capability() {
return 'manage_options';
}
}