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 |
---|---|
842 | } |
843 | /** |
844 | * Filter the HTML output of individual page number links. |
845 | * |
846 | * @since 3.6.0 |
847 | * |
848 | * @param string $link The page number HTML output. |
849 | * @param int $i Page number for paginated posts' page links. |
850 | */ |
851 | $link = apply_filters( 'wp_link_pages_link', $link, $i ); |
852 |
|
853 | // Use the custom links separator beginning with the second link. |
854 | $output .= ( 1 === $i ) ? ' ' : $r['separator']; |
855 | $output .= $link; |
856 | } |
857 | $output .= $r['after']; |
858 | } elseif ( $more ) { |
859 | $output .= $r['before']; |
860 | $prev = $page - 1; |
861 | if ( $prev > 0 ) { |
862 | $link = _wp_link_page( $prev ) . $r['link_before'] . $r['previouspagelink'] . $r['link_after'] . '</a>'; |
863 |
|
864 | /** This filter is documented in wp-includes/post-template.php */ |
865 | $output .= apply_filters( 'wp_link_pages_link', $link, $prev ); |
866 | } |
867 | $next = $page + 1; |
868 | if ( $next <= $numpages ) { |
869 | if ( $prev ) { |
870 | $output .= $r['separator']; |
871 | } |
872 | $link = _wp_link_page( $next ) . $r['link_before'] . $r['nextpagelink'] . $r['link_after'] . '</a>'; |
873 |
|
874 | /** This filter is documented in wp-includes/post-template.php */ |
875 | $output .= apply_filters( 'wp_link_pages_link', $link, $next ); |
876 | } |
877 | $output .= $r['after']; |
878 | } |
879 | } |
880 |
|
881 | /** |
882 | * Filter the HTML output of page links for paginated posts. |
883 | * |
884 | * @since 3.6.0 |