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 |
---|---|
1903 | */ |
1904 | function get_calendar( $initial = true, $echo = true ) { |
1905 | global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; |
1906 |
|
1907 | $key = md5( $m . $monthnum . $year ); |
1908 | $cache = wp_cache_get( 'get_calendar', 'calendar' ); |
1909 |
|
1910 | if ( $cache && is_array( $cache ) && isset( $cache[ $key ] ) ) { |
1911 | /** This filter is documented in wp-includes/general-template.php */ |
1912 | $output = apply_filters( 'get_calendar', $cache[ $key ] ); |
1913 |
|
1914 | if ( $echo ) { |
1915 | echo $output; |
1916 | return; |
1917 | } |
1918 |
|
1919 | return $output; |
1920 | } |
1921 |
|
Line | Code |
2102 |
|
2103 | if ( $echo ) { |
2104 | /** |
2105 | * Filters the HTML calendar output. |
2106 | * |
2107 | * @since 3.0.0 |
2108 | * |
2109 | * @param string $calendar_output HTML output of the calendar. |
2110 | */ |
2111 | echo apply_filters( 'get_calendar', $calendar_output ); |
2112 | return; |
2113 | } |
2114 | /** This filter is documented in wp-includes/general-template.php */ |
2115 | return apply_filters( 'get_calendar', $calendar_output ); |
2116 | } |
2117 |
|
2118 | /** |
2119 | * Purge the cached results of get_calendar. |
2120 | * |
2121 | * @see get_calendar |
2122 | * @since 2.1.0 |
2123 | */ |
2124 | function delete_get_calendar_cache() { |