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 |
|---|---|
| 985 | } |
| 986 | /** |
| 987 | * Filters the HTML output of individual page number links. |
| 988 | * |
| 989 | * @since 3.6.0 |
| 990 | * |
| 991 | * @param string $link The page number HTML output. |
| 992 | * @param int $i Page number for paginated posts' page links. |
| 993 | */ |
| 994 | $link = apply_filters( 'wp_link_pages_link', $link, $i ); |
| 995 | |
| 996 | // Use the custom links separator beginning with the second link. |
| 997 | $output .= ( 1 === $i ) ? ' ' : $parsed_args['separator']; |
| 998 | $output .= $link; |
| 999 | } |
| 1000 | $output .= $parsed_args['after']; |
| 1001 | } elseif ( $more ) { |
| 1002 | $output .= $parsed_args['before']; |
| 1003 | $prev = $page - 1; |
| 1004 | if ( $prev > 0 ) { |
| 1005 | $link = _wp_link_page( $prev ) . $parsed_args['link_before'] . $parsed_args['previouspagelink'] . $parsed_args['link_after'] . '</a>'; |
| 1006 | |
| 1007 | /** This filter is documented in wp-includes/post-template.php */ |
| 1008 | $output .= apply_filters( 'wp_link_pages_link', $link, $prev ); |
| 1009 | } |
| 1010 | $next = $page + 1; |
| 1011 | if ( $next <= $numpages ) { |
| 1012 | if ( $prev ) { |
| 1013 | $output .= $parsed_args['separator']; |
| 1014 | } |
| 1015 | $link = _wp_link_page( $next ) . $parsed_args['link_before'] . $parsed_args['nextpagelink'] . $parsed_args['link_after'] . '</a>'; |
| 1016 | |
| 1017 | /** This filter is documented in wp-includes/post-template.php */ |
| 1018 | $output .= apply_filters( 'wp_link_pages_link', $link, $next ); |
| 1019 | } |
| 1020 | $output .= $parsed_args['after']; |
| 1021 | } |
| 1022 | } |
| 1023 | |
| 1024 | /** |
| 1025 | * Filters the HTML output of page links for paginated posts. |
| 1026 | * |
| 1027 | * @since 3.6.0 |