wp_refresh_heartbeat_nonces( array $response )
Add the latest Heartbeat and REST-API nonce to the Heartbeat response.
Description Description
Parameters Parameters
- $response
-
(array) (Required) The Heartbeat response.
Return Return
(array) The Heartbeat response.
Source Source
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' ); // TEMPORARY: Compat with api-fetch library $response['rest-nonce'] = $response['rest_nonce']; // Refresh the Heartbeat nonce. $response['heartbeat_nonce'] = wp_create_nonce( 'heartbeat-nonce' ); return $response; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |