Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

validate ajax nonce request wordpress

 function custom_php_ajax_function() {
     // Check for nonce security      
     if ( ! wp_verify_nonce( $_POST['nonce'], 'ajax-nonce' ) ) {
         die ( 'Busted!');
     }
 }
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #validate #ajax #nonce #request #wordpress
ADD COMMENT
Topic
Name
5+6 =