mirror of
https://ghproxy.net/https://github.com/abhijitb/helix.git
synced 2025-08-28 00:34:34 +08:00
Initial commit
This commit is contained in:
commit
153a4e9fd7
345 changed files with 359185 additions and 0 deletions
11
enqueue.php
Normal file
11
enqueue.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
add_action('admin_enqueue_scripts', function ($hook) {
|
||||
if ($hook !== 'toplevel_page_helix') return;
|
||||
|
||||
wp_enqueue_script('helix-app', plugin_dir_url(__FILE__) . 'build/index.js', [], null, true);
|
||||
wp_localize_script('helix-app', 'helixData', [
|
||||
'restUrl' => esc_url_raw(rest_url('helix/v1/')),
|
||||
'nonce' => wp_create_nonce('wp_rest'),
|
||||
'user' => wp_get_current_user(),
|
||||
]);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue