From 3479e68ff8cef3cc0595c8fee509dc3b7632dbcb Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 21 Apr 2010 21:35:39 +0000 Subject: [PATCH] Return after echoing cached calendar. Fixes double output. Props mtdewvirus. fixes #13077 git-svn-id: https://develop.svn.wordpress.org/trunk@14183 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/general-template.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index bdd9018f3c..ac87deddc1 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1061,10 +1061,12 @@ function get_calendar($initial = true, $echo = true) { $key = md5( $m . $monthnum . $year ); if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) { if ( is_array($cache) && isset( $cache[ $key ] ) ) { - if ( $echo ) + if ( $echo ) { echo apply_filters( 'get_calendar', $cache[$key] ); - else + return; + } else { return apply_filters( 'get_calendar', $cache[$key] ); + } } }