• I’ve patched the resposible functions to insert a separator-string between each bookmark-item.

    Is it possible to add this in newer versions?

    The reason for this is, because I don’t use lists. All bookmarks are displayed in series like “My fav Blog 1, Another fav blog, One more fav blog” …

    Here’s a code-example i’ve used in wp-includes/bookmark-template.php (base-version 2.3.2):

    function _walk_bookmarks($bookmarks, $args = '' ) {
    	$defaults = array(
    		'show_updated' => 0, 'show_description' => 0,
    		'show_images' => 1, 'before' => '<li>',
    		'after' => '</li>', 'between' => "\n",
    		'separator' => ''
    	);
    
    	$r = wp_parse_args( $args, $defaults );
    	extract( $r, EXTR_SKIP );
    
    	$separator_counter = 0;
    	foreach ( (array) $bookmarks as $bookmark ) {
    		$separator_counter++;
    		if ( !isset($bookmark->recently_updated) )
    			$bookmark->recently_updated = false;
    
    		if ($separator_counter != 1)
    			$output .= $separator . $before;
    		else
    			$output .= $before;
    
    ...

    Changes (added code) are in lines 6,12,14,18-20 of this listing.

    Thanks a lot.

    Regards,
    stueckseln.

Viewing 1 replies (of 1 total)
  • Thread Starter stueckseln

    (@stueckseln)

    I’ve noticed that one has added my suggested code – thanks a lot! ??

    But i also noticed, that the code was added to 2.3.2 after official release (it was included in sourcecode four or three days ago). Not that fine… ??

    I wondered that my code was already there in 2.3.2. But this saved me a little work.

Viewing 1 replies (of 1 total)
  • The topic ‘[Request] Separator-String for wp_list_bookmarks()’ is closed to new replies.