WordPress.org

Make WordPress Core

Changeset 12816


Ignore:
Timestamp:
01/24/10 02:07:13 (4 years ago)
Author:
dd32
Message:

Fix Tag paging number whilst searching. Fixes #11989

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-tags.php

    r12733 r12816  
    201201$tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); // Old filter 
    202202 
     203if ( !empty($_GET['s']) ) 
     204    $total_terms = count( get_terms( $taxonomy, array( 'search' => trim(stripslashes($_GET['s'])), 'number' => 0, 'hide_empty' => 0 ) ) ); 
     205else 
     206    $total_terms = wp_count_terms($taxonomy); 
     207 
    203208$page_links = paginate_links( array( 
    204209    'base' => add_query_arg( 'pagenum', '%#%' ), 
     
    206211    'prev_text' => __('«'), 
    207212    'next_text' => __('»'), 
    208     'total' => ceil(wp_count_terms($taxonomy) / $tags_per_page), 
     213    'total' => ceil($total_terms / $tags_per_page), 
    209214    'current' => $pagenum 
    210215)); 
     
    311316    <label for="description"><?php _e('Description') ?></label> 
    312317    <textarea name="description" id="description" rows="5" cols="40"></textarea> 
    313     <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p> 
     318    <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p> 
    314319</div> 
    315320 
Note: See TracChangeset for help on using the changeset viewer.