функция
since 5.0.0
wp_refresh_heartbeat_nonces()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_refresh_heartbeat_nonces( array $response ): array
Описание
Добавляет актуальный одноразовый защитный код Heartbeat и REST API в ответ Heartbeat.
Параметры
$response
array
обязательный
Ответ Heartbeat.
Возвращаемое значение
array
Исходный код
wp-admin/includes/misc.php:1317
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;
}
История изменений
| Версия | Описание |
|---|---|
| 5.0.0 | Introduced. |

