get_calendar() – Display calendar with days that have posts as links.
You appear to be a bot. Output may be restricted
Description
Displays calendar with days that have posts as links.
The calendar is cached, which will be retrieved, if it exists. If there are no posts for the month, then it will not be displayed.
Usage
$void|string = get_calendar( $initial, $echo );
Parameters
- $initial
- ( bool ) optional default: 1 – Optional. Whether to use initial calendar names. Default true.
- $echo
- ( bool ) optional default: 1 – Optional. Whether to display the calendar output. Default true.
Returns
void|string Void if $echo
argument is true, calendar HTML if $echo
is false.
Source
File name: wordpress/wp-includes/general-template.php
Lines:
201 to 221 of 221
$calendar_output .= ' </nav>'; $cache[ $key ] = $calendar_output; wp_cache_set( 'get_calendar', $cache, 'calendar' ); if ( $echo ) { /** * Filters the HTML calendar output. * * @since 3.0.0 * * @param string $calendar_output HTML output of the calendar. */ echo apply_filters( 'get_calendar', $calendar_output ); return; } /** This filter is documented in wp-includes/general-template.php */ return apply_filters( 'get_calendar', $calendar_output ); }