1 | <?php |
||
13 | class Admin { |
||
14 | |||
15 | /** |
||
16 | * Make sure we only initialize the class once, as multiple plugins may call `init()` here. |
||
17 | * |
||
18 | * @var $is_initialized |
||
19 | */ |
||
20 | public static $is_initialized = false; |
||
21 | |||
22 | /** |
||
23 | * Construction. |
||
24 | */ |
||
25 | public function __construct() { |
||
29 | |||
30 | /** |
||
31 | * Initialize the UI. |
||
32 | */ |
||
33 | public static function init() { |
||
39 | |||
40 | /** |
||
41 | * Register's submenu. |
||
42 | */ |
||
43 | public function register_submenu_page() { |
||
54 | |||
55 | /** |
||
56 | * Enqueue scripts! |
||
57 | * |
||
58 | * @param string $hook Page hook. |
||
59 | */ |
||
60 | public function enqueue_scripts( $hook ) { |
||
72 | |||
73 | /** |
||
74 | * Render UI. |
||
75 | */ |
||
76 | public function render_ui() { |
||
81 | |||
82 | /** |
||
83 | * Return the rendered initial state JavaScript code. |
||
84 | * |
||
85 | * @return string |
||
86 | */ |
||
87 | private function get_initial_state() { |
||
90 | |||
91 | } |
||
92 |