Ticket #8733: 8733.diff

File 8733.diff, 1.4 KB (added by wojtek.szkutnik, 3 years ago)
Line 
1Index: wp-includes/bookmark-template.php
2===================================================================
3--- wp-includes/bookmark-template.php   (revision 15490)
4+++ wp-includes/bookmark-template.php   (working copy)
5@@ -28,6 +28,8 @@
6  *             available.
7  * 'show_name' - Default is 0 (integer). Whether to show link name if
8  *             available.
9+ * 'show_feed' - Default is 0 (integer). Whether to show feed link if
10+ *              available.
11  * 'before' - Default is '<li>' (string). The html or text to prepend to each
12  *             bookmarks.
13  * 'after' - Default is '</li>' (string). The html or text to append to each
14@@ -53,7 +55,8 @@
15                'show_updated' => 0, 'show_description' => 0,
16                'show_images' => 1, 'show_name' => 0,
17                'before' => '<li>', 'after' => '</li>', 'between' => "\n",
18-               'show_rating' => 0, 'link_before' => '', 'link_after' => ''
19+               'show_feed' => 0, 'show_rating' => 0,
20+               'link_before' => '', 'link_after' => ''
21        );
22 
23        $r = wp_parse_args( $args, $defaults );
24@@ -121,7 +124,10 @@
25 
26                if ( $show_description && '' != $desc )
27                        $output .= $between . $desc;
28-
29+                       
30+               if ( $show_feed )
31+                       $output .= $between .  "<a class='feedlink' href='" .  sanitize_bookmark_field('link_feed', $bookmark->link_rss, $bookmark->link_id, 'display') . "'>feed</a>";
32+                       
33                if ( $show_rating )
34                        $output .= $between . sanitize_bookmark_field('link_rating', $bookmark->link_rating, $bookmark->link_id, 'display');
35