Changeset 6670
- Timestamp:
- 01/28/2008 05:21:14 PM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-tags.php
r6660 r6670 87 87 <h2><?php _e('Tags') ?> </h2> 88 88 <?php endif; ?> 89 90 <form name="searchform" id="searchform" action="" method="get"> 91 <input type="text" name="s" id="s" value="<?php echo attribute_escape( stripslashes( $_GET[ 's' ]) ); ?>" size="17" /> 92 <input type="submit" id="post-query-submit" value="<?php _e('Search Tags'); ?>" class="button" /> 93 </form> 94 <br style="clear:both;" /> 95 96 89 97 <table class="widefat"> 90 98 <thead> … … 102 110 $tagsperpage = 20; 103 111 } 104 $count = tag_rows( $pagenum, $tagsperpage ); 112 $searchterms = trim( $_GET['s'] ); 113 114 $count = tag_rows( $pagenum, $tagsperpage, $searchterms ); 105 115 ?> 106 116 </tbody> -
trunk/wp-admin/includes/template.php
r6660 r6670 262 262 // assuming M tags displayed at a time on the page 263 263 // Returns the number of tags displayed 264 function tag_rows( $page = 0, $pagesize = 20 ) {264 function tag_rows( $page = 0, $pagesize = 20, $searchterms = '' ) { 265 265 266 266 // Get a page worth of tags 267 267 $start = $page * $pagesize; 268 $tags = get_terms( 'post_tag', "offset=$start&number=$pagesize&hide_empty=0" ); 268 269 $args = array('offset' => $start, 'number' => $pagesize, 'hide_empty' => 0); 270 271 if ( !empty( $searchterms ) ) 272 $args['name__like'] = $searchterms; 273 274 $tags = get_terms( 'post_tag', $args ); 269 275 270 276 // convert it to table rows
Note: See TracChangeset
for help on using the changeset viewer.