Make WordPress Core

Ticket #7847: bookmark-name.diff

File bookmark-name.diff, 1.3 KB (added by Otto42, 17 years ago)

Add show_name option to wp_list_bookmarks capabilities.

  • wp-includes/bookmark-template.php

     
    2626 *              of the bookmark.
    2727 * 'show_images' - Default is 1 (integer). Whether to show link image if
    2828 *              available.
     29 * 'show_name' - Default is 1 (integer). Whether to show link name if
     30 *              available.
    2931 * 'before' - Default is '<li>' (string). The html or text to prepend to each
    3032 *              bookmarks.
    3133 * 'after' - Default is '</li>' (string). The html or text to append to each
     
    4547function _walk_bookmarks($bookmarks, $args = '' ) {
    4648        $defaults = array(
    4749                'show_updated' => 0, 'show_description' => 0,
    48                 'show_images' => 1, 'before' => '<li>',
    49                 'after' => '</li>', 'between' => "\n",
     50                'show_images' => 1, 'show_name' => 1,
     51                'before' => '<li>', 'after' => '</li>', 'between' => "\n",
    5052                'show_rating' => 0
    5153        );
    5254
     
    9799                                $output .= "<img src=\"$bookmark->link_image\" $alt $title />";
    98100                        else // If it's a relative path
    99101                                $output .= "<img src=\"" . get_option('siteurl') . "$bookmark->link_image\" $alt $title />";
    100                 } else {
    101                         $output .= $name;
    102102                }
     103               
     104                if ($show_name) $output .= $name;
    103105
    104106                $output .= '</a>';
    105107