Opened 17 years ago
Closed 17 years ago
#10034 closed enhancement (fixed)
wp_list_pages(): pass args $r to apply_filters()
| Reported by: | antonylesuisse | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 2.9 |
| Component: | Template | Version: | 2.8 |
| Severity: | minor | Keywords: | has-patch commit |
| Cc: | Focuses: |
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)
#2
follow-up:
↓ 3
@
17 years ago
- Keywords needs-patch added
- Priority normal → low
- Severity normal → minor
adding to this, if we pass one argument, we should really pass them all as an array.
#3
in reply to: ↑ 2
@
17 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
just checking... have you looked into the widget_pages_args hook?