| 1 |
<?php |
| 2 |
/** |
| 3 |
* Our API calls responsible for handling requests from website visitors. |
| 4 |
* |
| 5 |
* @package ForceRefresh |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* Function to check the nonce provided in the call. |
| 10 |
* |
| 11 |
* @return boolean True if the provided nonce is valid. |
| 12 |
*/ |
| 13 |
function is_client_nonce_valid() { |
| 14 |
$nonce = isset( $_REQUEST['nonce'] ) |
| 15 |
? sanitize_text_field( wp_unslash( $_REQUEST['nonce'] ) ) |
| 16 |
: null; |
| 17 |
return wp_verify_nonce( $nonce, WP_ACTION_GET_VERSION ); |
| 18 |
} |
| 19 |
|
| 20 |
require_once __DIR__ . '/inc.get-version.php'; |
| 21 |
|