[wp-trac] [WordPress Trac] #33860: Loop helpers function

WordPress Trac noreply at wordpress.org
Tue Sep 22 23:05:43 UTC 2015


#33860: Loop helpers function
-------------------------------------------------+-------------------------
 Reporter:  sebastian.pisula                     |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Query                                |  Review
 Severity:  normal                               |     Version:  4.3
 Keywords:  has-patch needs-unit-tests 2nd-      |  Resolution:
  opinion good-first-bug                         |     Focuses:  template
-------------------------------------------------+-------------------------
Changes (by johnbillion):

 * keywords:   => has-patch needs-unit-tests 2nd-opinion good-first-bug


Comment:

 In the past I've had the need to determine first/last/odd/even posts in
 the loop.

 I think these functions need better names, and we'll need to decide
 whether first/last means the first/last in the current loop or the
 first/last in the current loop's query. Might be worth taking a look at
 some theme frameworks to see if there's prior art.

 These will of course need unit tests.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33860#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list