| 1 |
<?php |
| 2 |
if ( ! defined('ABSPATH') ) { |
| 3 |
exit('Direct\'s not allowed'); |
| 4 |
} |
| 5 |
if ( ! function_exists('cf7d_checkNonce') ) { |
| 6 |
function cf7d_checkNonce() { |
| 7 |
$nonce = sanitize_text_field($_POST['nonce']); |
| 8 |
if ( ! wp_verify_nonce($nonce, 'cf7d-nonce') ) { |
| 9 |
wp_send_json_error(array( 'mess' => 'Nonce is invalid' )); |
| 10 |
} |
| 11 |
} |
| 12 |
} |
| 13 |
|