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 |
|---|---|
| 2049 | */ |
| 2050 | function get_calendar( $initial = true, $echo = true ) { |
| 2051 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
| 2052 | |
| 2053 | $key = md5( $m . $monthnum . $year ); |
| 2054 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
| 2055 | |
| 2056 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
| 2057 | /** This filter is documented in wp-includes/general-template.php */ |
| 2058 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
| 2059 | |
| 2060 | if ( $echo ) { |
| 2061 | echo $output; |
| 2062 | return; |
| 2063 | } |
| 2064 | |
| 2065 | return $output; |
| 2066 | } |
| 2067 | |
| Line | Code |
| 2254 | |
| 2255 | if ( $echo ) { |
| 2256 | /** |
| 2257 | * Filters the HTML calendar output. |
| 2258 | * |
| 2259 | * @since 3.0.0 |
| 2260 | * |
| 2261 | * @param string $calendar_output HTML output of the calendar. |
| 2262 | */ |
| 2263 | echo apply_filters( 'get_calendar', $calendar_output ); |
| 2264 | return; |
| 2265 | } |
| 2266 | /** This filter is documented in wp-includes/general-template.php */ |
| 2267 | return apply_filters( 'get_calendar', $calendar_output ); |
| 2268 | } |
| 2269 | |
| 2270 | /** |
| 2271 | * Purge the cached results of get_calendar. |
| 2272 | * |
| 2273 | * @see get_calendar |
| 2274 | * @since 2.1.0 |
| 2275 | */ |
| 2276 | function delete_get_calendar_cache() { |