WordPress.org

Make WordPress Core

Ticket #7507: 7507.patch

File 7507.patch, 648 bytes (added by Viper007Bond, 9 years ago)
  • wp-includes/bookmark.php

     
    152152        if ( !is_array($cache) )
    153153                $cache = array();
    154154
     155        // Non-existent category
     156        if ( !empty($category_name) && 0 === get_cat_ID($category_name) ) {
     157                $cache[ $key ] = array();
     158                wp_cache_set( 'get_bookmarks', $cache, 'bookmark' );
     159                return apply_filters( 'get_bookmarks', array(), $r );
     160        }
     161
    155162        $inclusions = '';
    156163        if ( !empty($include) ) {
    157164                $exclude = '';  //ignore exclude, category, and category_name params if using include