Make WordPress Core

Ticket #22216: 22216.2.diff

File 22216.2.diff, 1.1 KB (added by ryan, 12 years ago)
  • wp-includes/bookmark-template.php

     
    212212        $r = wp_parse_args( $args, $defaults );
    213213        extract( $r, EXTR_SKIP );
    214214
    215         if ( empty( $args['category'] ) )
    216                 $categorize = 0;
    217 
    218215        $output = '';
    219216
    220217        if ( $categorize ) {
    221                 //Split the bookmarks into ul's for each category
    222                 $cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, 'exclude' => $exclude_category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0));
     218                $cats = get_terms( 'link_category', array( 'name__like' => $category_name, 'include' => $category, 'exclude' => $exclude_category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0 ) );
     219                if ( empty( $cats ) )
     220                        $categorize = false;
     221        }
    223222
     223        if ( $categorize ) {
     224                // Split the bookmarks into ul's for each category
    224225                foreach ( (array) $cats as $cat ) {
    225226                        $params = array_merge($r, array('category'=>$cat->term_id));
    226227                        $bookmarks = get_bookmarks($params);