| 1 |
<?php |
| 2 |
namespace Elementor\Includes\Settings\AdminMenuItems; |
| 3 |
|
| 4 |
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page; |
| 5 |
use Elementor\Settings; |
| 6 |
use Elementor\Tools; |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; // Exit if accessed directly. |
| 10 |
} |
| 11 |
|
| 12 |
class Tools_Menu_Item implements Admin_Menu_Item_With_Page { |
| 13 |
|
| 14 |
private $tools_page; |
| 15 |
|
| 16 |
public function __construct( Tools $tools_page ) { |
| 17 |
$this->tools_page = $tools_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__( 'Tools', 'elementor' ); |
| 30 |
} |
| 31 |
|
| 32 |
public function get_page_title() { |
| 33 |
return esc_html__( 'Tools', 'elementor' ); |
| 34 |
} |
| 35 |
|
| 36 |
public function get_capability() { |
| 37 |
return 'manage_options'; |
| 38 |
} |
| 39 |
|
| 40 |
public function render() { |
| 41 |
$this->tools_page->display_settings_page(); |
| 42 |
} |
| 43 |
} |
| 44 |
|