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 |
---|---|
2231 | */ |
2232 | function get_calendar( $initial = true, $display = true ) { |
2233 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
2234 |
|
2235 | $key = md5( $m . $monthnum . $year ); |
2236 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
2237 |
|
2238 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
2239 | /** This filter is documented in wp-includes/general-template.php */ |
2240 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
2241 |
|
2242 | if ( $display ) { |
2243 | echo $output; |
2244 | return; |
2245 | } |
2246 |
|
2247 | return $output; |
2248 | } |
2249 |
|
Line | Code |
2438 |
|
2439 | if ( $display ) { |
2440 | /** |
2441 | * Filters the HTML calendar output. |
2442 | * |
2443 | * @since 3.0.0 |
2444 | * |
2445 | * @param string $calendar_output HTML output of the calendar. |
2446 | */ |
2447 | echo apply_filters( 'get_calendar', $calendar_output ); |
2448 | return; |
2449 | } |
2450 | /** This filter is documented in wp-includes/general-template.php */ |
2451 | return apply_filters( 'get_calendar', $calendar_output ); |
2452 | } |
2453 |
|
2454 | /** |
2455 | * Purges the cached results of get_calendar. |
2456 | * |
2457 | * @see get_calendar() |
2458 | * @since 2.1.0 |
2459 | */ |
2460 | function delete_get_calendar_cache() { |