Opened 8 years ago
Closed 7 years ago
#1486 closed defect (bug) (fixed)
get_pages() filtering by page author [PATCH]
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | Template | Version: | 1.6 |
| Severity: | normal | Keywords: | bg|has-patch bg|commit |
| Cc: |
Description
Attached is a patch that supports a new '&authors=' parameter to get_pages() and wp_list_pages(). It accepts a comma-seperated list of author IDs or author login names (and you can mix-and-match names and IDs in the parameter).
Examples:
wp_list_pages('authors=1,2');
get_pages('authors=admin,skippy,ryan');
I think this will be an extremely useful addition for multi-author blogs, as it allows better control over templating.
Attachments (3)
Change History (8)
comment:2
davidhouse
— 7 years ago
- Keywords bg|commit bg|needs-testing added
Might as well commit this, but it would be nice if someone could test it first.
comment:4
westi
— 7 years ago
- Component changed from General to Template
- Keywords bg|2nd-opinion bg|needs-testing removed
- Milestone set to 2.1
I have updated skippys patch to run against current trunk:
- Removed the inline query and used a builtin db abstraction functions
- Removed the use of the non-existant next inside the foreach loop
add '&authors=' parameter to get_pages() and wp_list_pages()