Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: the_content

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

Line Code
703                $since = sprintf( __('%s days'), $days );
704      }
705      return $since;
706 }
707
708 function wp_trim_excerpt($text) { // Fakes an excerpt if needed
709      global $post;
710      if ( '' == $text ) {
711           $text = $post->post_content;
712           $text = apply_filters('the_content', $text);
713           $text = str_replace(']]>', ']]>', $text);
714           $text = strip_tags($text);
715           $excerpt_length = 55;
716           $words = explode(' ', $text, $excerpt_length + 1);
717           if (count($words) > $excerpt_length) {
718                array_pop($words);
719                array_push($words, '[...]');
720                $text = implode(' ', $words);
721           }