Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 16784)
+++ wp-includes/general-template.php	(working copy)
@@ -146,28 +146,27 @@
  * search. To give a few examples of what it can be used for.
  *
  * @since 2.7.0
- * @param boolean $echo Default to echo and not return the form.
+ * @uses do_action() Calls 'get_search_form' action.
+ *
+ * @param string $name The name of the specialised search form.
  */
-function get_search_form($echo = true) {
-	do_action( 'get_search_form' );
+function get_search_form( $name = null) {
+	do_action( 'get_search_form', $name );
 
-	$search_form_template = locate_template('searchform.php');
-	if ( '' != $search_form_template ) {
-		require($search_form_template);
-		return;
-	}
+	$templates = array();
+	if ( isset($name) )
+		$templates[] = "searchform-{$name}.php";
 
-	$form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
-	<div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
-	<input type="text" value="' . get_search_query() . '" name="s" id="s" />
-	<input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
-	</div>
-	</form>';
+	$templates[] = "searchform.php";
 
-	if ( $echo )
-		echo apply_filters('get_search_form', $form);
-	else
-		return apply_filters('get_search_form', $form);
+	// if file doesn't exist, the default search form will be displayed
+	if ('' == locate_template($templates, true))
+		echo '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
+			<div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
+			<input type="text" value="' . get_search_query() . '" name="s" id="s" />
+			<input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
+			</div>
+			</form>';
 }
 
 /**
