Changeset 25558
- Timestamp:
- 09/21/2013 08:46:15 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r25452 r25558 27 27 if ( ! empty($_POST['data']) ) { 28 28 $data = wp_unslash( (array) $_POST['data'] ); 29 30 /** 31 * Filter Heartbeat AJAX response in no-privilege environments. 32 * 33 * @since 3.6.0 34 * 35 * @param array|object $response The no-priv Heartbeat response object or array. 36 * @param array $data An array of data passed via $_POST. 37 * @param string $screen_id The screen id. 38 */ 29 39 $response = apply_filters( 'heartbeat_nopriv_received', $response, $data, $screen_id ); 30 40 } 31 41 42 /** 43 * Filter Heartbeat AJAX response when no data is passed. 44 * 45 * @since 3.6.0 46 * 47 * @param array|object $response The Heartbeat response object or array. 48 * @param string $screen_id The screen id. 49 */ 32 50 $response = apply_filters( 'heartbeat_nopriv_send', $response, $screen_id ); 33 51 34 // Allow the transport to be replaced with long-polling easily 52 /** 53 * Fires when Heartbeat ticks in no-privilege environments. 54 * 55 * Allows the transport to be easily replaced with long-polling. 56 * 57 * @since 3.6.0 58 * 59 * @param array|object $response The no-priv Heartbeat response. 60 * @param string $screen_id The screen id. 61 */ 35 62 do_action( 'heartbeat_nopriv_tick', $response, $screen_id ); 36 63 … … 164 191 wp_die( -1 ); 165 192 193 //duplicate_hook 166 194 if ( ! is_super_admin() && ! apply_filters( 'autocomplete_users_for_site_admins', false ) ) 167 195 wp_die( -1 ); … … 922 950 } 923 951 952 /** 953 * Filter the Walker class used when adding nav menu items. 954 * 955 * @since 3.4.0 956 * 957 * @param string $class The walker class to use. Default 'Walker_Nav_Menu_Edit'. 958 * @param int $menu_id The menu id, derived from $_POST['menu']. 959 */ 924 960 $walker_class_name = apply_filters( 'wp_edit_nav_menu_walker', 'Walker_Nav_Menu_Edit', $_POST['menu'] ); 925 961 … … 1193 1229 1194 1230 if ( ! empty( $_POST['item-object'] ) && isset( $items[$_POST['item-object']] ) ) { 1195 $item = apply_filters( 'nav_menu_meta_box_object', $items[ $_POST['item-object'] ] ); 1231 $menus_meta_box_object = $items[ $_POST['item-object'] ]; 1232 /** 1233 * Filter a nav menu meta box object. 1234 * 1235 * @since 3.0.0 1236 * 1237 * @param object $menus_meta_box_object A nav menu meta box object, such as Page, Post, Category, Tag, etc. 1238 */ 1239 $item = apply_filters( 'nav_menu_meta_box_object', $menus_meta_box_object ); 1196 1240 ob_start(); 1197 1241 call_user_func_array($callback, array( … … 1522 1566 unset( $_POST['savewidgets'], $_POST['action'] ); 1523 1567 1524 do_action('load-widgets.php'); 1525 do_action('widgets.php'); 1526 do_action('sidebar_admin_setup'); 1568 /** 1569 * Fires early when editing the widgets displayed in sidebars. 1570 * 1571 * @since 2.8.0 1572 */ 1573 do_action( 'load-widgets.php' ); 1574 1575 /** 1576 * Fires early when editing the widgets displayed in sidebars. 1577 * 1578 * @since 2.8.0 1579 */ 1580 do_action( 'widgets.php' ); 1581 1582 /** 1583 * Fires early when editing the widgets displayed in sidebars. 1584 * 1585 * @since 2.2.0 1586 */ 1587 do_action( 'sidebar_admin_setup' ); 1527 1588 1528 1589 $id_base = $_POST['id_base']; … … 1778 1839 wp_die( 0 ); 1779 1840 1841 /** 1842 * Filter the post lock window duration. 1843 * 1844 * @since 3.3.0 1845 * 1846 * @param int $interval The interval in seconds the post lock duration should last, plus 5 seconds. Default 120. 1847 */ 1780 1848 $new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', 120 ) + 5 ) . ':' . $active_lock[1]; 1781 1849 update_post_meta( $post_id, '_edit_lock', $new_lock, implode( ':', $active_lock ) ); … … 1853 1921 * 1854 1922 * @since 3.7.0 1855 * @param array $query Array of query variables. 1923 * 1924 * @param array $query An array of query variables. @see WP_Query::parse_query() 1856 1925 */ 1857 1926 $query = apply_filters( 'ajax_query_attachments_args', $query ); … … 1934 2003 wp_send_json_error(); 1935 2004 2005 //duplicate_hook 1936 2006 $post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data ); 1937 2007 … … 2036 2106 } 2037 2107 2108 //duplicate_hook 2038 2109 $html = apply_filters( 'media_send_to_editor', $html, $id, $attachment ); 2039 2110 … … 2076 2147 $type = $ext_type; 2077 2148 2149 //duplicate_hook 2078 2150 $html = apply_filters( $type . '_send_to_editor_url', $html, $src, $title ); 2079 2151 … … 2106 2178 if ( ! empty($_POST['data']) ) { 2107 2179 $data = (array) $_POST['data']; 2180 2181 /** 2182 * Filter the Heartbeat response received. 2183 * 2184 * @since 3.6.0 2185 * 2186 * @param array|object $response The Heartbeat response object or array. 2187 * @param array $data The $_POST data sent. 2188 * @param string $screen_id The screen id. 2189 */ 2108 2190 $response = apply_filters( 'heartbeat_received', $response, $data, $screen_id ); 2109 2191 } 2110 2192 2193 /** 2194 * Filter the Heartbeat response sent. 2195 * 2196 * @since 3.6.0 2197 * 2198 * @param array|object $response The Heartbeat response object or array. 2199 * @param string $screen_id The screen id. 2200 */ 2111 2201 $response = apply_filters( 'heartbeat_send', $response, $screen_id ); 2112 2202 2113 // Allow the transport to be replaced with long-polling easily 2203 /** 2204 * Fires when Heartbeat ticks in logged-in environments. 2205 * 2206 * Allows the transport to be easily replaced with long-polling. 2207 * 2208 * @since 3.6.0 2209 * 2210 * @param array|object $response The Heartbeat response object or array. 2211 * @param string $screen_id The screen id. 2212 */ 2114 2213 do_action( 'heartbeat_tick', $response, $screen_id ); 2115 2214
Note: See TracChangeset
for help on using the changeset viewer.