wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_refresh_heartbeat_nonces › WordPress Function

Da5.0.0
Deprecaton/a
wp_refresh_heartbeat_nonces ( $response )
Parametri:
  • (array) $response The Heartbeat response.
    Richiesto:
Ritorna:
  • (array) The Heartbeat response.
Definito a:
Codex:

Adds the latest Heartbeat and REST-API nonce to the Heartbeat response.



Sorgenti

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;
}