Changeset 1451
- Timestamp:
- 07/06/2004 05:04:07 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-general.php
r1435 r1451 142 142 143 143 function single_month_title($prefix = '', $display = true ) { 144 145 146 $my_year = substr($m,0,4);147 $my_month = $month[substr($m,4,2)];148 149 echo $prefix.$my_month.$prefix.$my_year;150 151 152 144 global $m, $month; 145 if(!empty($m)) { 146 $my_year = substr($m, 0, 4); 147 $my_month = $month[substr($m, 4, 2)]; 148 if ($display) 149 echo $prefix . $my_month . $prefix . $my_year; 150 else 151 return $m; 152 } 153 153 } 154 154 155 155 /* link navigation hack by Orien http://icecode.com/ */ 156 function get_archives_link($url, $text, $format = "html", $before = "", $after = "") { 157 if ('link' == $format) { 158 return "\t".'<link rel="archives" title="'.$text.'" href="'.$url.'" />'."\n"; 159 } else if ('option' == $format) { 160 return '<option value="'.$url.'">'.$text.'</option>'."\n"; 161 } else if ('html' == $format) { 162 return "\t".'<li><a href="'.$url.'" title="'.$text.'">'.$text.'</a>'.$after.'</li>'."\n"; 163 } else { // custom 164 return "\t".$before.'<a href="'.$url.'" title="'.$text.'">'.$text.'</a>'.$after."\n"; 165 } 156 function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') { 157 $text = wptexturize($text); 158 if ('link' == $format) { 159 return "\t<link rel='archives' title='$text' href='$url' />\n"; 160 } elseif ('option' == $format) { 161 return "\t<option value='$url'>$text</option>\n"; 162 } elseif ('html' == $format) { 163 return "\t<li>$before<a href='$url' title='$text'>$text</a>$after</li>\n"; 164 } else { // custom 165 return "\t$before<a href='$url' title='$text'>$text</a>$after\n"; 166 } 166 167 } 167 168
Note: See TracChangeset
for help on using the changeset viewer.