Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_refresh_heartbeat_nonces ›

Desde5.0.0
Obsoleton/a
wp_refresh_heartbeat_nonces ( $response )
Parâmetros:
  • (array) $response The Heartbeat response.
    Required: Yes
Retorna:
  • (array) The Heartbeat response.
Definido em:
Codex:

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



Fonte

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