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