wp_list_categories(): Add cat-item-none and cat-item-all classes to the none/all options.

props SergeyBiryukov.
fixes #24428.

Built from https://develop.svn.wordpress.org/trunk@26588


git-svn-id: http://core.svn.wordpress.org/trunk@26478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-12-03 20:51:19 +00:00
parent 3d89dbb71f
commit 974625d962
1 changed files with 2 additions and 2 deletions

View File

@ -452,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;
}
@ -461,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>";
}