WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#3361 closed defect (bug) (fixed)

`wp_list_bookmarks()` Should Be Widget Friendly

Reported by: bryanveloso Owned by: westi
Milestone: 2.1 Priority: high
Severity: normal Version: 2.1
Component: Template Keywords:
Focuses: Cc:

Description

For the sake of widgets everywhere, this should be fixed. It has been a pain in the ass on WordPress.com. Whenever you call wp_list_bookmarks() it shows something like the following:

<li id="linkcat-1356" class="linkcat">
	<h2 class="widgettitle">Blogroll</h2> 
	<ul>
	[...]
	</ul>
</li>

So, when we're working with widgets, it is the only one that doesn't listen to any of the calls given to it (before_widget, after_widget, etc.) So even if a theme author has <div>s instead of a #sidebar <ul>, this <li> will still appear and ruin the styling and semantics. I'm all for standardizing the way that sidebars are done, but an effort like that is pretty much impossible.

Everything should be widget friendly and flexible, this seems to be the only culprit.

(Hopefully all of that made some sort of sense.)

Change History (3)

comment:1 @westi9 years ago

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

I'll take this.

I thought that you could use 'category_before' and 'category_after' to customise those?

These are there defaults:

'category_before' => '<li id="%id" class="%class">'

'category_after' => '</li>'

comment:2 @bryanveloso9 years ago

Well if you can do that, then it's not documented. :) I verified that it needed to be a core change with Matt and Andy, just never got to actually creating the ticket for it. I'll try this though, and see what it does.

comment:3 @matt8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.