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 4 times in this file.

Line Code
144           $in_same_cat = true;
145
146      $post = get_previous_post($in_same_cat, $excluded_categories);
147
148      if ( !$post )
149           return;
150
151      $string = '<a href="'.get_permalink($post->ID).'">'.$previous;
152      if ( 'yes' == $title )
153           $string .= apply_filters('the_title', $post->post_title, $post->ID);
154      $string .= '</a>';
155      $format = str_replace('%', $string, $format);
156      echo $format;
157 }
158
159 /**
160  * Prints link to the next post.
161  *
162  * @since 0.71
 
Line Code
179           $in_same_cat = true;
180
181      $post = get_next_post($in_same_cat, $excluded_categories);
182
183      if ( !$post     )
184           return;
185
186      $string = '<a href="'.get_permalink($post->ID).'">'.$next;
187      if ( 'yes' == $title )
188           $string .= apply_filters('the_title', $post->post_title, $post->ID);
189      $string .= '</a>';
190      $format = str_replace('%', $string, $format);
191      echo $format;
192 }
193
194 /**
195  * Whether user can create a post.
196  *
197  * @since 1.5.0
 
Line Code
2696      $post = $posts[0];
2697
2698      if ( empty($post->post_title) )
2699           $post->post_title = $start ? __('First Post') : __('Last Post');
2700
2701      $date = mysql2date(get_option('date_format'), $post->post_date);
2702
2703      $title = str_replace('%title', $post->post_title, $title);
2704      $title = str_replace('%date', $date, $title);
2705      $title = apply_filters('the_title', $title, $post->ID);
2706
2707      $link = $start ? "<link rel='start' title='" : "<link rel='end' title='";
2708      $link .= esc_attr($title);
2709      $link .= "' href='" . get_permalink($post) . "' />\n";
2710
2711      $boundary = $start ? 'start' : 'end';
2712      return apply_filters( "{$boundary}_post_rel_link", $link );
2713 }
2714
 
Line Code
2773           $post = get_post($GLOBALS['post']->post_parent);
2774
2775      if ( empty($post) )
2776           return;
2777
2778      $date = mysql2date(get_option('date_format'), $post->post_date);
2779
2780      $title = str_replace('%title', $post->post_title, $title);
2781      $title = str_replace('%date', $date, $title);
2782      $title = apply_filters('the_title', $title, $post->ID);
2783
2784      $link = "<link rel='up' title='";
2785      $link .= esc_attr( $title );
2786      $link .= "' href='" . get_permalink($post) . "' />\n";
2787
2788      return apply_filters( "parent_post_rel_link", $link );
2789 }
2790
2791 /**