Make WordPress Core

Ticket #8733: 8733.patch

File 8733.patch, 1.2 KB (added by pdowney, 17 years ago)

patch of wp-includes/bookmark-template.php - _walk_bookmarks function

  • (a) bookmark-template.php vs. (b) 8733

    a b  
    2828 *              available.
    2929 * 'show_name' - Default is 1 (integer). Whether to show link name if
    3030 *              available.
     31 * 'show_feed' - Default is 0 (integer). Whether to show feed link if
     32 *              available.
    3133 * 'before' - Default is '<li>' (string). The html or text to prepend to each
    3234 *              bookmarks.
    3335 * 'after' - Default is '</li>' (string). The html or text to append to each
    function _walk_bookmarks($bookmarks, $ar 
    5355                'show_updated' => 0, 'show_description' => 0,
    5456                'show_images' => 1, 'show_name' => 0,
    5557                'before' => '<li>', 'after' => '</li>', 'between' => "\n",
     58                'show_feed' => 0,
    5659                'show_rating' => 0, 'link_before' => '', 'link_after' => ''
    5760        );
    5861
    function _walk_bookmarks($bookmarks, $ar 
    121124                if ( $show_description && '' != $desc )
    122125                        $output .= $between . $desc;
    123126
     127                if ($show_feed) {
     128                        $output .= $between .  "<a class='feedlink' href='" .  sanitize_bookmark_field('link_feed', $bookmark->link_rss, $bookmark->link_id, 'display') . "'>feed</a>";
     129                }
     130
    124131                if ($show_rating) {
    125132                        $output .= $between . sanitize_bookmark_field('link_rating', $bookmark->link_rating, $bookmark->link_id, 'display');
    126133                }