Make WordPress Core


Ignore:
Timestamp:
11/28/2012 11:19:03 PM (12 years ago)
Author:
ryan
Message:

In wp_list_bookmarks(), don't stomp the categorize argument. Fixes categorized display in the links widget.

fixes #22216

File:
1 edited

Legend:

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

    r22565 r22910  
    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));
    223 
     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    }
     222
     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));
Note: See TracChangeset for help on using the changeset viewer.