wppaste
WordPress

apply_filters( 'get_calendar', string $calendar_output, array $args )

Since
3.0.0, 6.8.0
Filters the HTML calendar output.

Compatibility

WordPress
since 6.8.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$calendar_outputstring
HTML output of the calendar.
$argsarray
{ Optional. Array of display arguments.
@type bool $initial Whether to use initial calendar names. Default true.
@type bool $display Whether to display the calendar output. Default true.
@type string $post_type Optional. Post type. Default 'post'.
}
  • $initialbool

    Whether to use initial calendar names. Default true.
  • $displaybool

    Whether to display the calendar output. Default true.
  • $post_typestring

    Optional. Post type. Default 'post'.

Where this hook fires · 2

  • wp-includes/general-template.php:2333get_calendar()
  • wp-includes/general-template.php:2588get_calendar()

Source code

	 *	 *     @type bool   $initial   Whether to use initial calendar names. Default true.	 *     @type bool   $display   Whether to display the calendar output. Default true.	 *     @type string $post_type Optional. Post type. Default 'post'.	 * }	 */	$calendar_output = apply_filters( 'get_calendar', $calendar_output, $args ); 	if ( $args['display'] ) {		echo $calendar_output;		return;	}

Changelog

Introduced in 3.0.0. One change between 6.7.7 and 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

6.8.8
Parameter $args added.verified against source
6.8.0
Added the $args parameter.from the docblock
3.0.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.