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

WordPress Trac noreply at wordpress.org
Mon Sep 28 23:16:33 UTC 2015


#34058: Proposal: wp_get_archives_object() function
-----------------------------+------------------------------
 Reporter:  davetgreen       |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:  4.3.1
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by pathartl):

 Noticed this too. My major problem is that both `wp_get_archives()`, like
 `wp_get_attachment_image()` returns markup while functions like
 `wp_get_current_user()` or `wp_get_theme()` return objects. I don't think
 that an additional parameter to `wp_get_archives()` is the answer. How
 would the arguments translate into the object? If they don't, then what's
 the point of having arguments?

 I think it'd be better to roll it into its own function. I think from a
 naming standpoint `wp_get_archives()` would return the object and
 `wp_get_archives_list()` would return the markup, but there's some obvious
 compatibility issues with that. So I guess what I'm saying is I'm +1 for
 breaking it off into it's own function.

 All that being said, am I wrong in assuming that there's no preexisting
 archive object? Is this another thing to be taken into consideration?

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


More information about the wp-trac mailing list