Changeset 945 for trunk/wp-includes/template-functions-links.php
- Timestamp:
- 02/26/2004 04:15:48 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-links.php
r935 r945 36 36 37 37 function permalink_single_rss($file = '') { 38 global $siteurl;39 38 echo get_permalink(); 40 39 } … … 42 41 function get_permalink($id=false) { 43 42 global $post, $wpdb, $tableposts; 44 global $ siteurl, $blogfilename, $querystring_start, $querystring_equal;43 global $querystring_start, $querystring_equal; 45 44 46 45 $rewritecode = array( … … 61 60 $post->ID 62 61 ); 63 return $siteurl. str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure'));62 return get_settings('siteurl') . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); 64 63 } else { // if they're not using the fancy permalink option 65 return $siteurl . '/' . $blogfilename.$querystring_start.'p'.$querystring_equal.$post->ID;64 return get_settings('siteurl') . '/' . get_settings('blogfilename').$querystring_start.'p'.$querystring_equal.$post->ID; 66 65 } 67 66 } else { // if an ID is given … … 76 75 $id 77 76 ); 78 return $siteurl. str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure'));77 return get_settings('siteurl') . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure')); 79 78 } else { 80 return $siteurl . '/' . $blogfilename.$querystring_start.'p'.$querystring_equal.$id;79 return get_settings('siteurl') . '/' . get_settings('blogfilename').$querystring_start.'p'.$querystring_equal.$id; 81 80 } 82 81 } … … 84 83 85 84 function get_month_link($year, $month) { 86 global $ siteurl, $blogfilename, $querystring_start, $querystring_equal;85 global $querystring_start, $querystring_equal; 87 86 if (!$year) $year = date('Y', time()+($time_difference * 3600)); 88 87 if (!$month) $month = date('m', time()+($time_difference * 3600)); … … 95 94 $monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink); 96 95 $monthlink = str_replace('%post_id%', '', $monthlink); 97 return $siteurl. $monthlink;96 return get_settings('siteurl') . $monthlink; 98 97 } else { 99 return $siteurl.'/'.$blogfilename.$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2);98 return get_settings('siteurl') .'/'. get_settings('blogfilename') .$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2); 100 99 } 101 100 } 102 101 103 102 function get_day_link($year, $month, $day) { 104 global $ siteurl, $blogfilename, $querystring_start, $querystring_equal;103 global $querystring_start, $querystring_equal; 105 104 if (!$year) $year = date('Y', time()+($time_difference * 3600)); 106 105 if (!$month) $month = date('m', time()+($time_difference * 3600)); … … 115 114 $daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink); 116 115 $daylink = str_replace('%post_id%', '', $daylink); 117 return $siteurl. $daylink;116 return get_settings('siteurl') . $daylink; 118 117 } else { 119 return $siteurl.'/'.$blogfilename.$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2).zeroise($day, 2);118 return get_settings('siteurl') .'/'. get_settings('blogfilename') .$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2).zeroise($day, 2); 120 119 } 121 120 } 122 121 123 122 function edit_post_link($link = 'Edit This', $before = '', $after = '') { 124 global $user_level, $post , $siteurl;123 global $user_level, $post; 125 124 126 125 get_currentuserinfo(); … … 135 134 } 136 135 137 $location = "$siteurl/wp-admin/post.php?action=edit&post=$post->ID";136 $location = get_settings('siteurl') . "/wp-admin/post.php?action=edit&post=$post->ID"; 138 137 echo "$before <a href=\"$location\">$link</a> $after"; 139 138 } 140 139 141 140 function edit_comment_link($link = 'Edit This', $before = '', $after = '') { 142 global $user_level, $post, $comment , $siteurl;141 global $user_level, $post, $comment; 143 142 144 143 get_currentuserinfo(); … … 153 152 } 154 153 155 $location = "$siteurl/wp-admin/post.php?action=editcomment&comment=$comment->comment_ID";154 $location = get_settings('siteurl') . "/wp-admin/post.php?action=editcomment&comment=$comment->comment_ID"; 156 155 echo "$before <a href=\"$location\">$link</a> $after"; 157 156 }
Note: See TracChangeset
for help on using the changeset viewer.