WordPress.org

Make WordPress Core

Opened 15 months ago

Last modified 3 months ago

#23260 new enhancement

Enhancement for paginate_links(); to include in wordpress core

Reported by: Danielx64 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.5
Component: General Keywords:
Focuses: template Cc:

Description (last modified by SergeyBiryukov)

Hello all,

I asked a question over at theme-reviewers [1] and one of the answers
(and a helpful one) was that any improvement/s that I find could be
push back into the core.

The first thing that I would like to see is a "Page x of x" and make
it a link to that people can click on it and enter the page munber
that they want to go to then they can go stright to that page.

Now I did find some code to do it but for some reasons I don't feel
that it the right way of doing it[2].

The next thing that I'm looking at is if we can have it so that we can
set our own style class or even replace tags altogether. Right now the
only way that I can do this (as far as I know) is by editing core code
or copy and paste code from care into my function.php file and rename
things.

I see that with the sidebar callback, I can set before and after tags
for title and other things and that to the theme author gives us alot
of control over layout and how we can style things.

The reasons why the above improvements should be included in core:

A: No need to create custom functions
B: Don't need to install extra plugin just to get the "Page x of x"
function or to create a hacked paginate_links function.
C: It gives theme developers more control over style without alot of
extra coding and if they don't want something they can disable it
(example "Page x of x")
D: It means that if wordpress devs change the paginate_links function
theme authors don't need to update their custom functions [see A]

Regards,
Daniel Fenn

[1] http://lists.wordpress.org/pipermail/theme-reviewers/2013-January/011488.html
[2] http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin/

Change History (4)

comment:1 SergeyBiryukov15 months ago

  • Description modified (diff)

comment:2 follow-up: mdgl15 months ago

Related: #16973, #16468

I suspect it's about time we did something to sort out the lower level helper functions here in core. Plugins (wp-pagenavi, wp-paginate, etc.) can continue to offer further support to themes for displaying fancy pagination.

I had planned to offer a new patch around 3.6 timeframe but am too busy and may not get a chance to look at this for a few more weeks. With a bit of encouragement I may be persuaded to take another look :-)

comment:3 in reply to: ↑ 2 Danielx6415 months ago

Replying to mdgl:

Related: #16973, #16468

I suspect it's about time we did something to sort out the lower level helper functions here in core. Plugins (wp-pagenavi, wp-paginate, etc.) can continue to offer further support to themes for displaying fancy pagination.

I had planned to offer a new patch around 3.6 timeframe but am too busy and may not get a chance to look at this for a few more weeks. With a bit of encouragement I may be persuaded to take another look :-)

It would day that it would be worthwhile upgrading thoe functions as I see that they are abit dated and we could have some new features included.

Version 0, edited 15 months ago by Danielx64 (next)

comment:4 nacin3 months ago

  • Component changed from Template to General
  • Focuses template added
Note: See TracTickets for help on using tickets.