]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/category-template.php
WordPress 3.8-scripts
[autoinstalls/wordpress.git] / wp-includes / category-template.php
index 27b8bf221ff9f1ca58cd6eb9f4f5ac0e56fd1c13..6ffd9d35ef62fe0e7bac7bc499245fdaebad8a04 100644 (file)
@@ -232,6 +232,9 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
  * @return bool True if the current post is in any of the given categories.
  */
 function in_category( $category, $post = null ) {
+       if ( empty( $category ) )
+               return false;
+
        return has_category( $category, $post );
 }
 
@@ -449,7 +452,7 @@ function wp_list_categories( $args = '' ) {
        if ( empty( $categories ) ) {
                if ( ! empty( $show_option_none ) ) {
                        if ( 'list' == $style )
-                               $output .= '<li>' . $show_option_none . '</li>';
+                               $output .= '<li class="cat-item-none">' . $show_option_none . '</li>';
                        else
                                $output .= $show_option_none;
                }
@@ -458,7 +461,7 @@ function wp_list_categories( $args = '' ) {
                        $posts_page = ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) ? get_permalink( get_option( 'page_for_posts' ) ) : home_url( '/' );
                        $posts_page = esc_url( $posts_page );
                        if ( 'list' == $style )
-                               $output .= "<li><a href='$posts_page'>$show_option_all</a></li>";
+                               $output .= "<li class='cat-item-all'><a href='$posts_page'>$show_option_all</a></li>";
                        else
                                $output .= "<a href='$posts_page'>$show_option_all</a>";
                }