From fa01d74d5187fc665bc299bad7281464d4970114 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 13 Jun 2008 23:52:07 +0000 Subject: [PATCH] Add paging to Manage->Categories. fixes #7136 git-svn-id: http://svn.automattic.com/wordpress/trunk@8079 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/categories.php | 3 +-- wp-admin/includes/template.php | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 88017fd4b3..d2e8fb3720 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -174,8 +174,7 @@ if ( $page_links ) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index abc93e8570..efda3c54fd 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -5,7 +5,12 @@ // // Ugly recursive category stuff. -function cat_rows( $parent = 0, $level = 0, &$categories = 0, $page = 1, $per_page = 20, &$count = 0 ) { +function cat_rows( $parent = 0, $level = 0, $categories = 0, $page = 1, $per_page = 20 ) { + $count = 0; + _cat_rows($categories, $count, $parent, $level, $page, $per_page); +} + +function _cat_rows( &$categories, &$count, $parent = 0, $level = 0, $page = 1, $per_page = 20 ) { if ( empty($categories) ) { $args = array('hide_empty' => 0); if ( !empty($_GET['s']) ) @@ -56,7 +61,7 @@ function cat_rows( $parent = 0, $level = 0, &$categories = 0, $page = 1, $per_pa $count++; if ( isset($children[$category->term_id]) ) - cat_rows( $category->term_id, $level + 1, $categories, $page, $per_page, $count ); + _cat_rows( $categories, $count, $category->term_id, $level + 1, $page, $per_page ); }