Index: wp-includes/template-functions-bookmarks.php
===================================================================
--- wp-includes/template-functions-bookmarks.php	(revision 3645)
+++ wp-includes/template-functions-bookmarks.php	(working copy)
@@ -283,20 +283,46 @@
 		parse_str($args, $r);
 
 	$defaults = array('orderby' => 'name', 'order' => 'ASC', 'limit' => -1, 'category' => -1,
-		'category_name' => '', 'hide_invisible' => 1, 'show_updated' => 0);
+		'category_name' => '', 'hide_invisible' => 1, 'show_updated' => 0, 'include' => '', 'exclude' => '');
 	$r = array_merge($defaults, $r);
 	extract($r);
 
+	if ( !empty($include) ) { 
+	$exclude = '';
+	$category = -1;
+	$category_name = '';
+	}
+
 	$exclusions = '';
 	if ( !empty($exclude) ) {
 		$exlinks = preg_split('/[\s,]+/',$r['exclude']);
 		if ( count($exlinks) ) {
 			foreach ( $exlinks as $exlink ) {
+				if (empty($exclusions))
+					$exclusions = ' AND ( link_id <> ' . intval($exlink) . ' ';
+				else
 				$exclusions .= ' AND link_id <> ' . intval($exlink) . ' ';
 			}
 		}
 	}
+	if (!empty($exclusions)) 
+		$exclusions .= ')';
 
+	$inclusions = '';
+	if ( !empty($include) ) {
+		$inclinks = preg_split('/[\s,]+/',$r['include']);
+		if ( count($inclinks) ) {
+			foreach ( $inclinks as $inclink ) {
+				if (empty($inclusions))
+					$inclusions = ' AND ( link_id = ' . intval($inclink) . ' ';
+				else
+					$inclusions .= ' OR link_id = ' . intval($inclink) . ' ';
+			}
+		}
+	}
+	if (!empty($inclusions)) 
+		$inclusions .= ')';
+		
 	if ( ! empty($category_name) ) {
 		if ( $cat_id = $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE cat_name='$category_name' LIMIT 1") )
 			$category = $cat_id;
@@ -341,6 +367,7 @@
 		$visible = "AND link_visible = 'Y'";
 
 	$query = "SELECT * $length $recently_updated_test $get_updated FROM $wpdb->links $join WHERE 1=1 $visible $category_query";
+	$query .= " $exclusions $inclusions";
 	$query .= " ORDER BY $orderby $order";
 	if ($limit != -1)
 		$query .= " LIMIT $limit";
