Opened 16 years ago
Closed 16 years ago
#4053 closed enhancement (worksforme)
Function Style Parameters for wp_list_bookmarks
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | normal | Version: | |
Component: | Optimization | Keywords: | links, bookmarks, wp_list_bookmarks, linklists |
Focuses: | Cc: |
Description
It's currently impossible to legitimately pass CSS classes as part of the "before" and "after" part of wp_list_bookmarks, as they need to be enclosed in quotes and it is impossible to pass quotes through query style parameters. Interestingly, passing unescaped double quotes actually works to the intended effect in the browser, but creates severely messed up markup that will never validate. So something like this won't work in the current version -
wp_list_bookmarks('categorize=1&category=40&title_li&title_before=<h3> &title_after</h3>&category_before=<div class="linkcategory-abc">&category_after=</div> &before=<li class="linkdesign-xyz">&after=</li>&show_images=1&show_description=0&orderby=url');?>
it seems to me this is limiting the usability of wp_list_bookmarks as a "one stop shop" to display custom link blocks.
Change History (1)
Note: See
TracTickets for help on using
tickets.
You can pass a named array instead. Any place in WP where you pass with query string style, you should also be able to pass a named array. If you can't, that's a bug.