heartbeat_nopriv_received filter allows you to modify the Heartbeat response data in no-privilege — that is, non-logged-in AJAX situations such as for use on the front-end.
It was added in 3.6.
heartbeat_nopriv_received accepts 3 arguments:
$responseThe nopriv Heartbeat response.
$dataAn array of data passed via
$screen_idThe screen id.
It modifies the
$response value to return a ‘marco polo’ scenario showing the server “responding” to the AJAX call. Thanks to for the suggestion!
View the code example on Gist.Have a suggested improvement? You can fork the Gist and comment back with the link. If all is agreeable, I’ll merge in your changes. Crowd-sourced documentation FTW!