WordPress.org

Make WordPress Core

Ticket #3898: wp_list_bookmarks_fix.diff

File wp_list_bookmarks_fix.diff, 1.2 KB (added by Otto42, 9 years ago)

Patch to correct parameter handling in wp_list_bookmarks

  • wp-includes/bookmark-template.php

     
    331331                $cats = get_categories("type=link&category_name=$category_name&include=$category&orderby=$category_orderby&order=$category_order&hierarchical=0"); 
    332332 
    333333                foreach ( (array) $cats as $cat ) { 
    334                         $bookmarks = get_bookmarks("limit=$limit&category={$cat->cat_ID}&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_invisible&show_updated=$show_updated"); 
     334                        $params = array_merge($r, array('category'=>$cat->cat_ID)); 
     335                        $bookmarks = get_bookmarks($params); 
    335336                        if ( empty($bookmarks) ) 
    336337                                continue; 
    337338                        $output .= str_replace(array('%id', '%class'), array("linkcat-$cat->cat_ID", $class), $category_before); 
     
    341342                } 
    342343        } else { 
    343344                //output one single list using title_li for the title 
    344                 $bookmarks = get_bookmarks("limit=$limit&category=$category&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_invisible&show_updated=$show_updated"); 
     345                $bookmarks = get_bookmarks($r); 
    345346 
    346347                if ( !empty($bookmarks) ) { 
    347348                        if ( !empty( $title_li ) ){