Use the API.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-06-06 05:36:28 +00:00
parent 0585475e02
commit 741934931d
1 changed files with 6 additions and 6 deletions

View File

@ -643,7 +643,7 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) {
global $wpdb, $class;
if (!$categories)
$categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");
$categories = get_categories('hide_empty=0');
if ($categories) {
foreach ($categories as $category) {
@ -685,7 +685,7 @@ function page_rows($parent = 0, $level = 0, $pages = 0, $hierarchy = true) {
global $wpdb, $class, $post;
if (!$pages)
$pages = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'page' ORDER BY menu_order");
$pages = get_pages('sort_column=menu_order');
if (! $pages)
return false;
@ -745,10 +745,10 @@ function user_row( $user_object, $style = '' ) {
}
function wp_dropdown_cats($currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0) {
global $wpdb, $bgcolor;
if (!$categories) {
$categories = $wpdb->get_results("SELECT * FROM $wpdb->categories ORDER BY cat_name");
}
global $wpdb;
if (!$categories)
$categories = get_categories('hide_empty=0');
if ($categories) {
foreach ($categories as $category) {
if ($currentcat != $category->cat_ID && $parent == $category->category_parent) {