Ticket #1816 (closed defect (bug): wontfix)

Opened 6 years ago

Last modified 5 years ago

Link Category before/after settings nonfunctional

Reported by: Dachannien Owned by: markjaquith
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

links.php.diff Download (1005 bytes) - added by markjaquith 6 years ago.
Patch for wp 1.6 SVN

Change History

Patch for wp 1.6 SVN

  • 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!

I can confirm this patch (applies fine against 2981) fixes the problem. Mike

comment:3   matt6 years ago

  • Milestone changed from 1.6 to 2.1

comment:4   ryan6 years ago

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().

comment:5   ryan5 years ago

  • Status changed from assigned to closed
  • Resolution set to wontfix
  • Milestone 2.1 deleted
Note: See TracTickets for help on using tickets.