mirror of
https://ghproxy.net/https://github.com/abhijitb/helix.git
synced 2025-08-28 06:26:00 +08:00
lint fixes
This commit is contained in:
parent
d106c178ac
commit
01a7f967a4
7 changed files with 395 additions and 243 deletions
|
@ -1,6 +1,35 @@
|
|||
<?php
|
||||
add_action('admin_menu', function () {
|
||||
add_menu_page('Helix', 'Helix', 'read', 'helix', function () {
|
||||
echo '<div id="helix-root"></div>';
|
||||
}, 'dashicons-admin-generic', 1);
|
||||
});
|
||||
/**
|
||||
* Registers the Helix admin top-level menu page.
|
||||
*
|
||||
* @package Helix
|
||||
*/
|
||||
|
||||
add_action(
|
||||
'admin_menu',
|
||||
function () {
|
||||
$helix_hook_suffix = add_menu_page(
|
||||
'Helix',
|
||||
'Helix',
|
||||
'read',
|
||||
'helix',
|
||||
function () {
|
||||
echo '<div id="helix-root"></div>';
|
||||
},
|
||||
'dashicons-admin-generic',
|
||||
1
|
||||
);
|
||||
|
||||
if ( $helix_hook_suffix ) {
|
||||
// Mark when the Helix screen is loading. Used elsewhere to conditionally modify admin UI.
|
||||
add_action(
|
||||
"load-$helix_hook_suffix",
|
||||
function () {
|
||||
$GLOBALS['helix_is_current_screen'] = true;
|
||||
// Ensure we are in Helix mode when visiting the Helix page.
|
||||
update_option( 'helix_use_default_admin', false );
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue