| 1 |
<?php |
| 2 |
namespace Elementor\Modules\System_Info; |
| 3 |
|
| 4 |
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page; |
| 5 |
use Elementor\Settings; |
| 6 |
use Elementor\Modules\System_Info\Module as System_Info_Page; |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; // Exit if accessed directly. |
| 10 |
} |
| 11 |
|
| 12 |
class System_Info_Menu_Item implements Admin_Menu_Item_With_Page { |
| 13 |
|
| 14 |
private $system_info_page; |
| 15 |
|
| 16 |
public function __construct( System_Info_Page $system_info_page ) { |
| 17 |
$this->system_info_page = $system_info_page; |
| 18 |
} |
| 19 |
|
| 20 |
public function is_visible() { |
| 21 |
return true; |
| 22 |
} |
| 23 |
|
| 24 |
public function get_parent_slug() { |
| 25 |
return Settings::PAGE_ID; |
| 26 |
} |
| 27 |
|
| 28 |
public function get_label() { |
| 29 |
return esc_html__( 'System Info', 'elementor' ); |
| 30 |
} |
| 31 |
|
| 32 |
public function get_page_title() { |
| 33 |
return esc_html__( 'System Info', 'elementor' ); |
| 34 |
} |
| 35 |
|
| 36 |
public function get_capability() { |
| 37 |
return $this->system_info_page->get_capability(); |
| 38 |
} |
| 39 |
|
| 40 |
public function render() { |
| 41 |
$this->system_info_page->display_page(); |
| 42 |
} |
| 43 |
} |
| 44 |
|