Changeset 11210
- Timestamp:
- 05/05/2009 10:22:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r11204 r11210 155 155 return apply_filters('post_link', $permalink, $post, $leavename); 156 156 } else { // if they're not using the fancy permalink option 157 $permalink = get_option('home') . '/?p=' . $post->ID;157 $permalink = user_trailingslashit(get_option('home')) . '?p=' . $post->ID; 158 158 return apply_filters('post_link', $permalink, $post, $leavename); 159 159 } … … 226 226 $link = get_page_uri($id); 227 227 $link = ( $leavename ) ? $pagestruct : str_replace('%pagename%', $link, $pagestruct); 228 $link = get_option('home') . "/$link";228 $link = user_trailingslashit(get_option('home')) . "$link"; 229 229 $link = user_trailingslashit($link, 'page'); 230 230 } else { 231 $link = get_option('home') . "/?page_id=$id";231 $link = user_trailingslashit(get_option('home')) . "?page_id=$id"; 232 232 } 233 233 … … 270 270 271 271 if (! $link ) { 272 $link = get_bloginfo('url') . "/?attachment_id=$id";272 $link = user_trailingslashit(get_bloginfo('url')) . "?attachment_id=$id"; 273 273 } 274 274 … … 293 293 return apply_filters('year_link', get_option('home') . user_trailingslashit($yearlink, 'year'), $year); 294 294 } else { 295 return apply_filters('year_link', get_option('home') . '/?m=' . $year, $year);295 return apply_filters('year_link', user_trailingslashit(get_option('home')) . '?m=' . $year, $year); 296 296 } 297 297 } … … 318 318 return apply_filters('month_link', get_option('home') . user_trailingslashit($monthlink, 'month'), $year, $month); 319 319 } else { 320 return apply_filters('month_link', get_option('home') . '/?m=' . $year . zeroise($month, 2), $year, $month);320 return apply_filters('month_link', user_trailingslashit(get_option('home')) . '?m=' . $year . zeroise($month, 2), $year, $month); 321 321 } 322 322 } … … 348 348 return apply_filters('day_link', get_option('home') . user_trailingslashit($daylink, 'day'), $year, $month, $day); 349 349 } else { 350 return apply_filters('day_link', get_option('home') . '/?m=' . $year . zeroise($month, 2) . zeroise($day, 2), $year, $month, $day);350 return apply_filters('day_link', user_trailingslashit(get_option('home')) . '?m=' . $year . zeroise($month, 2) . zeroise($day, 2), $year, $month, $day); 351 351 } 352 352 } … … 383 383 $feed = str_replace('comments_', 'comments-', $feed); 384 384 385 $output = get_option('home') . "/?feed={$feed}";385 $output = user_trailingslashit(get_option('home')) . "?feed={$feed}"; 386 386 } 387 387 … … 415 415 $type = get_post_field('post_type', $post_id); 416 416 if ( 'page' == $type ) 417 $url = get_option('home') . "/?feed=$feed&page_id=$post_id";417 $url = user_trailingslashit(get_option('home')) . "?feed=$feed&page_id=$post_id"; 418 418 else 419 $url = get_option('home') . "/?feed=$feed&p=$post_id";419 $url = user_trailingslashit(get_option('home')) . "?feed=$feed&p=$post_id"; 420 420 } 421 421 … … 469 469 470 470 if ( '' == $permalink_structure ) { 471 $link = get_option('home') . "?feed=$feed&author=" . $author_id;471 $link = user_trailingslashit(get_option('home')) . "?feed=$feed&author=" . $author_id; 472 472 } else { 473 473 $link = get_author_posts_url($author_id); … … 513 513 514 514 if ( '' == $permalink_structure ) { 515 $link = trailingslashit( get_option('home')) . "?feed=$feed&cat=" . $cat_id;515 $link = user_trailingslashit(get_option('home')) . "?feed=$feed&cat=" . $cat_id; 516 516 } else { 517 517 $link = get_category_link($cat_id); … … 552 552 553 553 if ( '' == $permalink_structure ) { 554 $link = get_option('home') . "?feed=$feed&tag=" . $tag->slug;554 $link = user_trailingslashit(get_option('home')) . "?feed=$feed&tag=" . $tag->slug; 555 555 } else { 556 556 $link = get_tag_link($tag->term_id); … … 627 627 $feed = get_default_feed(); 628 628 629 $link = get_option('home') . "?s=$search&feed=$feed";629 $link = user_trailingslashit(get_option('home')) . "?s=$search&feed=$feed"; 630 630 631 631 $link = apply_filters('search_feed_link', $link); … … 652 652 $feed = get_default_feed(); 653 653 654 $link = get_option('home') . "?s=$search&feed=comments-$feed";654 $link = user_trailingslashit(get_option('home')) . "?s=$search&feed=comments-$feed"; 655 655 656 656 $link = apply_filters('search_feed_link', $link);
Note: See TracChangeset
for help on using the changeset viewer.