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 |
|---|---|
| 1870 | */ |
| 1871 | function get_calendar( $initial = true, $echo = true ) { |
| 1872 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
| 1873 | |
| 1874 | $key = md5( $m . $monthnum . $year ); |
| 1875 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
| 1876 | |
| 1877 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
| 1878 | /** This filter is documented in wp-includes/general-template.php */ |
| 1879 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
| 1880 | |
| 1881 | if ( $echo ) { |
| 1882 | echo $output; |
| 1883 | return; |
| 1884 | } |
| 1885 | |
| 1886 | return $output; |
| 1887 | } |
| 1888 | |
| Line | Code |
| 2068 | |
| 2069 | if ( $echo ) { |
| 2070 | /** |
| 2071 | * Filters the HTML calendar output. |
| 2072 | * |
| 2073 | * @since 3.0.0 |
| 2074 | * |
| 2075 | * @param string $calendar_output HTML output of the calendar. |
| 2076 | */ |
| 2077 | echo apply_filters( 'get_calendar', $calendar_output ); |
| 2078 | return; |
| 2079 | } |
| 2080 | /** This filter is documented in wp-includes/general-template.php */ |
| 2081 | return apply_filters( 'get_calendar', $calendar_output ); |
| 2082 | } |
| 2083 | |
| 2084 | /** |
| 2085 | * Purge the cached results of get_calendar. |
| 2086 | * |
| 2087 | * @see get_calendar |
| 2088 | * @since 2.1.0 |
| 2089 | */ |
| 2090 | function delete_get_calendar_cache() { |