WordPress.org

Make WordPress Core

Changeset 11064


Ignore:
Timestamp:
04/23/09 05:39:33 (5 years ago)
Author:
ryan
Message:

Return empty list if requests bookmark category does not exist. Props Viper007Bond. fixes #7507

File:
1 edited

Legend:

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

    r10229 r11064  
    186186        $exclusions .= ')'; 
    187187 
    188     if ( ! empty($category_name) ) { 
    189         if ( $category = get_term_by('name', $category_name, 'link_category') ) 
     188    if ( !empty($category_name) ) { 
     189        if ( $category = get_term_by('name', $category_name, 'link_category') ) { 
    190190            $category = $category->term_id; 
     191        } else { 
     192            $cache[ $key ] = array(); 
     193            wp_cache_set( 'get_bookmarks', $cache, 'bookmark' ); 
     194            return apply_filters( 'get_bookmarks', array(), $r ); 
     195        } 
    191196    } 
    192197 
Note: See TracChangeset for help on using the changeset viewer.