Initial commit

This commit is contained in:
Abhijit Bhatnagar 2025-08-01 08:00:35 +05:30
commit 153a4e9fd7
345 changed files with 359185 additions and 0 deletions

View file

@ -0,0 +1,7 @@
<?php
add_action('admin_init', function () {
$screen = get_current_screen();
if (!is_admin() || $screen->id === 'toplevel_page_helix') return;
wp_redirect(admin_url('admin.php?page=helix'));
exit;
});

6
admin/init.php Normal file
View file

@ -0,0 +1,6 @@
<?php
add_action('admin_menu', function () {
add_menu_page('Helix', 'Helix', 'read', 'helix', function () {
echo '<div id="helix-root"></div>';
}, 'dashicons-admin-generic', 2);
});

13
admin/rest-routes.php Normal file
View file

@ -0,0 +1,13 @@
<?php
add_action('rest_api_init', function () {
register_rest_route('helix/v1', '/settings', [
'methods' => 'GET',
'permission_callback' => '__return_true',
'callback' => function () {
return [
'siteTitle' => get_option('blogname'),
'language' => get_option('WPLANG'),
];
}
]);
});