Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: excerpt_save_pre

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
19      if ( !empty($ID) ) {
20           $update = true;
21           $post = & get_post($ID);
22           $previous_status = $post->post_status;
23      }
24
25      // Get the basics.
26      $post_content    = apply_filters('content_save_pre',   $post_content);
27      $post_content_filtered = apply_filters('content_filtered_save_pre',   $post_content_filtered);
28      $post_excerpt    = apply_filters('excerpt_save_pre',   $post_excerpt);
29      $post_title      = apply_filters('title_save_pre',     $post_title);
30      $post_category   = apply_filters('category_save_pre',  $post_category);
31      $post_status     = apply_filters('status_save_pre',    $post_status);
32      $post_name       = apply_filters('name_save_pre',      $post_name);
33      $comment_status  = apply_filters('comment_status_pre', $comment_status);
34      $ping_status     = apply_filters('ping_status_pre',    $ping_status);
35      
36      // Make sure we set a valid category
37      if (0 == count($post_category) || !is_array($post_category)) {
 
Line Code
217      if ( is_object($object) )
218           $object = get_object_vars($object);
219
220      // Export array as variables
221      extract($object);
222
223      // Get the basics.
224      $post_content    = apply_filters('content_save_pre',   $post_content);
225      $post_content_filtered = apply_filters('content_filtered_save_pre',   $post_content_filtered);
226      $post_excerpt    = apply_filters('excerpt_save_pre',   $post_excerpt);
227      $post_title      = apply_filters('title_save_pre',     $post_title);
228      $post_category   = apply_filters('category_save_pre',  $post_category);
229      $post_name       = apply_filters('name_save_pre',      $post_name);
230      $comment_status  = apply_filters('comment_status_pre', $comment_status);
231      $ping_status     = apply_filters('ping_status_pre',    $ping_status);
232      $post_mime_type  = apply_filters('post_mime_type_pre', $post_mime_type);
233
234      // Make sure we set a valid category
235      if (0 == count($post_category) || !is_array($post_category)) {