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 |
---|---|
389 |
|
390 | if ( is_attachment() ) |
391 | $post = & get_post($GLOBALS['post']->post_parent); |
392 | else |
393 | $post = get_previous_post($in_same_cat, $excluded_categories); |
394 |
|
395 | if ( !$post ) |
396 | return; |
397 |
|
398 | $title = apply_filters('the_title', $post->post_title, $post); |
399 | $string = '<a href="'.get_permalink($post->ID).'">'; |
400 | $link = str_replace('%title', $title, $link); |
401 | $link = $pre . $string . $link . '</a>'; |
402 |
|
403 | $format = str_replace('%link', $link, $format); |
404 |
|
405 | echo $format; |
406 | } |
407 |
|
408 | function next_post_link($format='%link »', $link='%title', $in_same_cat = false, $excluded_categories = '') { |
409 | $post = get_next_post($in_same_cat, $excluded_categories); |
410 |
|
411 | if ( !$post ) |
412 | return; |
413 |
|
414 | $title = apply_filters('the_title', $post->post_title, $post); |
415 | $string = '<a href="'.get_permalink($post->ID).'">'; |
416 | $link = str_replace('%title', $title, $link); |
417 | $link = $string . $link . '</a>'; |
418 | $format = str_replace('%link', $link, $format); |
419 |
|
420 | echo $format; |
421 | } |
422 |
|
423 | function get_pagenum_link($pagenum = 1) { |