WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 167 | _wp_ajax_menu_quick_search( $_REQUEST ); |
| 168 | |
| 169 | exit; |
| 170 | break; |
| 171 | case 'oembed-cache' : |
| 172 | $return = ( $wp_embed->cache_oembed( $_GET['post'] ) ) ? '1' : '0'; |
| 173 | die( $return ); |
| 174 | break; |
| 175 | default : |
| 176 | do_action( 'wp_ajax_' . $_GET['action'] ); |
| 177 | die('0'); |
| 178 | break; |
| 179 | endswitch; |
| 180 | endif; |
| 181 | |
| 182 | /** |
| 183 | * Sends back current comment total and new page links if they need to be updated. |
| 184 | * |
| 185 | * Contrary to normal success AJAX response ("1"), die with time() on success. |
| Line | Code |
| 1542 | $last_edited = sprintf( __('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), $last_date, $last_time ); |
| 1543 | } else { |
| 1544 | $last_edited = sprintf( __('Last edited on %1$s at %2$s'), $last_date, $last_time ); |
| 1545 | } |
| 1546 | |
| 1547 | echo json_encode( array( 'message' => $message, 'last_edited' => $last_edited ) ); |
| 1548 | die(); |
| 1549 | break; |
| 1550 | default : |
| 1551 | do_action( 'wp_ajax_' . $_POST['action'] ); |
| 1552 | die('0'); |
| 1553 | break; |
| 1554 | endswitch; |
| 1555 | ?> |
| 1556 | |