mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 18:08:09 +01:00
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:
parent
3d89dbb71f
commit
974625d962
@ -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>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user