Changeset 24528 for trunk/wp-admin/includes/ajax-actions.php
- Timestamp:
- 06/29/2013 01:31:44 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ajax-actions.php
r24520 r24528 2055 2055 2056 2056 function wp_ajax_heartbeat() { 2057 check_ajax_referer( 'heartbeat-nonce', '_nonce' ); 2057 if ( empty( $_POST['_nonce'] ) ) 2058 wp_send_json_error(); 2059 2058 2060 $response = array(); 2061 2062 if ( false === wp_verify_nonce( $_POST['_nonce'], 'heartbeat-nonce' ) ) { 2063 // User is logged in but nonces have expired. 2064 $response['nonces_expired'] = true; 2065 wp_send_json($response); 2066 } 2059 2067 2060 2068 // screen_id is the same as $current_screen->id and the JS global 'pagenow' … … 2077 2085 do_action( 'heartbeat_tick', $response, $screen_id ); 2078 2086 2079 // send the current time acording to the server2087 // Send the current time acording to the server 2080 2088 $response['server_time'] = time(); 2081 2089
Note: See TracChangeset
for help on using the changeset viewer.