1 | <?php |
||
13 | class Admin { |
||
14 | |||
15 | /** |
||
16 | * Singleton instance. |
||
17 | * |
||
18 | * @var $instance |
||
19 | */ |
||
20 | private static $instance = null; |
||
21 | |||
22 | /** |
||
23 | * No instantiation, use `get_instance()`. |
||
24 | */ |
||
25 | private function __construct() {} |
||
26 | |||
27 | /** |
||
28 | * Retrieve singleton instance. |
||
29 | * |
||
30 | * @return Admin |
||
31 | */ |
||
32 | public static function get_instance() { |
||
40 | |||
41 | /** |
||
42 | * Initialize the UI. |
||
43 | */ |
||
44 | private function init() { |
||
48 | |||
49 | /** |
||
50 | * Register's submenu. |
||
51 | */ |
||
52 | public function register_submenu_page() { |
||
63 | |||
64 | /** |
||
65 | * Enqueue scripts! |
||
66 | * |
||
67 | * @param string $hook Page hook. |
||
68 | */ |
||
69 | public function enqueue_scripts( $hook ) { |
||
81 | |||
82 | /** |
||
83 | * Render UI. |
||
84 | */ |
||
85 | public function render_ui() { |
||
90 | |||
91 | /** |
||
92 | * Return the rendered initial state JavaScript code. |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | private function get_initial_state() { |
||
99 | |||
100 | } |
||
101 |