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

props SergeyBiryukov.
fixes #24428.


git-svn-id: https://develop.svn.wordpress.org/trunk@26588 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-12-03 20:50:41 +00:00
parent 1996babc54
commit 1962b24925

View File

@ -452,7 +452,7 @@ function wp_list_categories( $args = '' ) {
if ( empty( $categories ) ) { if ( empty( $categories ) ) {
if ( ! empty( $show_option_none ) ) { if ( ! empty( $show_option_none ) ) {
if ( 'list' == $style ) if ( 'list' == $style )
$output .= '<li>' . $show_option_none . '</li>'; $output .= '<li class="cat-item-none">' . $show_option_none . '</li>';
else else
$output .= $show_option_none; $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 = ( '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 ); $posts_page = esc_url( $posts_page );
if ( 'list' == $style ) 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 else
$output .= "<a href='$posts_page'>$show_option_all</a>"; $output .= "<a href='$posts_page'>$show_option_all</a>";
} }