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 |
---|---|
1777 | */ |
1778 | function get_calendar( $initial = true, $echo = true ) { |
1779 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
1780 |
|
1781 | $key = md5( $m . $monthnum . $year ); |
1782 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
1783 |
|
1784 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
1785 | /** This filter is documented in wp-includes/general-template.php */ |
1786 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
1787 |
|
1788 | if ( $echo ) { |
1789 | echo $output; |
1790 | return; |
1791 | } |
1792 |
|
1793 | return $output; |
1794 | } |
1795 |
|
Line | Code |
1975 |
|
1976 | if ( $echo ) { |
1977 | /** |
1978 | * Filter the HTML calendar output. |
1979 | * |
1980 | * @since 3.0.0 |
1981 | * |
1982 | * @param string $calendar_output HTML output of the calendar. |
1983 | */ |
1984 | echo apply_filters( 'get_calendar', $calendar_output ); |
1985 | return; |
1986 | } |
1987 | /** This filter is documented in wp-includes/general-template.php */ |
1988 | return apply_filters( 'get_calendar', $calendar_output ); |
1989 | } |
1990 |
|
1991 | /** |
1992 | * Purge the cached results of get_calendar. |
1993 | * |
1994 | * @see get_calendar |
1995 | * @since 2.1.0 |
1996 | */ |
1997 | function delete_get_calendar_cache() { |