Make WordPress Core

Ticket #1042: get_links-fix.txt

File get_links-fix.txt, 1.8 KB (added by Kings, 21 years ago)
Line 
1Around line 485 find:
2
3        $cats = $wpdb->get_results("
4                SELECT DISTINCT link_category, cat_name, show_images,
5                        show_description, show_rating, show_updated, sort_order,
6                        sort_desc, list_limit
7                FROM `$wpdb->links`
8                LEFT JOIN `$wpdb->linkcategories` ON (link_category = cat_id)
9                WHERE link_visible =  'Y'
10                        AND list_limit <> 0
11                ORDER BY $cat_order $direction ", ARRAY_A);
12
13And replace by:
14
15        $cats = $wpdb->get_results("
16                SELECT DISTINCT link_category, cat_name, show_images,
17                        show_description, show_rating, show_updated, sort_order,
18                        sort_desc, list_limit, text_before_link, text_after_link, text_after_all
19                FROM `$wpdb->links`
20                LEFT JOIN `$wpdb->linkcategories` ON (link_category = cat_id)
21                WHERE link_visible =  'Y'
22                        AND list_limit <> 0
23                ORDER BY $cat_order $direction ", ARRAY_A);
24
25Around line 506 find:
26
27                       get_links($cat['link_category'],
28                                '<li>',"</li>","\n",
29                                bool_from_yn($cat['show_images']),
30                                $orderby,
31                                bool_from_yn($cat['show_description']),
32                                bool_from_yn($cat['show_rating']),
33                                $cat['list_limit'],
34                                bool_from_yn($cat['show_updated']));
35
36And replace by:
37
38                        get_links($cat['link_category'],
39                                $cat['text_before_link'], $cat['text_after_all'], $cat['text_after_link'],
40                                bool_from_yn($cat['show_images']),
41                                $orderby,
42                                bool_from_yn($cat['show_description']),
43                                bool_from_yn($cat['show_rating']),
44                                $cat['list_limit'],
45                                bool_from_yn($cat['show_updated']));