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
This commit is contained in:
parent
dcdde9cb36
commit
3479e68ff8
|
@ -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