Ticket #1816 (closed defect (bug): wontfix)
Link Category before/after settings nonfunctional
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 1.5.2 |
| Severity: | minor | Keywords: | link category option bg|has-patch bg|dev-feedback |
| Cc: |
Description
There are settings in the site admin panel (Links/Link Categories) for code to insert before and after each link as well as between the link and the description. While the option is properly inserted into the database, it is never used by get_links_list() in wp-includes/links.php .
The solution is simple - modify the db query in get_links_list() to ask for the three additional fields:
$cats = $wpdb->get_results("
SELECT DISTINCT link_category, cat_name, show_images,
show_description, show_rating, show_updated, sort_order,
sort_desc, list_limit,
text_before_link, text_after_link, text_after_all
FROM `$wpdb->links` ...
and then use those values in the call to get_links:
get_links($cat['link_category'],
$cat['text_before_link'],
$cat['text_after_all'],
$cat['text_after_link'], ...
Attachments
Change History
markjaquith — 6 years ago
-
attachment
links.php.diff
added
comment:1
markjaquith — 6 years ago
- Keywords bg|has-patch bg|dev-feedback added
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
- Milestone set to 1.6
This patch should do the trick. Thanks!
comment:2
MikeLittle — 6 years ago
I can confirm this patch (applies fine against 2981) fixes the problem. Mike
get_links_list() purposefully hard codes a list. If we honored before and after we would probably break most templates that use get_links_list().

Patch for wp 1.6 SVN