diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-01-24 12:40:34 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-01-24 12:40:34 +0000 |
commit | 9384882739906e813f1a05491fd73e47e8105dee (patch) | |
tree | a14f52d7e2cb2fcce1ab890932c18358d4c4c973 /wp-includes/category-template.php | |
parent | 30d41198c601e5514acad67eb5fbb2e9f6854571 (diff) | |
download | wordpress-mu-9384882739906e813f1a05491fd73e47e8105dee.tar.gz wordpress-mu-9384882739906e813f1a05491fd73e47e8105dee.tar.xz wordpress-mu-9384882739906e813f1a05491fd73e47e8105dee.zip |
WP Merge to revision 4793
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@865 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/category-template.php')
-rw-r--r-- | wp-includes/category-template.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index e7eef22..1ca0743 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -88,10 +88,13 @@ function get_the_category_by_ID($cat_ID) { } function get_the_category_list($separator = '', $parents='') { + global $wp_rewrite; $categories = get_the_category(); if (empty($categories)) return apply_filters('the_category', __('Uncategorized'), $separator, $parents); + $rel = ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) ? 'rel="category tag"' : 'rel="category"'; + $thelist = ''; if ( '' == $separator ) { $thelist .= '<ul class="post-categories">'; @@ -101,17 +104,17 @@ function get_the_category_list($separator = '', $parents='') { case 'multiple': if ($category->category_parent) $thelist .= get_category_parents($category->category_parent, TRUE); - $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a></li>'; + $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" ' . $rel . '>' . $category->cat_name.'</a></li>'; break; case 'single': - $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . ' rel="category tag">'; + $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" ' . $rel . '>'; if ($category->category_parent) $thelist .= get_category_parents($category->category_parent, FALSE); $thelist .= $category->cat_name.'</a></li>'; break; case '': default: - $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a></li>'; + $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" ' . $rel . '>' . $category->cat_name.'</a></li>'; } } $thelist .= '</ul>'; @@ -124,17 +127,17 @@ function get_the_category_list($separator = '', $parents='') { case 'multiple': if ( $category->category_parent ) $thelist .= get_category_parents($category->category_parent, TRUE); - $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a>'; + $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" ' . $rel . '>' . $category->cat_name.'</a>'; break; case 'single': - $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'; + $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" ' . $rel . '>'; if ( $category->category_parent ) $thelist .= get_category_parents($category->category_parent, FALSE); $thelist .= "$category->cat_name</a>"; break; case '': default: - $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" rel="category tag">'.$category->cat_name.'</a>'; + $thelist .= '<a href="' . get_category_link($category->cat_ID) . '" title="' . sprintf(__("View all posts in %s"), $category->cat_name) . '" ' . $rel . '>' . $category->cat_name.'</a>'; } ++$i; } |