Fix inversed logic in Walker_Category::start_el(). see [28359].

Correct 'use_desc_for_title' parameter description.

see #26557.

git-svn-id: https://develop.svn.wordpress.org/trunk@28572 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-05-24 13:41:11 +00:00
parent 90a40a07a1
commit 191705a964
1 changed files with 2 additions and 4 deletions

View File

@ -444,7 +444,7 @@ function wp_dropdown_categories( $args = '' ) {
* 'hide_empty' (bool|int) default is 1 - Whether to hide categories that
* don't have any posts attached to them.
* 'use_desc_for_title' (bool|int) default is 1 - Whether to use the
* description instead of the category title.
* category description as the title attribute.
* 'feed' - See {@link get_categories()}.
* 'feed_type' - See {@link get_categories()}.
* 'feed_image' - See {@link get_categories()}.
@ -972,9 +972,7 @@ class Walker_Category extends Walker {
);
$link = '<a href="' . esc_url( get_term_link( $category ) ) . '" ';
if ( $args['use_desc_for_title'] == 0 || empty( $category->description ) ) {
$link .= '';
} else {
if ( $args['use_desc_for_title'] && ! empty( $category->description ) ) {
/**
* Filter the category description for display.
*