Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_ajax_{$action}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
164      _wp_ajax_menu_quick_search( $_REQUEST );
165
166      exit;
167      break;
168 case 'oembed-cache' :
169      $return = ( $wp_embed->cache_oembed( $_GET['post'] ) ) ? '1' : '0';
170      die( $return );
171      break;
172 default :
173      do_action( 'wp_ajax_' . $_GET['action'] );
174      die('0');
175      break;
176 endswitch;
177 endif;
178
179 /**
180  * Sends back current comment total and new page links if they need to be updated.
181  *
182  * Contrary to normal success AJAX response ("1"), die with time() on success.
 
Line Code
1578           die( '0' );
1579
1580      $dismissed[] = $pointer;
1581      $dismissed = implode( ',', $dismissed );
1582
1583      update_user_meta( get_current_user_id(), 'dismissed_wp_pointers', $dismissed );
1584      die( '1' );
1585      break;
1586 default :
1587      do_action( 'wp_ajax_' . $_POST['action'] );
1588      die('0');
1589      break;
1590 endswitch;
1591 ?>
1592