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 |
|---|---|
| 961 | } |
| 962 | /** |
| 963 | * Filters the HTML output of individual page number links. |
| 964 | * |
| 965 | * @since 3.6.0 |
| 966 | * |
| 967 | * @param string $link The page number HTML output. |
| 968 | * @param int $i Page number for paginated posts' page links. |
| 969 | */ |
| 970 | $link = apply_filters( 'wp_link_pages_link', $link, $i ); |
| 971 | |
| 972 | // Use the custom links separator beginning with the second link. |
| 973 | $output .= ( 1 === $i ) ? ' ' : $parsed_args['separator']; |
| 974 | $output .= $link; |
| 975 | } |
| 976 | $output .= $parsed_args['after']; |
| 977 | } elseif ( $more ) { |
| 978 | $output .= $parsed_args['before']; |
| 979 | $prev = $page - 1; |
| 980 | if ( $prev > 0 ) { |
| 981 | $link = _wp_link_page( $prev ) . $parsed_args['link_before'] . $parsed_args['previouspagelink'] . $parsed_args['link_after'] . '</a>'; |
| 982 | |
| 983 | /** This filter is documented in wp-includes/post-template.php */ |
| 984 | $output .= apply_filters( 'wp_link_pages_link', $link, $prev ); |
| 985 | } |
| 986 | $next = $page + 1; |
| 987 | if ( $next <= $numpages ) { |
| 988 | if ( $prev ) { |
| 989 | $output .= $parsed_args['separator']; |
| 990 | } |
| 991 | $link = _wp_link_page( $next ) . $parsed_args['link_before'] . $parsed_args['nextpagelink'] . $parsed_args['link_after'] . '</a>'; |
| 992 | |
| 993 | /** This filter is documented in wp-includes/post-template.php */ |
| 994 | $output .= apply_filters( 'wp_link_pages_link', $link, $next ); |
| 995 | } |
| 996 | $output .= $parsed_args['after']; |
| 997 | } |
| 998 | } |
| 999 | |
| 1000 | /** |
| 1001 | * Filters the HTML output of page links for paginated posts. |
| 1002 | * |
| 1003 | * @since 3.6.0 |