Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#3371 closed enhancement (duplicate)

Request for additional $before and $after parameters to wp_list_bookmarks()

Reported by: vdzhuvinov Owned by: westi
Milestone: Priority: low
Severity: trivial Version: 2.0.5
Component: Template Keywords:
Focuses: Cc:


Listing template functions such as get_archives() or get_links()
normally include parameters to include custom HTML code before or after
the listed items.

I need a $before parameter because certain browsers still have poor
support for the CSS :before directive and such a feature would
circumvent this problem.

[suggestion initially posted on the wp-hackers list]

Change History (8)

#1 @vdzhuvinov
15 years ago

  • Type changed from defect to enhancement

#2 @foolswisdom
15 years ago

  • Milestone changed from 2.0.6 to 2.1

Please look at the code in trunk (2.1) as some work as been done in wp_list_bookmarks which I think relates, but I am a novice. Does this relate to ticket:3361 ?

#3 @ryan
15 years ago

Something similar can be done here, yes.

#4 @westi
15 years ago

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

We can easyily add wp_list_bookmarks alike $before and $after support to wp_list_categories in trunk (wp_list_cats is deprecated).

However, for now you may be able to get what you want by adding style=none to the arguments for the function call.

The before and after li tags are toggled by this:


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



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

I'll add the before and after support to my todo list.

#5 @matt
15 years ago

  • Milestone changed from 2.1 to 2.2

#6 @foolswisdom
15 years ago

  • Milestone changed from 2.2 to 2.3

#7 @rob1n
15 years ago

  • Summary changed from Request for additional $before and $after parameters to wp_list_cats() to Request for additional $before and $after parameters to wp_list_bookmarks()

#8 @rob1n
15 years ago

  • Milestone 2.3 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Will be addressed for 2.3 by #3567.

Note: See TracTickets for help on using tickets.