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 2 times in this file.
Line | Code |
---|---|
361 | global $wp_rewrite; |
362 | if ( !$year ) |
363 | $year = gmdate('Y', current_time('timestamp')); |
364 | if ( !$month ) |
365 | $month = gmdate('m', current_time('timestamp')); |
366 | $monthlink = $wp_rewrite->get_month_permastruct(); |
367 | if ( !empty($monthlink) ) { |
368 | $monthlink = str_replace('%year%', $year, $monthlink); |
369 | $monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink); |
370 | return apply_filters('month_link', home_url( user_trailingslashit($monthlink, 'month') ), $year, $month); |
371 | } else { |
372 | return apply_filters('month_link', home_url( '?m=' . $year . zeroise($month, 2) ), $year, $month); |
373 | } |
374 | } |
375 |
|
376 | /** |
377 | * Retrieve the permalink for the day archives with year and month. |
378 | * |
379 | * @since 1.0.0 |
380 | * |
381 | * @param bool|int $year False for current year. Integer of year. |