Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: {$adjacent}_post_link

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

Line Code
1461           $inlink = str_replace( '%title', $title, $link );
1462           $inlink = str_replace( '%date', $date, $inlink );
1463           $inlink = $string . $inlink . '</a>';
1464
1465           $output = str_replace( '%link', $inlink, $format );
1466      }
1467
1468      $adjacent = $previous ? 'previous' : 'next';
1469
1470      return apply_filters( "{$adjacent}_post_link", $output, $format, $link, $post );
1471 }
1472
1473 /**
1474  * Display adjacent post link.
1475  *
1476  * Can be either next post link or previous.
1477  *
1478  * @since 2.5.0
1479  * @uses get_adjacent_post_link()