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 |
|---|---|
| 201 | $in_same_cat = true; |
| 202 | |
| 203 | $post = get_previous_post($in_same_cat, $excluded_categories); |
| 204 | |
| 205 | if ( !$post ) |
| 206 | return; |
| 207 | |
| 208 | $string = '<a href="'.get_permalink($post->ID).'">'.$previous; |
| 209 | if ( 'yes' == $title ) |
| 210 | $string .= apply_filters('the_title', $post->post_title, $post); |
| 211 | $string .= '</a>'; |
| 212 | $format = str_replace('%', $string, $format); |
| 213 | echo $format; |
| 214 | } |
| 215 | |
| 216 | /** |
| 217 | * next_post() - Prints link to the next post |
| 218 | * |
| 219 | * @since 0.71 |
| Line | Code |
| 236 | $in_same_cat = true; |
| 237 | |
| 238 | $post = get_next_post($in_same_cat, $excluded_categories); |
| 239 | |
| 240 | if ( !$post ) |
| 241 | return; |
| 242 | |
| 243 | $string = '<a href="'.get_permalink($post->ID).'">'.$next; |
| 244 | if ( 'yes' == $title ) |
| 245 | $string .= apply_filters('the_title', $post->post_title, $nextpost); |
| 246 | $string .= '</a>'; |
| 247 | $format = str_replace('%', $string, $format); |
| 248 | echo $format; |
| 249 | } |
| 250 | |
| 251 | /** |
| 252 | * user_can_create_post() - Whether user can create a post |
| 253 | * |
| 254 | * @since 1.5 |