Filter hook 'wp_link_pages_args'

in WP Core File wp-includes/post-template.php at line 982

View Source

wp_link_pages_args

Filter Hook
Description
Filters the arguments used in retrieving page links for paginated posts.

Hook Information

File Location wp-includes/post-template.php View on GitHub
Hook Type Filter
Line Number 982

Hook Parameters

Type Name Description
array $parsed_args An array of page link arguments. See wp_link_pages() for information on accepted arguments.

Usage Examples

Basic Usage
<?php
// Hook into wp_link_pages_args
add_filter('wp_link_pages_args', 'my_custom_filter', 10, 1);

function my_custom_filter($parsed_args) {
    // Your custom filtering logic here
    return $parsed_args;
}

Source Code Context

wp-includes/post-template.php:982 - How this hook is used in WordPress core
<?php
 977  	 * @since 3.0.0
 978  	 *
 979  	 * @param array $parsed_args An array of page link arguments. See wp_link_pages()
 980  	 *                           for information on accepted arguments.
 981  	 */
 982  	$parsed_args = apply_filters( 'wp_link_pages_args', $parsed_args );
 983  
 984  	$output = '';
 985  	if ( $multipage ) {
 986  		if ( 'number' === $parsed_args['next_or_number'] ) {
 987  			$output .= $parsed_args['before'];

PHP Documentation

<?php
/**
	 * Filters the arguments used in retrieving page links for paginated posts.
	 *
	 * @since 3.0.0
	 *
	 * @param array $parsed_args An array of page link arguments. See wp_link_pages()
	 *                           for information on accepted arguments.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/post-template.php
Related Hooks

Related hooks will be displayed here in future updates.