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 |
|---|---|
| 2188 | */ |
| 2189 | function get_calendar( $initial = true, $echo = true ) { |
| 2190 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
| 2191 | |
| 2192 | $key = md5( $m . $monthnum . $year ); |
| 2193 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
| 2194 | |
| 2195 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
| 2196 | /** This filter is documented in wp-includes/general-template.php */ |
| 2197 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
| 2198 | |
| 2199 | if ( $echo ) { |
| 2200 | echo $output; |
| 2201 | return; |
| 2202 | } |
| 2203 | |
| 2204 | return $output; |
| 2205 | } |
| 2206 | |
| Line | Code |
| 2395 | |
| 2396 | if ( $echo ) { |
| 2397 | /** |
| 2398 | * Filters the HTML calendar output. |
| 2399 | * |
| 2400 | * @since 3.0.0 |
| 2401 | * |
| 2402 | * @param string $calendar_output HTML output of the calendar. |
| 2403 | */ |
| 2404 | echo apply_filters( 'get_calendar', $calendar_output ); |
| 2405 | return; |
| 2406 | } |
| 2407 | /** This filter is documented in wp-includes/general-template.php */ |
| 2408 | return apply_filters( 'get_calendar', $calendar_output ); |
| 2409 | } |
| 2410 | |
| 2411 | /** |
| 2412 | * Purge the cached results of get_calendar. |
| 2413 | * |
| 2414 | * @see get_calendar() |
| 2415 | * @since 2.1.0 |
| 2416 | */ |
| 2417 | function delete_get_calendar_cache() { |