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