Created
July 13, 2020 22:22
-
-
Save ravewebdev/ec7d4099b6f4d8d147b15af5371e440e to your computer and use it in GitHub Desktop.
3.2.1. Create nonce for use with REST API
This file contains 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() { | |
$nonce = wp_create_nonce( 'wp_rest' ); | |
} | |
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