WordPress.org

Make WordPress Core

Ticket #11511: 11511.patch

File 11511.patch, 1.1 KB (added by hakre, 4 years ago)

Display problem fix

  • wp-admin/edit-tags.php

     
    190190$tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page ); 
    191191$tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); // Old filter 
    192192 
     193$searchterms = isset($_GET['s']) ? trim($_GET['s']) : ''; 
     194if ( strlen($searchterms) ) 
     195        $total = 1; 
     196else 
     197        $total = ceil(wp_count_terms($taxonomy) / $tags_per_page); 
     198 
    193199$page_links = paginate_links( array( 
    194200        'base' => add_query_arg( 'pagenum', '%#%' ), 
    195201        'format' => '', 
    196202        'prev_text' => __('«'), 
    197203        'next_text' => __('»'), 
    198         'total' => ceil(wp_count_terms($taxonomy) / $tags_per_page), 
     204        'total' => $total, 
    199205        'current' => $pagenum 
    200206)); 
    201207 
     
    231237        </tfoot> 
    232238 
    233239        <tbody id="the-list" class="list:tag"> 
    234 <?php 
    235  
    236 $searchterms = isset( $_GET['s'] ) ? trim( $_GET['s'] ) : ''; 
    237  
    238 $count = tag_rows( $pagenum, $tags_per_page, $searchterms, $taxonomy ); 
    239 ?> 
     240<?php $count = tag_rows( $pagenum, $tags_per_page, $searchterms, $taxonomy ); ?> 
    240241        </tbody> 
    241242</table> 
    242243