apply_filters( 'the_posts_pagination_args', array $args )
- Since
- 6.1.0
Filters the arguments for posts pagination links.
Compatibility
- WordPress
- since 6.1.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$argsarray- { Optional. Default pagination arguments, see paginate_links().
@type string $screen_reader_text Screen reader text for navigation element.
Default 'Posts navigation'.
@type string $aria_label ARIA label text for the nav element. Default 'Posts'.
@type string $class Custom class for the nav element. Default 'pagination'.
}$screen_reader_textstringScreen reader text for navigation element. Default 'Posts navigation'.$aria_labelstringARIA label text for the nav element. Default 'Posts'.$classstringCustom class for the nav element. Default 'pagination'.
Where this hook fires · 1
wp-includes/link-template.php:2987get_the_posts_pagination()
Source code
* @type string $screen_reader_text Screen reader text for navigation element. * Default 'Posts navigation'. * @type string $aria_label ARIA label text for the nav element. Default 'Posts'. * @type string $class Custom class for the nav element. Default 'pagination'. * } */ $args = apply_filters( 'the_posts_pagination_args', $args ); // Make sure we get a string back. Plain is the next best thing. if ( isset( $args['type'] ) && 'array' === $args['type'] ) { $args['type'] = 'plain'; }Changelog
Introduced in 6.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.