wp_refresh_heartbeat_nonces
函数
wp_refresh_heartbeat_nonces ( $response )
- 参数
-
-
(array)
$response
The Heartbeat response.- Required: 是
-
(array)
- 返回值
-
- (array) The Heartbeat response.
- 定义位置
-
-
wp-admin/includes/misc.php
, line 1301
-
wp-admin/includes/misc.php
- 引入
- 5.0.0
- 弃用
- –
将最新的Heartbeat 和REST-API nonce添加到Heartbeat 响应中。
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; }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。