Changeset 43939 for branches/5.0/src/wp-admin/includes/misc.php
- Timestamp:
- 11/22/2018 07:39:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-admin/includes/misc.php
r43920 r43939 1021 1021 '_wpnonce' => wp_create_nonce( 'update-post_' . $post_id ), 1022 1022 ), 1023 'heartbeatNonce' => wp_create_nonce( 'heartbeat-nonce' ),1024 1023 ); 1025 1024 } 1026 1025 1026 return $response; 1027 } 1028 1029 /** 1030 * Add the latest Heartbeat and REST-API nonce to the Heartbeat response. 1031 * 1032 * @since 5.0.0 1033 * 1034 * @param array $response The Heartbeat response. 1035 * @return array The Heartbeat response. 1036 */ 1037 function wp_refresh_heartbeat_nonces( $response ) { 1038 // Refresh the Rest API nonce. 1039 $response['rest_nonce'] = wp_create_nonce( 'wp_rest' ); 1040 // TEMPORARY: Compat with api-fetch library 1041 $response['rest-nonce'] = $response['rest_nonce']; 1042 1043 // Refresh the Heartbeat nonce. 1044 $response['heartbeat_nonce'] = wp_create_nonce( 'heartbeat-nonce' ); 1027 1045 return $response; 1028 1046 }
Note: See TracChangeset
for help on using the changeset viewer.