WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
204 | $in_same_cat = true; |
205 |
|
206 | $post = get_previous_post($in_same_cat, $excluded_categories); |
207 |
|
208 | if ( !$post ) |
209 | return; |
210 |
|
211 | $string = '<a href="'.get_permalink($post->ID).'">'.$previous; |
212 | if ( 'yes' == $title ) |
213 | $string .= apply_filters('the_title', $post->post_title, $post); |
214 | $string .= '</a>'; |
215 | $format = str_replace('%', $string, $format); |
216 | echo $format; |
217 | } |
218 |
|
219 | /** |
220 | * Prints link to the next post. |
221 | * |
222 | * @since 0.71 |
Line | Code |
239 | $in_same_cat = true; |
240 |
|
241 | $post = get_next_post($in_same_cat, $excluded_categories); |
242 |
|
243 | if ( !$post ) |
244 | return; |
245 |
|
246 | $string = '<a href="'.get_permalink($post->ID).'">'.$next; |
247 | if ( 'yes' == $title ) |
248 | $string .= apply_filters('the_title', $post->post_title, $nextpost); |
249 | $string .= '</a>'; |
250 | $format = str_replace('%', $string, $format); |
251 | echo $format; |
252 | } |
253 |
|
254 | /** |
255 | * Whether user can create a post. |
256 | * |
257 | * @since 1.5 |