get_calendar_args хук-фильтрWP 6.8.0

Filter the get_calendar arguments before they are used.

Использование

add_filter( 'get_calendar_args', 'wp_kama_get_calendar_args_filter' );

/**
 * Function for `get_calendar_args` filter-hook.
 * 
 * @param array $args Optional. Arguments for the `get_calendar` function.
 *
 * @return array
 */
function wp_kama_get_calendar_args_filter( $args ){

	// filter...
	return $args;
}
$args(массив)

Optional. Arguments for the get_calendar function.

  • initial(true|false)
    Whether to use initial calendar names.
    По умолчанию: true

  • display(true|false)
    Whether to display the calendar output.
    По умолчанию: true

  • post_type(строка)
    Optional. Post type.
    По умолчанию: 'post'

Список изменений

С версии 6.8.0 Введена.

Где вызывается хук

get_calendar()
get_calendar_args
wp-includes/general-template.php 2294
$args = apply_filters( 'get_calendar_args', wp_parse_args( $args, $defaults ) );

Где используется хук в WordPress

Использование не найдено.