wp_list_bookmarks should always show name if there is no image to show. Props mtdewvirus. fixes #7981

git-svn-id: http://svn.automattic.com/wordpress/trunk@9366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-10-27 16:23:07 +00:00
parent 8b07a301c5
commit 611bbf9955

View File

@ -51,7 +51,7 @@
function _walk_bookmarks($bookmarks, $args = '' ) {
$defaults = array(
'show_updated' => 0, 'show_description' => 0,
'show_images' => 1, 'show_name' => 1,
'show_images' => 1, 'show_name' => 0,
'before' => '<li>', 'after' => '</li>', 'between' => "\n",
'show_rating' => 0, 'link_before' => '', 'link_after' => ''
);
@ -105,10 +105,12 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
$output .= "<img src=\"$bookmark->link_image\" $alt $title />";
else // If it's a relative path
$output .= "<img src=\"" . get_option('siteurl') . "$bookmark->link_image\" $alt $title />";
if ($show_name) $output .= $name;
} else {
$output .= $name;
}
if ($show_name) $output .= $name;
$output .= $link_after;
$output .= '</a>';
@ -249,4 +251,4 @@ function wp_list_bookmarks($args = '') {
echo $output;
}
?>
?>