diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php
index 7794ad09c0..14ed23f24d 100644
--- a/wp-admin/edit-tags.php
+++ b/wp-admin/edit-tags.php
@@ -86,6 +86,14 @@ $messages[5] = __('Tag not updated.');
+
+
+
+
+
@@ -101,7 +109,9 @@ $pagenum = absint( $_GET['pagenum'] );
if( !$tagsperpage || $tagsperpage < 0 ) {
$tagsperpage = 20;
}
-$count = tag_rows( $pagenum, $tagsperpage );
+$searchterms = trim( $_GET['s'] );
+
+$count = tag_rows( $pagenum, $tagsperpage, $searchterms );
?>
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 74df9dc77c..52fde420b2 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -261,11 +261,17 @@ function _tag_row( $tag, $class = '' ) {
// Outputs appropriate rows for the Nth page of the Tag Management screen,
// assuming M tags displayed at a time on the page
// Returns the number of tags displayed
-function tag_rows( $page = 0, $pagesize = 20 ) {
+function tag_rows( $page = 0, $pagesize = 20, $searchterms = '' ) {
// Get a page worth of tags
$start = $page * $pagesize;
- $tags = get_terms( 'post_tag', "offset=$start&number=$pagesize&hide_empty=0" );
+
+ $args = array('offset' => $start, 'number' => $pagesize, 'hide_empty' => 0);
+
+ if ( !empty( $searchterms ) )
+ $args['name__like'] = $searchterms;
+
+ $tags = get_terms( 'post_tag', $args );
// convert it to table rows
$out = '';