wppaste
WordPress

apply_filters( 'get_calendar_args', array $args )

Since
6.8.0
Filter the get_calendar function arguments before they are used.

Compatibility

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

Present in 4 of the 5 tracked releases, added in 6.8.0.

Parameters

$argsarray
{ Optional. Arguments for the get_calendar function.
@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 · 1

  • wp-includes/general-template.php:2515get_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'.	 * }	 */	$args = apply_filters( 'get_calendar_args', wp_parse_args( $args, $defaults ) ); 	if ( ! post_type_exists( $args['post_type'] ) ) {		$args['post_type'] = 'post';	} 	$w = 0;

Changelog

Introduced in 6.8.0. Unchanged from 6.8.8 through 7.1.0.

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

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

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 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.