mirror of
git://develop.git.wordpress.org/
synced 2025-02-23 16:15:31 +01:00
Fix check for a published post in calendar widget, props Denis-de-Bernardy, fixes #10091
git-svn-id: https://develop.svn.wordpress.org/trunk@11548 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c45adb5e47
commit
ad0b56690a
@ -969,7 +969,7 @@ function get_calendar($initial = true) {
|
||||
|
||||
// Quick check. If we have no posts at all, abort!
|
||||
if ( !$posts ) {
|
||||
$gotsome = $wpdb->get_var("SELECT 1 FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1");
|
||||
$gotsome = $wpdb->get_var("SELECT 1 as test FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1");
|
||||
if ( !$gotsome ) {
|
||||
$cache[ $key ] = '';
|
||||
wp_cache_set( 'get_calendar', $cache, 'calendar' );
|
||||
|
Loading…
x
Reference in New Issue
Block a user