WordPress.org

Make WordPress Core

Changeset 35140


Ignore:
Timestamp:
10/13/2015 05:01:10 PM (5 years ago)
Author:
wonderboymusic
Message:

Taxonomy: in wp_list_categories(), add an arg: separator, to allow the overriding of <br/>.

Props wojtek.szkutnik.
Fixes #9025.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category-template.php

    r35032 r35140  
    475475 *
    476476 * @since 2.1.0
    477  * @since 4.4.0 Introduced the `hide_title_if_empty` argument. The `current_category` argument was modified to
     477 * @since 4.4.0 Introduced the `hide_title_if_empty` and `separator` arguments. The `current_category` argument was modified to
    478478 *              optionally accept an array of values.
    479479 *
     
    531531        'hide_title_if_empty' => false,
    532532        'echo' => 1, 'depth' => 0,
     533        'separator' => '<br />',
    533534        'taxonomy' => 'category'
    534535    );
  • trunk/src/wp-includes/class-walker-category.php

    r34416 r35140  
    190190            $output .=  ' class="' . $css_classes . '"';
    191191            $output .= ">$link\n";
     192        } elseif ( isset( $args['separator'] ) ) {
     193            $output .= "\t$link" . $args['separator'] . "\n";
    192194        } else {
    193195            $output .= "\t$link<br />\n";
Note: See TracChangeset for help on using the changeset viewer.