WordPress.org

Make WordPress Core

Opened 7 years ago

Last modified 3 months ago

#4601 new enhancement

Add extra formatting parameters to wp_list_categories

Reported by: Otto42 Owned by:
Milestone: Future Release Priority: low
Severity: normal Version: 2.2.1
Component: Taxonomy Keywords: has-patch needs-testing gsoc
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 6 years ago.
adds $before $after $link_before and $link_after
4601.diff (2.5 KB) - added by wojtek.szkutnik 4 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 thee176 years ago

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

I'm gonna write a patch tomorrow for this.

thee176 years ago

adds $before $after $link_before and $link_after

comment:2 thee176 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>';

comment:3 thee176 years ago

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

comment:4 thee176 years ago

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

comment:5 thee176 years ago

  • Milestone changed from 2.5 to 2.6

comment:6 thee176 years ago

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

comment:7 thee176 years ago

  • Owner thee17 deleted
  • Status changed from assigned to new

comment:8 matt6 years ago

  • Milestone changed from 2.7 to 2.9

comment:9 Denis-de-Bernardy5 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

comment:10 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.9 to Future Release

comment:11 wojtek.szkutnik4 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

wojtek.szkutnik4 years ago

comment:12 nacin3 months ago

  • Component changed from Template to Taxonomy
  • Focuses template added
Note: See TracTickets for help on using tickets.