mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Return empty list if requests bookmark category does not exist. Props Viper007Bond. fixes #7507
git-svn-id: https://develop.svn.wordpress.org/trunk@11064 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e76b5a0e42
commit
2323b85540
@ -185,9 +185,14 @@ function get_bookmarks($args = '') {
|
||||
if (!empty($exclusions))
|
||||
$exclusions .= ')';
|
||||
|
||||
if ( ! empty($category_name) ) {
|
||||
if ( $category = get_term_by('name', $category_name, 'link_category') )
|
||||
if ( !empty($category_name) ) {
|
||||
if ( $category = get_term_by('name', $category_name, 'link_category') ) {
|
||||
$category = $category->term_id;
|
||||
} else {
|
||||
$cache[ $key ] = array();
|
||||
wp_cache_set( 'get_bookmarks', $cache, 'bookmark' );
|
||||
return apply_filters( 'get_bookmarks', array(), $r );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty($search) ) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user