wp_link_pages_link
Filter HookDescription
Filters the HTML output of individual page number links.Hook Information
| File Location | wp-includes/post-template.phpView on GitHub | 
| Hook Type | Filter | 
| Line Number | 1029 | 
Hook Parameters
| Type | Name | Description | 
|---|---|---|
| string | $link | The page number HTML output. | 
| int | $i | Page number for paginated posts' page links. | 
Usage Examples
                        Basic Usage
                    
                    <?php
// Hook into wp_link_pages_link
add_filter('wp_link_pages_link', 'my_custom_filter', 10, 2);
function my_custom_filter($link, $i) {
    // Your custom filtering logic here
    return $link;
}
Source Code Context
                        wp-includes/post-template.php:1029
                        - How this hook is used in WordPress core
                    
                    <?php
1024  					$output .= $parsed_args['separator'];
1025  				}
1026  				$link = _wp_link_page( $next ) . $parsed_args['link_before'] . $parsed_args['nextpagelink'] . $parsed_args['link_after'] . '</a>';
1027  
1028  				/** This filter is documented in wp-includes/post-template.php */
1029  				$output .= apply_filters( 'wp_link_pages_link', $link, $next );
1030  			}
1031  			$output .= $parsed_args['after'];
1032  		}
1033  	}
1034  
PHP Documentation
<?php
/**
				 * Filters the HTML output of individual page number links.
				 *
				 * @since 3.6.0
				 *
				 * @param string $link The page number HTML output.
				 * @param int    $i    Page number for paginated posts' page links.
				 */
                        Quick Info
                    
                    - Hook Type: Filter
- Parameters: 2
- File: wp-includes/post-template.php
                        Related Hooks
                    
                    Related hooks will be displayed here in future updates.
