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 |
|---|---|
| 2060 | */ |
| 2061 | function get_calendar( $initial = true, $echo = true ) { |
| 2062 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
| 2063 | |
| 2064 | $key = md5( $m . $monthnum . $year ); |
| 2065 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
| 2066 | |
| 2067 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
| 2068 | /** This filter is documented in wp-includes/general-template.php */ |
| 2069 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
| 2070 | |
| 2071 | if ( $echo ) { |
| 2072 | echo $output; |
| 2073 | return; |
| 2074 | } |
| 2075 | |
| 2076 | return $output; |
| 2077 | } |
| 2078 | |
| Line | Code |
| 2265 | |
| 2266 | if ( $echo ) { |
| 2267 | /** |
| 2268 | * Filters the HTML calendar output. |
| 2269 | * |
| 2270 | * @since 3.0.0 |
| 2271 | * |
| 2272 | * @param string $calendar_output HTML output of the calendar. |
| 2273 | */ |
| 2274 | echo apply_filters( 'get_calendar', $calendar_output ); |
| 2275 | return; |
| 2276 | } |
| 2277 | /** This filter is documented in wp-includes/general-template.php */ |
| 2278 | return apply_filters( 'get_calendar', $calendar_output ); |
| 2279 | } |
| 2280 | |
| 2281 | /** |
| 2282 | * Purge the cached results of get_calendar. |
| 2283 | * |
| 2284 | * @see get_calendar |
| 2285 | * @since 2.1.0 |
| 2286 | */ |
| 2287 | function delete_get_calendar_cache() { |