Make WordPress Core

Opened 17 years ago

Closed 8 years ago

Last modified 8 years ago

#4601 closed enhancement (wontfix)

Add extra formatting parameters to wp_list_categories

Reported by: otto42's profile Otto42 Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2.1
Component: Taxonomy Keywords: needs-refresh 2nd-opinion
Focuses: template Cc:

Description

The wp_list_categories() function should have the following parameters added to it:
before, after, between, show_description. These would behave much the same as they do in the wp_list_bookmarks() function.

Request for this sort of functionality was made here: http://wordpress.org/support/topic/124374

I think it's a good idea as it further standardizes the wp_list_* functions.

Implementing this would require changes to the wp_list_categories() function, as well as changes to the Walker_Category class to actually perform the output.

Attachments (2)

4601 patch.patch (1.4 KB) - added by thee17 16 years ago.
adds $before $after $link_before and $link_after
4601.diff (2.5 KB) - added by wojtek.szkutnik 14 years ago.

Download all attachments as: .zip

Change History (20)

#1 @thee17
16 years ago

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

I'm gonna write a patch tomorrow for this.

@thee17
16 years ago

adds $before $after $link_before and $link_after

#2 @thee17
16 years ago

If I could just figure out how to work around the li and ul problem like bookmarks does it then $style could be sent to pasture.

Line 289

$output = '';
	if ( $title_li && 'list' == $style )
			$output = '<li class="categories">' . $r['title_li'] . '<ul>';

Line 314

	if ( $title_li && 'list' == $style )
		$output .= '</ul></li>';

#3 @thee17
16 years ago

  • Keywords has-patch dev-feedback 2nd-opinion added

#4 @thee17
16 years ago

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

#5 @thee17
16 years ago

  • Milestone changed from 2.5 to 2.6

#6 @thee17
16 years ago

  • Milestone changed from 2.6 to 2.7
  • Owner changed from anonymous to thee17
  • Status changed from new to assigned

#7 @thee17
16 years ago

  • Owner thee17 deleted
  • Status changed from assigned to new

#8 @matt
16 years ago

  • Milestone changed from 2.7 to 2.9

#9 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added; has-patch dev-feedback 2nd-opinion removed

someone should consolidate the various wp_list_* tickets into one per item type, and write a big patch.

patch is broken

#10 @Denis-de-Bernardy
15 years ago

  • Milestone changed from 2.9 to Future Release

#11 @wojtek.szkutnik
14 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords has-patch needs-testing gsoc added; needs-patch removed

Most of other wp_list_* tickets have been already taken care of

#12 @nacin
10 years ago

  • Component changed from Template to Taxonomy
  • Focuses template added

#13 @chriscct7
9 years ago

  • Keywords needs-refresh added; gsoc removed
  • Priority changed from low to normal

#14 @Mte90
8 years ago

  • Keywords 2nd-opinion added; has-patch needs-testing removed

I've looked that patch that add that content before and after but I can see that in the meanwhile that function have the style parameter that able the user to choose if he wants a html list or not.

So I think that we can consider obsolete.

#15 @thee17
8 years ago

Nowadays people use the menu system for this. I agree that it is obsolete, and not worth changing. I suggest closing as won't fix.

#16 @Mte90
8 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

#17 @netweb
8 years ago

  • Milestone Future Release deleted

#18 @jhned
8 years ago

@thee17, could you define what you mean by "the menu system?" I'm still using this function myself, and it'd be nice if the args matched wp_list_pages, so that I don't have to create a custom walker to match the functionality.

Note: See TracTickets for help on using tickets.