Opened 5 years ago

Closed 4 years ago

#5654 closed enhancement (invalid)

Add echo parameter to wp_get_archives

Reported by: danielsummers Owned by: westi
Priority: normal Milestone:
Component: Template Version: 2.5
Severity: minor Keywords: has-patch needs-testing
Cc:

Description

I have modified the wp_get_archives template tag to add the echo parameter, similar to the way wp_get_categories works. This will allow for manipulation of the results. (I made this change to support a tiered archives, with a year at one level and the months below. Allowing me to retrieve the text lets me put the tree together.) Since I had to change it, I thought I would submit it, to see if it would be useful to put it into the core. I've attached a diff - the change was made against the 2.3.2 released version of general-template.php.

Attachments (3)

diff.txt (1.6 KB) - added by danielsummers 5 years ago.
Diff of echo parameter enhancement
5654.diff (3.4 KB) - added by thee17 5 years ago.
Diff based on trac
5654_2point5.diff (2.6 KB) - added by danielsummers 5 years ago.
Updated diff - based on 2.5, removed extra conditionals per ryan's suggestion

Download all attachments as: .zip

Change History (12)

Diff of echo parameter enhancement

thee175 years ago

Diff based on trac

  • Keywords has-patch added
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

comment:3   ryan5 years ago

Lose all of the conditionals and just do one conditional at the end that either echoes or returns $output.

  • Milestone changed from 2.5 to 2.6

Updated diff - based on 2.5, removed extra conditionals per ryan's suggestion

Let me know if I should commit it through svn, using my login here, or if putting the diff here is sufficient.

Putting the diff here is sufficient.

Only the core devs have commit access to svn. They'll commit it when they look at the patch and deem it good enough.

  • Keywords needs-testing added
  • Component changed from General to Template
  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from accepted to closed

seems fixed enough

Note: See TracTickets for help on using tickets.