Opened 18 years ago
Closed 18 years ago
#6999 closed enhancement (duplicate)
New Filters: previous_posts_link_attributes and next_posts_link_attributes
| Reported by: | JohnLamansky | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Template | Version: | 2.5.1 |
| Severity: | normal | Keywords: | has-patch hook filter previous_posts_link next_posts_link |
| Cc: | Focuses: |
Description
I'm attaching a patch containing some simple enhancements to the previous/next posts link functions.
- New "get_next_posts" and "get_previous_posts" functions (which are non-echo versions of "next_posts" and "previous_posts"). The rationale behind this is that a plain URL would probably need to be returned for PHP use more often than echo'd.
- New "next_posts_link" and "previous_posts_link" filters -- useful for adding class, rel, or title attributes to the previous/next post links.
Attachments (2)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
A less-convoluted way of allowing attributes; use this instead.