I am struggling to implement nonces through XML request to php backend using the Wordpress nonce validation when creating forms dynamically. I am ok with the form built version
wp_nonce_field( 'delete-comment_'.$comment_id );
$nonce = wp_create_nonce( 'my-action_'.$post->ID );
Then to verify, there seems to be two options.
check_ajax_referer( 'process-comment' ); wp_verify_nonce( $_REQUEST['my_nonce'], 'process-comment'.$comment_id );
Both of which I seem unable to make recognised in the validation. There is a number being passed through the post, and I have tried, naming, not naming, and a lot of other options too, but seem unsuccessful to do something that is meant to be simple. The examples given on the codex are mightily confusing too.
Can anyone shed any light on this frustrating experience? Many Thanks