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
128     if (!$year) $year = gmdate('Y', time()+(get_settings('gmt_offset') * 3600));
129     if (!$month) $month = gmdate('m', time()+(get_settings('gmt_offset') * 3600));
130     if (!$day) $day = gmdate('j', time()+(get_settings('gmt_offset') * 3600));
131
132           $daylink = $wp_rewrite->get_day_permastruct();
133     if (!empty($daylink)) {
134         $daylink = str_replace('%year%', $year, $daylink);
135         $daylink = str_replace('%monthnum%', zeroise(intval($month), 2), $daylink);
136         $daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink);
137         return apply_filters('day_link', get_settings('home') . trailingslashit($daylink), $year, $month, $day);
138     } else {
139         return apply_filters('day_link', get_settings('home') . '/?m=' . $year . zeroise($month, 2) . zeroise($day, 2), $year, $month, $day);
140     }
141 }
142
143 function get_feed_link($feed='rss2') {
144      global $wp_rewrite;
145      $do_perma = 0;
146      $feed_url = get_settings('siteurl');
147      $comment_feed_url = $feed_url;
148