Make WordPress Core

Opened 19 years ago

Closed 18 years ago

Last modified 17 years ago

#1816 closed defect (bug) (wontfix)

Link Category before/after settings nonfunctional

Reported by: dachannien's profile Dachannien Owned by: markjaquith's profile markjaquith
Milestone: Priority: normal
Severity: minor Version: 1.5.2
Component: General Keywords: link category option bg|has-patch bg|dev-feedback
Focuses: 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 (1)

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

Download all attachments as: .zip

Change History (7)

@markjaquith
19 years ago

Patch for wp 1.6 SVN

#1 @markjaquith
19 years ago

  • Keywords bg|has-patch bg|dev-feedback added
  • Milestone set to 1.6
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

This patch should do the trick. Thanks!

#2 @MikeLittle
19 years ago

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

#3 @matt
19 years ago

  • Milestone changed from 1.6 to 2.1

#4 @ryan
18 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().

#5 @ryan
18 years ago

  • Resolution set to wontfix
  • Status changed from assigned to closed

#6 @Nazgul
17 years ago

  • Milestone 2.1 deleted
Note: See TracTickets for help on using tickets.