Opened 18 years ago
Last modified 6 months ago
#7231 accepted enhancement
wp_link_pages: option next_and_number
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Posts, Post Types | Keywords: | has-test-info has-patch |
| Focuses: | template | Cc: |
Description
with the next_or_number option of the wp_link_pages() function, it would be nice to have the option to use both.
it gives the user the opportunity to easily go to the next/previous page, without loosing the other option of going immediately to a certain page
example:
next 1 2 3 4 5 6 previous
Attachments (11)
Change History (27)
#3
@
17 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from 2.8 to Future Release
broken patch
#7
@
16 years ago
- Keywords has-patch added; needs-patch removed
- Owner changed from anonymous to sorich87
- Status changed from new to accepted
Here is a new patch.
#10
@
10 years ago
Ok. I've reworked this patch and uploaded 7231.2.patch
There appears to be no default styling in Twenty Fourteen, TwentyFifteen or TwentySixteen accommodate for the "Next" and "Previous" links created by this function before this patch. As such in the course of creating this patch I manually added styling to those themes for testing. Samples of what I saw for these themes have also been uploaded.
My patch also adds classes, "next" and "previous" to the relevant links to allow for them to be styled. See below.
.page-links .previous, .page-links .next { width: auto; }
I don't know how best to address this within the patch. So, my guess is to open an additional ticket for that styling to be considered for inclusion.
And now, the parameter "next_or_number" now is mis-named as the existing two options now included a third. I suspect we would keep the parameter name for the time being and/or introduce something like "pagination_style" going forward. I have left the parameter name as is for the time being.
#12
@
10 years ago
In the "styling issue" images I have highlighted the white on white text to make it show - for the purposes of demonstrating the issue.
This ticket was mentioned in Slack in #core-test by sirlouen. View the logs.
6 months ago
#15
@
6 months ago
- Keywords needs-patch has-test-info added; has-patch needs-refresh needs-testing removed
It seems this report lost all the momentum some years ago. It's still valid though and it seems it was already approved back in the day.
This needs a massive refresh as many things have changed since then. If anyone is willing to retake the challenge of building this little enhancement, I will set it back as needs-patch because a simple refresh is not enough, it requires a full rebuild almost from scratch (although some things from the previous patches are still valid and could be useful).
#16
@
6 months ago
- Keywords has-patch added; needs-patch removed
@SirLouen I’ve created a new patch. You can test it by adding the following snippet:
'next_or_number' => 'next_and_number',
inside the wp_link_pages function.
I’ve tested it with the Twenty Twenty theme and attached screenshots for reference. I’d appreciate your suggestions and code review. If everything looks good, I’ll go ahead and create a PR as well.
patch to add this functionality (applies to /trunk/)