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 3 times in this file.
| Line | Code |
|---|---|
| 2198 | */ |
| 2199 | function get_calendar( $initial = true, $echo = true ) { |
| 2200 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
| 2201 | |
| 2202 | $key = md5( $m . $monthnum . $year ); |
| 2203 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
| 2204 | |
| 2205 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
| 2206 | /** This filter is documented in wp-includes/general-template.php */ |
| 2207 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
| 2208 | |
| 2209 | if ( $echo ) { |
| 2210 | echo $output; |
| 2211 | return; |
| 2212 | } |
| 2213 | |
| 2214 | return $output; |
| 2215 | } |
| 2216 | |
| Line | Code |
| 2405 | |
| 2406 | if ( $echo ) { |
| 2407 | /** |
| 2408 | * Filters the HTML calendar output. |
| 2409 | * |
| 2410 | * @since 3.0.0 |
| 2411 | * |
| 2412 | * @param string $calendar_output HTML output of the calendar. |
| 2413 | */ |
| 2414 | echo apply_filters( 'get_calendar', $calendar_output ); |
| 2415 | return; |
| 2416 | } |
| 2417 | /** This filter is documented in wp-includes/general-template.php */ |
| 2418 | return apply_filters( 'get_calendar', $calendar_output ); |
| 2419 | } |
| 2420 | |
| 2421 | /** |
| 2422 | * Purge the cached results of get_calendar. |
| 2423 | * |
| 2424 | * @see get_calendar() |
| 2425 | * @since 2.1.0 |
| 2426 | */ |
| 2427 | function delete_get_calendar_cache() { |