Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: ping_status_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
504      if ( empty($no_filter) ) {
505           $post_content    = apply_filters('content_save_pre',   $post_content);
506           $post_content_filtered = apply_filters('content_filtered_save_pre',   $post_content_filtered);
507           $post_excerpt    = apply_filters('excerpt_save_pre',   $post_excerpt);
508           $post_title      = apply_filters('title_save_pre',     $post_title);
509           $post_category   = apply_filters('category_save_pre',  $post_category);
510           $post_status     = apply_filters('status_save_pre',    $post_status);
511           $post_name       = apply_filters('name_save_pre',      $post_name);
512           $comment_status  = apply_filters('comment_status_pre', $comment_status);
513           $ping_status     = apply_filters('ping_status_pre',    $ping_status);
514      }
515
516      if ( ('' == $post_content) && ('' == $post_title) && ('' == $post_excerpt) )
517           return 0;
518
519      // Make sure we set a valid category
520      if (0 == count($post_category) || !is_array($post_category)) {
521           $post_category = array(get_option('default_category'));
522      }
 
Line Code
1219
1220      // Get the basics.
1221      $post_content    = apply_filters('content_save_pre',   $post_content);
1222      $post_content_filtered = apply_filters('content_filtered_save_pre',   $post_content_filtered);
1223      $post_excerpt    = apply_filters('excerpt_save_pre',   $post_excerpt);
1224      $post_title      = apply_filters('title_save_pre',     $post_title);
1225      $post_category   = apply_filters('category_save_pre',  $post_category);
1226      $post_name       = apply_filters('name_save_pre',      $post_name);
1227      $comment_status  = apply_filters('comment_status_pre', $comment_status);
1228      $ping_status     = apply_filters('ping_status_pre',    $ping_status);
1229      $post_mime_type  = apply_filters('post_mime_type_pre', $post_mime_type);
1230
1231      // Make sure we set a valid category
1232      if (0 == count($post_category) || !is_array($post_category)) {
1233           $post_category = array(get_option('default_category'));
1234      }
1235      $post_cat = $post_category[0];
1236
1237      if ( empty($post_author) )