[wp-trac] [WordPress Trac] #34058: Proposal: wp_get_archives_object() function

WordPress Trac noreply at wordpress.org
Thu Jan 7 03:42:47 UTC 2016


#34058: Proposal: wp_get_archives_object() function
------------------------------------------+-----------------------------
 Reporter:  davetgreen                    |       Owner:
     Type:  feature request               |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  General                       |     Version:  4.3.1
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:  template
------------------------------------------+-----------------------------

Comment (by boonebgorges):

 Replying to [comment:7 davetgreen]:
 > Apologies for the delay in following up!
 >
 > @boonebgorges @pathartl  I think whilst my need for an archives object
 came about as a result of working with the REST API, I don't think we
 should be specifically catering for the RAPI itself. As long as the
 resulting object can be consumed via either PHP in the theme or via the
 RAPI without '''too much''' hassle then I think we should be ok.
 >
 > So just to summarise, we're looking at creating a new function called
 something along the lines of `wp_get_archives_object` that returns an
 object containing a hierarchical array of objects containing the
 properties I mentioned earlier in the thread. The function also needs to
 have a $flat parameter that switches the output from hierarchical to flat.
 >
 > Does that sound like a decent foundation for a patch moving forward? If
 so, I'd love to give this a shot this month.

 Sure, this seems reasonable. If this is something you want to work on,
 please feel free to drop ideas and sketches in this ticket as you go - I
 can't think of anywhere in WP where we have anything quite like what we're
 describing here, which means you'll be designing something rather new. It
 may be nice to bounce around ideas about architecture and use before you
 have a merge-ready patch to present.

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


More information about the wp-trac mailing list