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.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

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:2543get_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.11 through 7.1.3.

  1. 6.8.11
  2. 6.9.10
  3. 7.0.7
  4. 7.1.3

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

About this page

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