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 3 times in this file.
Line | Code |
---|---|
970 | } |
971 | /** |
972 | * Filters the HTML output of individual page number links. |
973 | * |
974 | * @since 3.6.0 |
975 | * |
976 | * @param string $link The page number HTML output. |
977 | * @param int $i Page number for paginated posts' page links. |
978 | */ |
979 | $link = apply_filters( 'wp_link_pages_link', $link, $i ); |
980 |
|
981 | // Use the custom links separator beginning with the second link. |
982 | $output .= ( 1 === $i ) ? ' ' : $r['separator']; |
983 | $output .= $link; |
984 | } |
985 | $output .= $r['after']; |
986 | } elseif ( $more ) { |
987 | $output .= $r['before']; |
988 | $prev = $page - 1; |
989 | if ( $prev > 0 ) { |
990 | $link = _wp_link_page( $prev ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '</a>'; |
991 |
|
992 | /** This filter is documented in wp-includes/post-template.php */ |
993 | $output .= apply_filters( 'wp_link_pages_link', $link, $prev ); |
994 | } |
995 | $next = $page + 1; |
996 | if ( $next <= $numpages ) { |
997 | if ( $prev ) { |
998 | $output .= $r['separator']; |
999 | } |
1000 | $link = _wp_link_page( $next ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '</a>'; |
1001 |
|
1002 | /** This filter is documented in wp-includes/post-template.php */ |
1003 | $output .= apply_filters( 'wp_link_pages_link', $link, $next ); |
1004 | } |
1005 | $output .= $r['after']; |
1006 | } |
1007 | } |
1008 |
|
1009 | /** |
1010 | * Filters the HTML output of page links for paginated posts. |
1011 | * |
1012 | * @since 3.6.0 |