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 |
---|---|
819 | } |
820 | /** |
821 | * Filter the HTML output of individual page number links. |
822 | * |
823 | * @since 3.6.0 |
824 | * |
825 | * @param string $link The page number HTML output. |
826 | * @param int $i Page number for paginated posts' page links. |
827 | */ |
828 | $link = apply_filters( 'wp_link_pages_link', $link, $i ); |
829 |
|
830 | // Use the custom links separator beginning with the second link. |
831 | $output .= ( 1 === $i ) ? ' ' : $r['separator']; |
832 | $output .= $link; |
833 | } |
834 | $output .= $r['after']; |
835 | } elseif ( $more ) { |
836 | $output .= $r['before']; |
837 | $prev = $page - 1; |
838 | if ( $prev ) { |
839 | $link = _wp_link_page( $prev ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '</a>'; |
840 |
|
841 | /** This filter is documented in wp-includes/post-template.php */ |
842 | $output .= apply_filters( 'wp_link_pages_link', $link, $prev ); |
843 | } |
844 | $next = $page + 1; |
845 | if ( $next <= $numpages ) { |
846 | if ( $prev ) { |
847 | $output .= $r['separator']; |
848 | } |
849 | $link = _wp_link_page( $next ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '</a>'; |
850 |
|
851 | /** This filter is documented in wp-includes/post-template.php */ |
852 | $output .= apply_filters( 'wp_link_pages_link', $link, $next ); |
853 | } |
854 | $output .= $r['after']; |
855 | } |
856 | } |
857 |
|
858 | /** |
859 | * Filter the HTML output of page links for paginated posts. |
860 | * |
861 | * @since 3.6.0 |