Cache empty results for adjacent post queries
git-svn-id: https://develop.svn.wordpress.org/trunk@11243 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7bdc97c1b8
commit
ed9fa72efc
@ -912,6 +912,9 @@ function get_adjacent_post($in_same_cat = false, $excluded_categories = '', $pre
|
||||
return $result;
|
||||
|
||||
$result = $wpdb->get_row("SELECT p.* FROM $wpdb->posts AS p $join $where $sort");
|
||||
if ( null === $result )
|
||||
$result = '';
|
||||
|
||||
wp_cache_set($query_key, $result, 'counts');
|
||||
return $result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user