| 1 |
<?php |
| 2 |
/** |
| 3 |
* Easy Hotel – Dashboard bootstrap. |
| 4 |
* |
| 5 |
* Loaded once from the main plugin file. Wires up the menu page and the |
| 6 |
* REST controller. The data layer is instantiated on demand. |
| 7 |
* |
| 8 |
* @package Easy_Hotel |
| 9 |
*/ |
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; // Exit if accessed directly. |
| 13 |
} |
| 14 |
|
| 15 |
require_once __DIR__ . '/class-eshb-dashboard-data.php'; |
| 16 |
require_once __DIR__ . '/class-eshb-dashboard-rest.php'; |
| 17 |
require_once __DIR__ . '/class-eshb-dashboard-menu.php'; |
| 18 |
|
| 19 |
/** |
| 20 |
* Initialise the dashboard module. |
| 21 |
*/ |
| 22 |
function eshb_dashboard_init() { |
| 23 |
new ESHB_Dashboard_Menu(); |
| 24 |
new ESHB_Dashboard_REST(); |
| 25 |
} |
| 26 |
add_action( 'plugins_loaded', 'eshb_dashboard_init', 13 ); |
| 27 |
|