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 |
|---|---|
| 1928 | */ |
| 1929 | function get_calendar( $initial = true, $echo = true ) { |
| 1930 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
| 1931 | |
| 1932 | $key = md5( $m . $monthnum . $year ); |
| 1933 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
| 1934 | |
| 1935 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
| 1936 | /** This filter is documented in wp-includes/general-template.php */ |
| 1937 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
| 1938 | |
| 1939 | if ( $echo ) { |
| 1940 | echo $output; |
| 1941 | return; |
| 1942 | } |
| 1943 | |
| 1944 | return $output; |
| 1945 | } |
| 1946 | |
| Line | Code |
| 2127 | |
| 2128 | if ( $echo ) { |
| 2129 | /** |
| 2130 | * Filters the HTML calendar output. |
| 2131 | * |
| 2132 | * @since 3.0.0 |
| 2133 | * |
| 2134 | * @param string $calendar_output HTML output of the calendar. |
| 2135 | */ |
| 2136 | echo apply_filters( 'get_calendar', $calendar_output ); |
| 2137 | return; |
| 2138 | } |
| 2139 | /** This filter is documented in wp-includes/general-template.php */ |
| 2140 | return apply_filters( 'get_calendar', $calendar_output ); |
| 2141 | } |
| 2142 | |
| 2143 | /** |
| 2144 | * Purge the cached results of get_calendar. |
| 2145 | * |
| 2146 | * @see get_calendar |
| 2147 | * @since 2.1.0 |
| 2148 | */ |
| 2149 | function delete_get_calendar_cache() { |