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 |
---|---|
899 | } |
900 | /** |
901 | * Filters the HTML output of individual page number links. |
902 | * |
903 | * @since 3.6.0 |
904 | * |
905 | * @param string $link The page number HTML output. |
906 | * @param int $i Page number for paginated posts' page links. |
907 | */ |
908 | $link = apply_filters( 'wp_link_pages_link', $link, $i ); |
909 |
|
910 | // Use the custom links separator beginning with the second link. |
911 | $output .= ( 1 === $i ) ? ' ' : $r['separator']; |
912 | $output .= $link; |
913 | } |
914 | $output .= $r['after']; |
915 | } elseif ( $more ) { |
916 | $output .= $r['before']; |
917 | $prev = $page - 1; |
918 | if ( $prev > 0 ) { |
919 | $link = _wp_link_page( $prev ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '</a>'; |
920 |
|
921 | /** This filter is documented in wp-includes/post-template.php */ |
922 | $output .= apply_filters( 'wp_link_pages_link', $link, $prev ); |
923 | } |
924 | $next = $page + 1; |
925 | if ( $next <= $numpages ) { |
926 | if ( $prev ) { |
927 | $output .= $r['separator']; |
928 | } |
929 | $link = _wp_link_page( $next ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '</a>'; |
930 |
|
931 | /** This filter is documented in wp-includes/post-template.php */ |
932 | $output .= apply_filters( 'wp_link_pages_link', $link, $next ); |
933 | } |
934 | $output .= $r['after']; |
935 | } |
936 | } |
937 |
|
938 | /** |
939 | * Filters the HTML output of page links for paginated posts. |
940 | * |
941 | * @since 3.6.0 |