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 |
|---|---|
| 2324 | 'week' => $w, |
| 2325 | ); |
| 2326 | |
| 2327 | wp_recursive_ksort( $cache_args ); |
| 2328 | $key = md5( serialize( $cache_args ) ); |
| 2329 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
| 2330 | |
| 2331 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
| 2332 | /** This filter is documented in wp-includes/general-template.php */ |
| 2333 | $output = apply_filters( 'get_calendar', $cache[ $key ], $args ); |
| 2334 | |
| 2335 | if ( $args['display'] ) { |
| 2336 | echo $output; |
| 2337 | return; |
| 2338 | } |
| 2339 | |
| 2340 | return $output; |
| 2341 | } |
| 2342 | |
| Line | Code |
| 2579 | * @param string $calendar_output HTML output of the calendar. |
| 2580 | * @param array $args { |
| 2581 | * Optional. Array of display arguments. |
| 2582 | * |
| 2583 | * @type bool $initial Whether to use initial calendar names. Default true. |
| 2584 | * @type bool $display Whether to display the calendar output. Default true. |
| 2585 | * @type string $post_type Optional. Post type. Default 'post'. |
| 2586 | * } |
| 2587 | */ |
| 2588 | $calendar_output = apply_filters( 'get_calendar', $calendar_output, $args ); |
| 2589 | |
| 2590 | if ( $args['display'] ) { |
| 2591 | echo $calendar_output; |
| 2592 | return; |
| 2593 | } |
| 2594 | |
| 2595 | return $calendar_output; |
| 2596 | } |
| 2597 | |