Changeset 44275 for trunk/src/wp-admin/includes/misc.php
- Timestamp:
- 12/17/2018 07:27:08 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43939
- Property svn:mergeinfo changed
-
trunk/src/wp-admin/includes/misc.php
r44168 r44275 1055 1055 1056 1056 $response['wp-refresh-post-nonces'] = array( 1057 'replace' 1057 'replace' => array( 1058 1058 'getpermalinknonce' => wp_create_nonce( 'getpermalink' ), 1059 1059 'samplepermalinknonce' => wp_create_nonce( 'samplepermalink' ), … … 1062 1062 '_wpnonce' => wp_create_nonce( 'update-post_' . $post_id ), 1063 1063 ), 1064 'heartbeatNonce' => wp_create_nonce( 'heartbeat-nonce' ),1065 1064 ); 1066 1065 } 1067 1066 1067 return $response; 1068 } 1069 1070 /** 1071 * Add the latest Heartbeat and REST-API nonce to the Heartbeat response. 1072 * 1073 * @since 5.0.0 1074 * 1075 * @param array $response The Heartbeat response. 1076 * @return array The Heartbeat response. 1077 */ 1078 function wp_refresh_heartbeat_nonces( $response ) { 1079 // Refresh the Rest API nonce. 1080 $response['rest_nonce'] = wp_create_nonce( 'wp_rest' ); 1081 // TEMPORARY: Compat with api-fetch library 1082 $response['rest-nonce'] = $response['rest_nonce']; 1083 1084 // Refresh the Heartbeat nonce. 1085 $response['heartbeat_nonce'] = wp_create_nonce( 'heartbeat-nonce' ); 1068 1086 return $response; 1069 1087 }
Note: See TracChangeset
for help on using the changeset viewer.