Changeset 11140
- Timestamp:
- 04/30/2009 04:51:45 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/categories.php
r11103 r11140 167 167 $cats_per_page = apply_filters('edit_categories_per_page', $cats_per_page); 168 168 169 if ( !empty($_GET['s']) ) 170 $num_cats = count(get_categories(array('hide_empty' => 0, 'search' => $_GET['s']))); 171 else 172 $num_cats = wp_count_terms('category'); 173 169 174 $page_links = paginate_links( array( 170 175 'base' => add_query_arg( 'pagenum', '%#%' ), … … 172 177 'prev_text' => __('«'), 173 178 'next_text' => __('»'), 174 'total' => ceil( wp_count_terms('category')/ $cats_per_page),179 'total' => ceil($num_cats / $cats_per_page), 175 180 'current' => $pagenum 176 181 )); -
trunk/wp-includes/taxonomy.php
r11129 r11140 663 663 } 664 664 $cache_key = "get_terms:$key:$last_changed"; 665 666 if ( $cache = wp_cache_get( $cache_key, 'terms' )) {667 $ terms= apply_filters('get_terms', $cache, $taxonomies, $args);668 return $ terms;665 $cache = wp_cache_get( $cache_key, 'terms' ); 666 if ( false !== $cache ) { 667 $cache = apply_filters('get_terms', $cache, $taxonomies, $args); 668 return $cache; 669 669 } 670 670 … … 781 781 782 782 if ( empty($terms) ) { 783 $cache[ $key ] = array(); 784 wp_cache_set( 'get_terms', $cache, 'terms' ); 783 wp_cache_add( $cache_key, array(), 'terms' ); 785 784 $terms = apply_filters('get_terms', array(), $taxonomies, $args); 786 785 return $terms;
Note: See TracChangeset
for help on using the changeset viewer.