the_posts_pagination_args filter-hookWP 6.1.0

Filters the arguments for posts pagination links.

Usage

add_filter( 'the_posts_pagination_args', 'wp_kama_the_posts_pagination_args_filter' );

/**
 * Function for `the_posts_pagination_args` filter-hook.
 * 
 * @param array $args Optional.
 *
 * @return array
 */
function wp_kama_the_posts_pagination_args_filter( $args ){

	// filter...
	return $args;
}
$args(array)

Optional.

Default: pagination arguments, see paginate_links()

  • screen_reader_text(string)
    Screen reader text for navigation element.
    Default: 'Posts navigation'

  • aria_label(string)
    ARIA label text for the nav element.
    Default: 'Posts'

  • class(string)
    Custom class for the nav element.
    Default: 'pagination'

Changelog

Since 6.1.0 Introduced.

Where the hook is called

get_the_posts_pagination()
the_posts_pagination_args
wp-includes/link-template.php 2962
$args = apply_filters( 'the_posts_pagination_args', $args );

Where the hook is used in WordPress

Usage not found.