Return after echoing cached calendar. Fixes double output. Props mtdewvirus. fixes #13077
git-svn-id: http://svn.automattic.com/wordpress/trunk@14183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
84e54974f1
commit
82bfcfcdff
|
@ -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] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue