Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: day_link

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
331           $month = gmdate('m', time()+(get_option('gmt_offset') * 3600));
332      if ( !$day )
333           $day = gmdate('j', time()+(get_option('gmt_offset') * 3600));
334
335      $daylink = $wp_rewrite->get_day_permastruct();
336      if ( !empty($daylink) ) {
337           $daylink = str_replace('%year%', $year, $daylink);
338           $daylink = str_replace('%monthnum%', zeroise(intval($month), 2), $daylink);
339           $daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink);
340           return apply_filters('day_link', get_option('home') . user_trailingslashit($daylink, 'day'), $year, $month, $day);
341      } else {
342           return apply_filters('day_link', get_option('home') . '/?m=' . $year . zeroise($month, 2) . zeroise($day, 2), $year, $month, $day);
343      }
344 }
345
346 /**
347  * Retrieve the permalink for the feed type.
348  *
349  * @since 1.5.0
350  *
351  * @param string $feed Optional, defaults to default feed. Feed type.