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 |
---|---|
1888 | */ |
1889 | function get_calendar( $initial = true, $echo = true ) { |
1890 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
1891 |
|
1892 | $key = md5( $m . $monthnum . $year ); |
1893 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
1894 |
|
1895 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
1896 | /** This filter is documented in wp-includes/general-template.php */ |
1897 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
1898 |
|
1899 | if ( $echo ) { |
1900 | echo $output; |
1901 | return; |
1902 | } |
1903 |
|
1904 | return $output; |
1905 | } |
1906 |
|
Line | Code |
2087 |
|
2088 | if ( $echo ) { |
2089 | /** |
2090 | * Filters the HTML calendar output. |
2091 | * |
2092 | * @since 3.0.0 |
2093 | * |
2094 | * @param string $calendar_output HTML output of the calendar. |
2095 | */ |
2096 | echo apply_filters( 'get_calendar', $calendar_output ); |
2097 | return; |
2098 | } |
2099 | /** This filter is documented in wp-includes/general-template.php */ |
2100 | return apply_filters( 'get_calendar', $calendar_output ); |
2101 | } |
2102 |
|
2103 | /** |
2104 | * Purge the cached results of get_calendar. |
2105 | * |
2106 | * @see get_calendar |
2107 | * @since 2.1.0 |
2108 | */ |
2109 | function delete_get_calendar_cache() { |