wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_refresh_heartbeat_nonces › WordPress Function

Seit5.0.0
Veraltetn/v
wp_refresh_heartbeat_nonces ( $response )
Parameter:
  • (array) $response The Heartbeat response.
    Erforderlich: Ja
Gibt zurück:
  • (array) The Heartbeat response.
Definiert in:
Codex:

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



Quellcode

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