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
86           $in_same_cat = true;
87
88      $post = get_previous_post($in_same_cat, $excluded_categories);
89
90      if ( !$post )
91           return;
92
93      $string = '<a href="'.get_permalink($post->ID).'">'.$previous;
94      if ( 'yes' == $title )
95           $string .= apply_filters('the_title', $post->post_title, $post);
96      $string .= '</a>';
97      $format = str_replace('%', $string, $format);
98      echo $format;
99 }
100
101 // Use next_post_link().
102 function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
103
104      if ( empty($in_same_cat) || 'no' == $in_same_cat )
 
Line Code
107           $in_same_cat = true;
108
109      $post = get_next_post($in_same_cat, $excluded_categories);
110
111      if ( !$post     )
112           return;
113
114      $string = '<a href="'.get_permalink($post->ID).'">'.$next;
115      if ( 'yes' == $title )
116           $string .= apply_filters('the_title', $post->post_title, $nextpost);
117      $string .= '</a>';
118      $format = str_replace('%', $string, $format);
119      echo $format;
120 }
121
122 //
123 // Use current_user_can() for these.
124 //
125