WordPress.org

Make WordPress Core

Changeset 10909


Ignore:
Timestamp:
04/10/09 21:52:57 (6 years ago)
Author:
ryan
Message:

Add per page screen option for tags

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r10908 r10909  
    10421042        case 'upload_per_page': 
    10431043        case 'categories_per_page': 
     1044        case 'edit_tags_per_page': 
    10441045            $value = (int) $value; 
    10451046            if ( $value < 1 || $value > 999 ) 
  • trunk/wp-admin/edit-tags.php

    r10903 r10909  
    178178    $pagenum = 1; 
    179179 
    180 $tagsperpage = apply_filters("tagsperpage",20); 
     180$tags_per_page = get_user_option('edit_tags_per_page'); 
     181if ( empty($tags_per_page) ) 
     182    $tags_per_page = 20; 
     183$tags_per_page = apply_filters('edit_tags_per_page', $tags_per_page); 
     184$tags_per_page = apply_filters('tagsperpage', $tags_per_page); // Old filter 
    181185 
    182186$page_links = paginate_links( array( 
     
    185189    'prev_text' => __('&laquo;'), 
    186190    'next_text' => __('&raquo;'), 
    187     'total' => ceil(wp_count_terms($taxonomy) / $tagsperpage), 
     191    'total' => ceil(wp_count_terms($taxonomy) / $tags_per_page), 
    188192    'current' => $pagenum 
    189193)); 
     
    225229$searchterms = isset( $_GET['s'] ) ? trim( $_GET['s'] ) : ''; 
    226230 
    227 $count = tag_rows( $pagenum, $tagsperpage, $searchterms, $taxonomy ); 
     231$count = tag_rows( $pagenum, $tags_per_page, $searchterms, $taxonomy ); 
    228232?> 
    229233    </tbody> 
  • trunk/wp-admin/includes/template.php

    r10908 r10909  
    35273527            $per_page_label = __('Categories per page:'); 
    35283528            break; 
     3529        case 'edit-tags': 
     3530            $per_page_label = __('Tags per page:'); 
     3531            break; 
    35293532        default: 
    35303533            return ''; 
Note: See TracChangeset for help on using the changeset viewer.