WordPress.org

Make WordPress Core

Ticket #6808: exclude_category-2.diff

File exclude_category-2.diff, 1.2 KB (added by ionfish, 10 years ago)

Add exclude_category to defaults

  • wp-includes/bookmark-template.php

     
    186186function wp_list_bookmarks($args = '') {
    187187        $defaults = array(
    188188                'orderby' => 'name', 'order' => 'ASC',
    189                 'limit' => -1, 'category' => '',
     189                'limit' => -1, 'category' => '', 'exclude_category' => '',
    190190                'category_name' => '', 'hide_invisible' => 1,
    191191                'show_updated' => 0, 'echo' => 1,
    192192                'categorize' => 1, 'title_li' => __('Bookmarks'),
     
    203203
    204204        if ( $categorize ) {
    205205                //Split the bookmarks into ul's for each category
    206                 $cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0));
     206                $cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, 'exclude' => $exclude_category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0));
    207207
    208208                foreach ( (array) $cats as $cat ) {
    209209                        $params = array_merge($r, array('category'=>$cat->term_id));