Uses
| Uses | Description |
|---|---|
| wp-includes/pluggable.php: wp_create_nonce() | Creates a cryptographic token tied to a specific action, user, user session, and window of time. |
Add the latest Heartbeat and REST-API nonce to the Heartbeat response.
(array) (Required) The Heartbeat response.
(array) The Heartbeat response.
File: wp-admin/includes/misc.php
function wp_refresh_heartbeat_nonces( $response ) {
// Refresh the Rest API nonce.
$response['rest_nonce'] = wp_create_nonce( 'wp_rest' );
// Refresh the Heartbeat nonce.
$response['heartbeat_nonce'] = wp_create_nonce( 'heartbeat-nonce' );
return $response;
} | Version | Description |
|---|---|
| 5.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_refresh_heartbeat_nonces