Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: the_title

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
345
346      if ( is_attachment() )
347           $post = & get_post($GLOBALS['post']->post_parent);
348      else
349           $post = get_previous_post($in_same_cat, $excluded_categories);
350
351      if ( !$post )
352           return;
353
354      $title = apply_filters('the_title', $post->post_title, $post);
355      $string = '<a href="'.get_permalink($post->ID).'">';
356      $link = str_replace('%title', $title, $link);
357      $link = $pre . $string . $link . '</a>';
358
359      $format = str_replace('%link', $link, $format);
360
361      echo $format;
362 }
363
364 function next_post_link($format='%link &raquo;', $link='%title', $in_same_cat = false, $excluded_categories = '') {
365      $post = get_next_post($in_same_cat, $excluded_categories);
366
367      if ( !$post )
368           return;
369
370      $title = apply_filters('the_title', $post->post_title, $post);
371      $string = '<a href="'.get_permalink($post->ID).'">';
372      $link = str_replace('%title', $title, $link);
373      $link = $string . $link . '</a>';
374      $format = str_replace('%link', $link, $format);
375
376      echo $format;
377 }
378
379 function get_pagenum_link($pagenum = 1) {