Welcome, visitor! Log in
 

Source View: the_excerpt

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.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: 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.

Source View

Line Code
528  
529       return $result;
530  }
531  
532  function do_trackbacks($post_id) {
533       global $wpdb;
534  
535       $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = $post_id");
536       $to_ping = get_to_ping($post_id);
537       $pinged  = get_pung($post_id);
538       if ( empty($to_ping) )
539            return;
540       if (empty($post->post_excerpt))
541            $excerpt = apply_filters('the_content', $post->post_content);
542       else
543            $excerpt = apply_filters('the_excerpt', $post->post_excerpt);
544       $excerpt = str_replace(']]>', ']]>', $excerpt);
545       $excerpt = strip_tags($excerpt);
546       $excerpt = substr($excerpt, 0, 252) . '...';
547  
548       $post_title = apply_filters('the_title', $post->post_title);
549       $post_title = strip_tags($post_title);
550  
551       if ($to_ping) : foreach ($to_ping as $tb_ping) :
552            $tb_ping = trim($tb_ping);
553            if ( !in_array($tb_ping, $pinged) )
554             trackback($tb_ping, $post_title, $excerpt, $post_id);
555       endforeach; endif;
556  }
557  
558  function get_pung($post_id) { // Get URIs already pung for a post