# hostinger/2.1.4/includes/Admin/Menu.php

Hostinger Tools, version 2.1.4. 66 lines.

- Page: https://pluginprobe.com/plugins/hostinger/2.1.4/code/includes/Admin/Menu.php
- Raw: https://pluginprobe.com/plugins/hostinger/2.1.4/raw/includes/Admin/Menu.php
- Modified: 2024-03-15T08:45:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/hostinger/2.1.4/code/includes/Admin/Menu.php#L10-L20`.

```php
<?php

namespace Hostinger\Admin;

use Hostinger\Admin\Onboarding\Onboarding;

defined( 'ABSPATH' ) || exit;

class Menu {
	public function __construct() {
		add_action( 'admin_menu', array( $this, 'admin_menu' ) );
	}

	public function admin_menu(): void {
		$icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyMSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wLjAwMDE5OTY1MyAxMS4yMzY4VjAuMDAwMzk4MjM1TDUuNjcxMzMgMy4wMjQzNlY4LjA4NjkxTDEzLjE3ODggOC4wOTA1M0wxOC45NDE5IDExLjIzNjhIMC4wMDAxOTk2NTNaTTE0LjcxNCA3LjE2MDQ3VjBMMjAuNTM4IDIuOTQ4NzJWMTAuNTQzN0wxNC43MTQgNy4xNjA0N1pNMTQuNzE0IDIwLjg5NDJWMTUuODc1M0w3LjE0ODYyIDE1Ljg3QzcuMTU1NjggMTUuOTAzNCAxLjI4OTg0IDEyLjY3MzUgMS4yODk4NCAxMi42NzM1TDIwLjUzOCAxMi43NjM4VjI0TDE0LjcxNCAyMC44OTQyWk0wIDIwLjg5NDFMMC4wMDAyMDE3NjkgMTMuNTUxNEw1LjY3MTMzIDE2Ljg1NDZWMjMuODQyN0wwIDIwLjg5NDFaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K';
		add_menu_page(
			__( 'Hostinger', 'hostinger' ),
			__( 'Hostinger', 'hostinger' ),
			'manage_options',
			'hostinger',
			array( $this, 'render' ),
			$icon,
			1
		);

		add_submenu_page(
			'hostinger',
			__( 'Get started', 'hostinger' ),
			__( 'Get started', 'hostinger' ),
			'manage_options',
			'hostinger&#home',
			'__return_empty_string',
			2
		);

		add_submenu_page(
			'hostinger',
			__( 'Learn', 'hostinger' ),
			__( 'Learn', 'hostinger' ),
			'manage_options',
			'hostinger&#learn',
			'__return_empty_string',
			3
		);

		if ( has_action( 'hostinger_ai_assistant_tab_view' ) && current_user_can( 'edit_posts' ) ) {
			add_submenu_page(
				'hostinger',
				__( 'AI Content Creator', 'hostinger' ),
				__( 'AI Content Creator', 'hostinger' ),
				'manage_options',
				'hostinger&#ai-assistant',
				'__return_empty_string',
				4
			);
		}

		remove_submenu_page( 'hostinger', 'hostinger' );
	}

	public function render(): void {
		$onboarding = new Onboarding();
		include_once __DIR__ . '/Views/Onboarding.php';
	}
}

```
