From 586e66052907f93919ee5fdb74f682a8d76b961b Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 13 Oct 2008 22:43:05 +0000 Subject: [PATCH] Add show_name to wp_list_bookmarks(). Props Otto42. fixes #7847 git-svn-id: http://svn.automattic.com/wordpress/trunk@9139 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/bookmark-template.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index fa5a20c18..5262bd1df 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -26,6 +26,8 @@ * of the bookmark. * 'show_images' - Default is 1 (integer). Whether to show link image if * available. + * 'show_name' - Default is 1 (integer). Whether to show link name if + * available. * 'before' - Default is '
  • ' (string). The html or text to prepend to each * bookmarks. * 'after' - Default is '
  • ' (string). The html or text to append to each @@ -45,8 +47,8 @@ function _walk_bookmarks($bookmarks, $args = '' ) { $defaults = array( 'show_updated' => 0, 'show_description' => 0, - 'show_images' => 1, 'before' => '
  • ', - 'after' => '
  • ', 'between' => "\n", + 'show_images' => 1, 'show_name' => 1, + 'before' => '
  • ', 'after' => '
  • ', 'between' => "\n", 'show_rating' => 0 ); @@ -97,9 +99,9 @@ function _walk_bookmarks($bookmarks, $args = '' ) { $output .= "link_image\" $alt $title />"; else // If it's a relative path $output .= "link_image\" $alt $title />"; - } else { - $output .= $name; } + + if ($show_name) $output .= $name; $output .= '';