Validar Ajax nonce solicitação wordpress

 function custom_php_ajax_function() {
     // Check for nonce security      
     if ( ! wp_verify_nonce( $_POST['nonce'], 'ajax-nonce' ) ) {
         die ( 'Busted!');
     }
 }
Naughty Newt