Changeset 4144 for trunk/wp-includes/link-template.php
- Timestamp:
- 08/30/2006 09:46:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r4133 r4144 48 48 return get_attachment_link($post->ID); 49 49 50 $permalink = get_ settings('permalink_structure');50 $permalink = get_option('permalink_structure'); 51 51 52 52 if ( '' != $permalink && 'draft' != $post->post_status ) { … … 78 78 $post->post_name, 79 79 ); 80 return apply_filters('post_link', get_ settings('home') . str_replace($rewritecode, $rewritereplace, $permalink), $post);80 return apply_filters('post_link', get_option('home') . str_replace($rewritecode, $rewritereplace, $permalink), $post); 81 81 } else { // if they're not using the fancy permalink option 82 $permalink = get_ settings('home') . '/?p=' . $post->ID;82 $permalink = get_option('home') . '/?p=' . $post->ID; 83 83 return apply_filters('post_link', $permalink, $post); 84 84 } … … 101 101 $link = get_page_uri($id); 102 102 $link = str_replace('%pagename%', $link, $pagestruct); 103 $link = get_ settings('home') . "/$link/";104 } else { 105 $link = get_ settings('home') . "/?page_id=$id";103 $link = get_option('home') . "/$link/"; 104 } else { 105 $link = get_option('home') . "/?page_id=$id"; 106 106 } 107 107 108 108 if ( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) 109 $link = get_ settings('home');109 $link = get_option('home'); 110 110 111 111 return apply_filters('page_link', $link, $id); … … 139 139 global $wp_rewrite; 140 140 if ( !$year ) 141 $year = gmdate('Y', time()+(get_ settings('gmt_offset') * 3600));141 $year = gmdate('Y', time()+(get_option('gmt_offset') * 3600)); 142 142 $yearlink = $wp_rewrite->get_year_permastruct(); 143 143 if ( !empty($yearlink) ) { 144 144 $yearlink = str_replace('%year%', $year, $yearlink); 145 return apply_filters('year_link', get_ settings('home') . trailingslashit($yearlink), $year);146 } else { 147 return apply_filters('year_link', get_ settings('home') . '/?m=' . $year, $year);145 return apply_filters('year_link', get_option('home') . trailingslashit($yearlink), $year); 146 } else { 147 return apply_filters('year_link', get_option('home') . '/?m=' . $year, $year); 148 148 } 149 149 } … … 152 152 global $wp_rewrite; 153 153 if ( !$year ) 154 $year = gmdate('Y', time()+(get_ settings('gmt_offset') * 3600));154 $year = gmdate('Y', time()+(get_option('gmt_offset') * 3600)); 155 155 if ( !$month ) 156 $month = gmdate('m', time()+(get_ settings('gmt_offset') * 3600));156 $month = gmdate('m', time()+(get_option('gmt_offset') * 3600)); 157 157 $monthlink = $wp_rewrite->get_month_permastruct(); 158 158 if ( !empty($monthlink) ) { 159 159 $monthlink = str_replace('%year%', $year, $monthlink); 160 160 $monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink); 161 return apply_filters('month_link', get_ settings('home') . trailingslashit($monthlink), $year, $month);162 } else { 163 return apply_filters('month_link', get_ settings('home') . '/?m=' . $year . zeroise($month, 2), $year, $month);161 return apply_filters('month_link', get_option('home') . trailingslashit($monthlink), $year, $month); 162 } else { 163 return apply_filters('month_link', get_option('home') . '/?m=' . $year . zeroise($month, 2), $year, $month); 164 164 } 165 165 } … … 168 168 global $wp_rewrite; 169 169 if ( !$year ) 170 $year = gmdate('Y', time()+(get_ settings('gmt_offset') * 3600));170 $year = gmdate('Y', time()+(get_option('gmt_offset') * 3600)); 171 171 if ( !$month ) 172 $month = gmdate('m', time()+(get_ settings('gmt_offset') * 3600));172 $month = gmdate('m', time()+(get_option('gmt_offset') * 3600)); 173 173 if ( !$day ) 174 $day = gmdate('j', time()+(get_ settings('gmt_offset') * 3600));174 $day = gmdate('j', time()+(get_option('gmt_offset') * 3600)); 175 175 176 176 $daylink = $wp_rewrite->get_day_permastruct(); … … 179 179 $daylink = str_replace('%monthnum%', zeroise(intval($month), 2), $daylink); 180 180 $daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink); 181 return apply_filters('day_link', get_ settings('home') . trailingslashit($daylink), $year, $month, $day);182 } else { 183 return apply_filters('day_link', get_ settings('home') . '/?m=' . $year . zeroise($month, 2) . zeroise($day, 2), $year, $month, $day);181 return apply_filters('day_link', get_option('home') . trailingslashit($daylink), $year, $month, $day); 182 } else { 183 return apply_filters('day_link', get_option('home') . '/?m=' . $year . zeroise($month, 2) . zeroise($day, 2), $year, $month, $day); 184 184 } 185 185 } … … 188 188 global $wp_rewrite; 189 189 $do_perma = 0; 190 $feed_url = get_ settings('siteurl');190 $feed_url = get_option('siteurl'); 191 191 $comment_feed_url = $feed_url; 192 192 … … 203 203 $permalink = str_replace('%feed%', $feed, $permalink); 204 204 $permalink = preg_replace('#/+#', '/', "/$permalink/"); 205 $output = get_ settings('home') . $permalink;205 $output = get_option('home') . $permalink; 206 206 } else { 207 207 if ( false !== strpos($feed, 'comments_') ) 208 208 $feed = str_replace('comments_', 'comments-', $feed); 209 209 210 $output = get_ settings('home') . "/?feed={$feed}";210 $output = get_option('home') . "/?feed={$feed}"; 211 211 } 212 212 … … 230 230 } 231 231 232 $location = get_ settings('siteurl') . "/wp-admin/{$file}.php?action=edit&post=$post->ID";232 $location = get_option('siteurl') . "/wp-admin/{$file}.php?action=edit&post=$post->ID"; 233 233 echo $before . "<a href=\"$location\">$link</a>" . $after; 234 234 } … … 245 245 } 246 246 247 $location = get_ settings('siteurl') . "/wp-admin/comment.php?action=editcomment&comment=$comment->comment_ID";247 $location = get_option('siteurl') . "/wp-admin/comment.php?action=editcomment&comment=$comment->comment_ID"; 248 248 echo $before . "<a href='$location'>$link</a>" . $after; 249 249 } … … 363 363 $permalink = 0; 364 364 365 $home_root = parse_url(get_ settings('home'));365 $home_root = parse_url(get_option('home')); 366 366 $home_root = $home_root['path']; 367 367 $home_root = trailingslashit($home_root); … … 391 391 $qstr .= '&' . $page_querystring . '=' . $pagenum; 392 392 // otherwise, it could be rewritten, OR just the default index ... 393 } elseif( '' != get_ settings('permalink_structure') && ! is_admin() ) {393 } elseif( '' != get_option('permalink_structure') && ! is_admin() ) { 394 394 $permalink = 1; 395 395 $index = $wp_rewrite->index; … … 413 413 if ( $permalink ) 414 414 $qstr = trailingslashit($qstr); 415 $qstr = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_ settings('home') ) . $qstr );415 $qstr = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_option('home') ) . $qstr ); 416 416 417 417 // showing /page/1/ or ?paged=1 is redundant
Note: See TracChangeset
for help on using the changeset viewer.