Changeset 8079

Show
Ignore:
Timestamp:
06/13/08 23:52:07 (5 months ago)
Author:
ryan
Message:

Add paging to Manage->Categories. fixes #7136

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/categories.php

    r8078 r8079  
    175175    <tbody id="the-list" class="list:cat"> 
    176176<?php 
    177 $categories = array(); 
    178 cat_rows(0, 0, $categories, $pagenum, $catsperpage); 
     177cat_rows(0, 0, 0, $pagenum, $catsperpage); 
    179178?> 
    180179    </tbody> 
  • trunk/wp-admin/includes/template.php

    r8078 r8079  
    66 
    77// Ugly recursive category stuff. 
    8 function cat_rows( $parent = 0, $level = 0, &$categories = 0, $page = 1, $per_page = 20, &$count = 0 ) { 
     8function cat_rows( $parent = 0, $level = 0, $categories = 0, $page = 1, $per_page = 20 ) { 
     9    $count = 0; 
     10    _cat_rows($categories, $count, $parent, $level, $page, $per_page); 
     11
     12 
     13function _cat_rows( &$categories, &$count, $parent = 0, $level = 0, $page = 1, $per_page = 20 ) { 
    914    if ( empty($categories) ) { 
    1015        $args = array('hide_empty' => 0); 
     
    5762 
    5863        if ( isset($children[$category->term_id]) ) 
    59             cat_rows( $category->term_id, $level + 1, $categories, $page, $per_page, $count ); 
     64            _cat_rows( $categories, $count, $category->term_id, $level + 1, $page, $per_page ); 
    6065 
    6166    }