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 |
---|---|
2248 | */ |
2249 | function get_calendar( $initial = true, $display = true ) { |
2250 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
2251 |
|
2252 | $key = md5( $m . $monthnum . $year ); |
2253 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
2254 |
|
2255 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
2256 | /** This filter is documented in wp-includes/general-template.php */ |
2257 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
2258 |
|
2259 | if ( $display ) { |
2260 | echo $output; |
2261 | return; |
2262 | } |
2263 |
|
2264 | return $output; |
2265 | } |
2266 |
|
Line | Code |
2455 |
|
2456 | if ( $display ) { |
2457 | /** |
2458 | * Filters the HTML calendar output. |
2459 | * |
2460 | * @since 3.0.0 |
2461 | * |
2462 | * @param string $calendar_output HTML output of the calendar. |
2463 | */ |
2464 | echo apply_filters( 'get_calendar', $calendar_output ); |
2465 | return; |
2466 | } |
2467 | /** This filter is documented in wp-includes/general-template.php */ |
2468 | return apply_filters( 'get_calendar', $calendar_output ); |
2469 | } |
2470 |
|
2471 | /** |
2472 | * Purges the cached results of get_calendar. |
2473 | * |
2474 | * @see get_calendar() |
2475 | * @since 2.1.0 |
2476 | */ |
2477 | function delete_get_calendar_cache() { |