| 1 |
<?php |
| 2 |
namespace Elementor\Modules\ProInstall; |
| 3 |
|
| 4 |
use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page; |
| 5 |
use Elementor\Settings; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; // Exit if accessed directly. |
| 9 |
} |
| 10 |
|
| 11 |
class Pro_Install_Menu_Item implements Admin_Menu_Item_With_Page { |
| 12 |
|
| 13 |
private Connect_Page_Renderer $renderer; |
| 14 |
|
| 15 |
public function __construct( Connect $connect, array $script_config ) { |
| 16 |
$page_url = admin_url( 'admin.php?page=elementor-connect-account' ); |
| 17 |
$this->renderer = new Connect_Page_Renderer( $connect, $page_url, $script_config ); |
| 18 |
} |
| 19 |
|
| 20 |
public function get_label(): string { |
| 21 |
return esc_html__( 'Connect Account', 'elementor' ); |
| 22 |
} |
| 23 |
|
| 24 |
public function get_page_title(): string { |
| 25 |
return esc_html__( 'Connect Settings', 'elementor' ); |
| 26 |
} |
| 27 |
|
| 28 |
public function get_capability(): string { |
| 29 |
return 'manage_options'; |
| 30 |
} |
| 31 |
|
| 32 |
public function get_parent_slug(): string { |
| 33 |
return Settings::PAGE_ID; |
| 34 |
} |
| 35 |
|
| 36 |
public function is_visible(): bool { |
| 37 |
return true; |
| 38 |
} |
| 39 |
|
| 40 |
public function render() { |
| 41 |
$this->renderer->render(); |
| 42 |
} |
| 43 |
} |
| 44 |
|