Opened 3 years ago
Last modified 8 days ago
#53859 new feature request
Add a filter hook to modify the paginate links arguments
Reported by: | ibachal | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Permalinks | Keywords: | has-patch |
Focuses: | Cc: |
Description
A filter hook to modify arguments in the function paginate_links()
https://developer.wordpress.org/reference/functions/paginate_links/
This filter hook can be added as below:
Current:
$args = wp_parse_args( $args, $defaults );
After:
$args = apply_filters( 'paginate_links_args', wp_parse_args( $args, $defaults ) );
Change History (4)
#3
@
9 days ago
Adding more context:
In block themes there is no way for theme author to modify output of Pagination block other than tweaking its HTML via render_block filter
.
Having a filter to modify the paginate_links()
arguments would resolve the issue.
Can someone provide feedback whether introducing this filter is OK? Thanks!
This ticket was mentioned in PR #7470 on WordPress/wordpress-develop by @webmandesign.
8 days ago
#4
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/53859
Note: See
TracTickets for help on using
tickets.
Hi everyone,
I'm all for this too. I build accessible themes and would appreciate to manipulate pagination args for improved accessibility. Currently I can only manipulate the output HTML, which is not ideal.
Any feedback on this? Or is this ticket lost in the past?