Last active
October 11, 2020 07:30
-
-
Save ravewebdev/ae545f5d5ed05d35dd76096078278a29 to your computer and use it in GitHub Desktop.
3.2. Localize Route and Create Nonce
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function localize_route() { | |
wp_localize_script( 'initiative-tracker-frontend-script', 'initTracker', [ | |
'route' => 'rave-initiative/v1/initiative', | |
] ); | |
} | |
add_action( 'wp_enqueue_scripts', 'localize_route' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment