get_calendar filter-hookWP 3.0.0

Filters the HTML calendar output.

Usage

add_filter( 'get_calendar', 'wp_kama_get_calendar_filter', 10, 2 );

/**
 * Function for `get_calendar` filter-hook.
 * 
 * @param string $calendar_output HTML output of the calendar.
 * @param array  $args            Optional. Array of display arguments.
 *
 * @return string
 */
function wp_kama_get_calendar_filter( $calendar_output, $args ){

	// filter...
	return $calendar_output;
}
$calendar_output(string)
HTML output of the calendar.
$args(array)

Optional. Array of display arguments.

  • initial(true|false)
    Whether to use initial calendar names.
    Default: true

  • display(true|false)
    Whether to display the calendar output.
    Default: true

  • post_type(string)
    Optional. Post type.
    Default: 'post'

Changelog

Since 3.0.0 Introduced.
Since 6.8.0 Added the $args parameter.

Where the hook is called

get_calendar()
get_calendar
wp-includes/general-template.php 2588
$calendar_output = apply_filters( 'get_calendar', $calendar_output, $args );
wp-includes/general-template.php 2333
$output = apply_filters( 'get_calendar', $cache[ $key ], $args );

Where the hook is used in WordPress

Usage not found.