Skip to content

Commit

Permalink
Make sure bookmarks widget has a wrapper <ul> for list items when the…
Browse files Browse the repository at this point in the history
…re's no title and 'categorize' is set to 'false'.

git-svn-id: http://svn.locallylost.com/themes/hybrid-core/trunk@980 dba0f204-706d-4bc1-bc29-8b92e0485636
  • Loading branch information
greenshady committed Feb 10, 2012
1 parent aebd7bb commit 7380845
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/widget-bookmarks.php
Expand Up @@ -96,7 +96,13 @@ function widget( $args, $instance ) {
);

/* Output the bookmarks widget. */
echo str_replace( array( "\r", "\n", "\t" ), '', wp_list_bookmarks( $args ) );
$bookmarks = str_replace( array( "\r", "\n", "\t" ), '', wp_list_bookmarks( $args ) );

/* If no title is given and the bookmarks aren't categorized, add a wrapper <ul>. */
if ( empty( $args['title_li'] ) && false === $args['categorize'] )
$bookmarks = '<ul class="xoxo bookmarks">' . $bookmarks . '</ul>';

echo $bookmarks;
}

/**
Expand Down

0 comments on commit 7380845

Please sign in to comment.