Changeset 33767 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 08/27/2015 02:08:31 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r33765 r33767 462 462 * 463 463 * @since 2.1.0 464 * @since 4.4.0 Introduced the `hide_title_if_ no_cats` argument.464 * @since 4.4.0 Introduced the `hide_title_if_empty` argument. 465 465 * 466 466 * @param string|array $args { … … 494 494 * @type string $title_li Text to use for the list title `<li>` element. Pass an empty string 495 495 * to disable. Default 'Categories'. 496 * @type bool $hide_title_if_ no_catsWhether to hide the `$title_li` element if there are no terms in496 * @type bool $hide_title_if_empty Whether to hide the `$title_li` element if there are no terms in 497 497 * the list. Default false (title will always be shown). 498 498 * @type int $depth Category depth. Used for tab indentation. Default 0. … … 512 512 'exclude_tree' => '', 'current_category' => 0, 513 513 'hierarchical' => true, 'title_li' => __( 'Categories' ), 514 'hide_title_if_ no_cats' => false,514 'hide_title_if_empty' => false, 515 515 'echo' => 1, 'depth' => 0, 516 516 'taxonomy' => 'category' … … 540 540 541 541 $output = ''; 542 if ( $r['title_li'] && 'list' == $r['style'] && ( ! empty( $categories ) || ! $r['hide_title_if_ no_cats'] ) ) {542 if ( $r['title_li'] && 'list' == $r['style'] && ( ! empty( $categories ) || ! $r['hide_title_if_empty'] ) ) { 543 543 $output = '<li class="' . esc_attr( $r['class'] ) . '">' . $r['title_li'] . '<ul>'; 544 544 }
Note: See TracChangeset
for help on using the changeset viewer.