WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#5654 closed enhancement (invalid)

Add echo parameter to wp_get_archives

Reported by: danielsummers Owned by: westi
Milestone: Priority: normal
Severity: minor Version: 2.5
Component: Template Keywords: has-patch needs-testing
Focuses: 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 9 years ago.
Diff of echo parameter enhancement
5654.diff (3.4 KB) - added by thee17 9 years ago.
Diff based on trac
5654_2point5.diff (2.6 KB) - added by danielsummers 8 years ago.
Updated diff - based on 2.5, removed extra conditionals per ryan's suggestion

Download all attachments as: .zip

Change History (12)

@danielsummers
9 years ago

Diff of echo parameter enhancement

@thee17
9 years ago

Diff based on trac

#1 @thee17
9 years ago

  • Keywords has-patch added

#2 @westi
9 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

#3 @ryan
9 years ago

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

#4 @ffemtcj
8 years ago

  • Milestone changed from 2.5 to 2.6

@danielsummers
8 years ago

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

#5 @danielsummers
8 years ago

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

#6 @Nazgul
8 years ago

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.

#7 @Denis-de-Bernardy
7 years ago

  • Keywords needs-testing added

#8 @Denis-de-Bernardy
7 years ago

  • Component changed from General to Template

#9 @Denis-de-Bernardy
7 years ago

  • 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.