wp_link_pages isn't fully functional and doesn't include require style information
|Reported by:||brianlayman||Owned by:||SergeyBiryukov|
|Component:||Themes||Keywords:||has-patch 3.6-early needs-codex|
Since paging within a post was dropped as a quicktag, wp_link_pages hasn't been kept up to date with the new themes and has had some major flaws since it was first created. 3.0 has a number of enhancements to this function already, but it still has several flaws. These changes will allow theme authors to use this built in function and have to not overwrite it their themes.
The attached patch is already deployed at b5media. And makes the following changes:
*It allows you to specify the separator for numbers.
*The seperator is now only use between two numbers instead of always being appended to the end of a number.
*The function no longer produces an empty anchor tag when next or prev is not to be displayed. Up to now it left the link in but didn't include any inner text.
*Adds the css classes pag_nav_num, pag_nav_first, pag_nav_current, pag_nav_prev, pag_nav_next & pag_nav_last allowing style specifications for all output conditions
I think this should give everyone the freedom to do whatever they want with this function now while being mostly backwards compatible. I do drop the empty links, but I can't see how anyone would have styled specifically for them any way.
Change History (35)
- Keywords has-patch added; theme wp_linkpages css removed
- Milestone changed from Awaiting Review to Future Release
comment:16 follow-up: ↓ 17 @scribu — 2 years ago
comment:23 @helen — 2 years ago
- Keywords needs-testing added
- Milestone changed from Future Release to 3.6
comment:29 @SergeyBiryukov — 2 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed