mirror of
git://develop.git.wordpress.org/
synced 2025-01-29 18:48:18 +01:00
Sort the category list so that index associations are made non-sparse.
git-svn-id: https://develop.svn.wordpress.org/trunk@1851 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
111d7005e6
commit
2eb5611be9
@ -8,7 +8,7 @@ function get_the_category($id = false) {
|
||||
}
|
||||
|
||||
if ($category_cache[$id]) {
|
||||
return $category_cache[$id];
|
||||
$categories = $category_cache[$id];
|
||||
} else {
|
||||
$categories = $wpdb->get_results("
|
||||
SELECT category_id, cat_name, category_nicename, category_description, category_parent
|
||||
@ -16,8 +16,10 @@ function get_the_category($id = false) {
|
||||
WHERE $wpdb->post2cat.category_id = cat_ID AND $wpdb->post2cat.post_id = '$id'
|
||||
");
|
||||
|
||||
return $categories;
|
||||
}
|
||||
|
||||
sort($categories);
|
||||
return $categories;
|
||||
}
|
||||
|
||||
function get_category_link($echo = false, $category_id, $category_nicename) {
|
||||
|
@ -52,7 +52,7 @@ function get_permalink($id = false) {
|
||||
if ($idpost->post_status == 'static') {
|
||||
return get_page_link();
|
||||
}
|
||||
|
||||
|
||||
$permalink = get_settings('permalink_structure');
|
||||
|
||||
if ('' != $permalink) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user