Opened 15 years ago
Closed 15 years ago
#10034 closed enhancement (fixed)
wp_list_pages(): pass args $r to apply_filters()
Reported by: | antonylesuisse | Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | low |
Severity: | minor | Version: | 2.8 |
Component: | Template | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
A one line fix: - $output = apply_filters('wp_list_pages', $output); + $output = apply_filters('wp_list_pages', $output, $r); It would allow filters to test clauses such as 'child_of==0'. I currently use the following hack in the filter function: $bt=debug_backtrace(); $r=$bt[3]["args"][0];
Attachments (1)
Change History (8)
#1
@
15 years ago
- Component changed from General to Template
- Milestone changed from Unassigned to Future Release
- Version set to 2.8
#2
follow-up:
↓ 3
@
15 years ago
- Keywords needs-patch added
- Priority changed from normal to low
- Severity changed from normal to minor
adding to this, if we pass one argument, we should really pass them all as an array.
#3
in reply to:
↑ 2
@
15 years ago
Replying to Denis-de-Bernardy:
adding to this, if we pass one argument, we should really pass them all as an array.
line 745:
$r = wp_parse_args( $args, $defaults );
$r is already the right array.
Note: See
TracTickets for help on using
tickets.
just checking... have you looked into the widget_pages_args hook?