Changeset 24819
- Timestamp:
- 07/28/2013 08:55:53 PM (12 years ago)
- Location:
- branches/3.6
- Files:
-
- 2 edited
-
wp-admin/includes/ajax-actions.php (modified) (3 diffs)
-
wp-includes/js/heartbeat.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.6/wp-admin/includes/ajax-actions.php
r24790 r24819 9 9 /* 10 10 * No-privilege Ajax handlers. 11 */ 12 13 /** 14 * Heartbeat API (experimental) 15 * 16 * Runs when the user is not logged in. 11 17 */ 12 18 function wp_ajax_nopriv_heartbeat() { … … 2053 2059 } 2054 2060 2061 /** 2062 * Heartbeat API (experimental) 2063 * 2064 * Runs when the user is logged in. 2065 */ 2055 2066 function wp_ajax_heartbeat() { 2056 2067 if ( empty( $_POST['_nonce'] ) ) … … 2073 2084 if ( ! empty($_POST['data']) ) { 2074 2085 $data = (array) $_POST['data']; 2075 2076 // todo: separate filters: 'heartbeat_[action]' so we call different callbacks only when there is data for them,2077 // or all callbacks listen to one filter and run when there is something for them in $data?2078 2086 $response = apply_filters( 'heartbeat_received', $response, $data, $screen_id ); 2079 2087 } -
branches/3.6/wp-includes/js/heartbeat.js
r24749 r24819 1 1 /** 2 2 * Heartbeat API 3 * 4 * Note: this API is "experimental" meaning it will likely change a lot 5 * in the next few releases based on feedback from 3.6.0. If you intend 6 * to use it, please follow the development closely. 3 7 * 4 8 * Heartbeat is a simple server polling API that sends XHR requests to … … 48 52 * 49 53 * @returns boolean 50 * @private51 54 */ 52 55 this.hasConnectionError = function() {
Note: See TracChangeset
for help on using the changeset viewer.