Ticket #11511: 11511.3.patch
| File 11511.3.patch, 2.1 KB (added by , 17 years ago) |
|---|
-
wp-includes/taxonomy.php
Property changes on: . ___________________________________________________________________ Added: svn:ignore + wp-config.php
1071 1071 function wp_count_terms( $taxonomy, $args = array() ) { 1072 1072 global $wpdb; 1073 1073 1074 $defaults = array('ignore_empty' => false );1074 $defaults = array('ignore_empty' => false, 'search' => ''); 1075 1075 $args = wp_parse_args($args, $defaults); 1076 1076 extract($args, EXTR_SKIP); 1077 1077 1078 1078 $where = ''; 1079 $join = ''; 1080 if ( ! empty( $search ) ) { 1081 $search = like_escape( $search ); 1082 $join = "INNER JOIN $wpdb->terms AS t ON t.term_id = tt.term_id AND t.name LIKE '%%{$search}%%'"; 1083 } 1084 1079 1085 if ( $ignore_empty ) 1080 $where = 'AND count > 0';1086 $where .= 'AND count > 0'; 1081 1087 1082 return $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_taxonomy WHERE taxonomy = %s $where", $taxonomy) );1088 return $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->term_taxonomy AS tt $join WHERE taxonomy = %s $where", $taxonomy) ); 1083 1089 } 1084 1090 1085 1091 /** -
wp-admin/edit-tags.php
200 200 $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page ); 201 201 $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); // Old filter 202 202 203 $searchterms = isset( $_GET['s'] ) ? trim( $_GET['s'] ) : ''; 204 203 205 $page_links = paginate_links( array( 204 206 'base' => add_query_arg( 'pagenum', '%#%' ), 205 207 'format' => '', 206 208 'prev_text' => __('«'), 207 209 'next_text' => __('»'), 208 'total' => ceil( wp_count_terms($taxonomy) / $tags_per_page),210 'total' => ceil( wp_count_terms( $taxonomy, array( 'search' => $searchterms ) ) / $tags_per_page ), 209 211 'current' => $pagenum 210 212 )); 211 213 … … 243 245 <tbody id="the-list" class="list:tag"> 244 246 <?php 245 247 246 $searchterms = isset( $_GET['s'] ) ? trim( $_GET['s'] ) : '';247 248 248 $count = tag_rows( $pagenum, $tags_per_page, $searchterms, $taxonomy ); 249 249 ?> 250 250 </tbody>
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)