WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 2329 | 'week' => $w, |
| 2330 | ); |
| 2331 | |
| 2332 | wp_recursive_ksort( $cache_args ); |
| 2333 | $key = md5( serialize( $cache_args ) ); |
| 2334 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
| 2335 | |
| 2336 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
| 2337 | /** This filter is documented in wp-includes/general-template.php */ |
| 2338 | $output = apply_filters( 'get_calendar', $cache[ $key ], $args ); |
| 2339 | |
| 2340 | if ( $args['display'] ) { |
| 2341 | echo $output; |
| 2342 | return; |
| 2343 | } |
| 2344 | |
| 2345 | return $output; |
| 2346 | } |
| 2347 | |
| Line | Code |
| 2584 | * @param string $calendar_output HTML output of the calendar. |
| 2585 | * @param array $args { |
| 2586 | * Optional. Array of display arguments. |
| 2587 | * |
| 2588 | * @type bool $initial Whether to use initial calendar names. Default true. |
| 2589 | * @type bool $display Whether to display the calendar output. Default true. |
| 2590 | * @type string $post_type Optional. Post type. Default 'post'. |
| 2591 | * } |
| 2592 | */ |
| 2593 | $calendar_output = apply_filters( 'get_calendar', $calendar_output, $args ); |
| 2594 | |
| 2595 | if ( $args['display'] ) { |
| 2596 | echo $calendar_output; |
| 2597 | return; |
| 2598 | } |
| 2599 | |
| 2600 | return $calendar_output; |
| 2601 | } |
| 2602 | |