wp_link_pages_link
Filters the HTML output of individual page number links.
Usage
add_filter( 'wp_link_pages_link', 'wp_kama_link_pages_filter', 10, 2 ); /** * Function for `wp_link_pages_link` filter-hook. * * @param string $link The page number HTML output. * @param int $i Page number for paginated posts' page links. * * @return string */ function wp_kama_link_pages_filter( $link, $i ){ // filter... return $link; }
- $link(string)
- The page number HTML output.
- $i(int)
- Page number for paginated posts' page links.
Changelog
Since 3.6.0 | Introduced. |
Where the hook is called
wp-includes/post-template.php 998
$link = apply_filters( 'wp_link_pages_link', $link, $i );
wp-includes/post-template.php 1012
$output .= apply_filters( 'wp_link_pages_link', $link, $prev );
wp-includes/post-template.php 1022
$output .= apply_filters( 'wp_link_pages_link', $link, $next );