Fix inversed logic in Walker_Category::start_el(). see [28359].
Correct 'use_desc_for_title' parameter description. see #26557. Built from https://develop.svn.wordpress.org/trunk@28572 git-svn-id: http://core.svn.wordpress.org/trunk@28397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ac434b5c39
commit
4782165279
|
@ -444,7 +444,7 @@ function wp_dropdown_categories( $args = '' ) {
|
||||||
* 'hide_empty' (bool|int) default is 1 - Whether to hide categories that
|
* 'hide_empty' (bool|int) default is 1 - Whether to hide categories that
|
||||||
* don't have any posts attached to them.
|
* don't have any posts attached to them.
|
||||||
* 'use_desc_for_title' (bool|int) default is 1 - Whether to use the
|
* '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' - See {@link get_categories()}.
|
||||||
* 'feed_type' - See {@link get_categories()}.
|
* 'feed_type' - See {@link get_categories()}.
|
||||||
* 'feed_image' - 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 ) ) . '" ';
|
$link = '<a href="' . esc_url( get_term_link( $category ) ) . '" ';
|
||||||
if ( $args['use_desc_for_title'] == 0 || empty( $category->description ) ) {
|
if ( $args['use_desc_for_title'] && ! empty( $category->description ) ) {
|
||||||
$link .= '';
|
|
||||||
} else {
|
|
||||||
/**
|
/**
|
||||||
* Filter the category description for display.
|
* Filter the category description for display.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue