XHTML 1.1 compliant permalink

git-svn-id: http://svn.automattic.com/wordpress/trunk@205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-06-11 19:48:43 +00:00
parent 9c41f0e153
commit 9636e717eb

View File

@ -1126,7 +1126,7 @@ function permalink_anchor($mode = 'id') {
break; break;
case 'id': case 'id':
default: default:
echo '<a name="'.$id.'"></a>'; echo '<a name="post-'.$id.'"></a>';
break; break;
} }
} }
@ -1148,17 +1148,17 @@ function permalink_link($file='', $mode = 'id') {
$archive_mode = get_settings('archive_mode'); $archive_mode = get_settings('archive_mode');
switch($archive_mode) { switch($archive_mode) {
case 'daily': case 'daily':
echo $file.$querystring_start.'m'.$querystring_equal.substr($post->post_date,0,4).substr($post->post_date,5,2).substr($postdata['Date'],8,2).'#'.$anchor; echo $file.$querystring_start.'m'.$querystring_equal.substr($post->post_date,0,4).substr($post->post_date,5,2).substr($postdata['Date'],8,2).'#post-'.$anchor;
break; break;
case 'monthly': case 'monthly':
echo $file.$querystring_start.'m'.$querystring_equal.substr($post->post_date,0,4).substr($post->post_date,5,2).'#'.$anchor; echo $file.$querystring_start.'m'.$querystring_equal.substr($post->post_date,0,4).substr($post->post_date,5,2).'#post-'.$anchor;
break; break;
case 'weekly': case 'weekly':
if((!isset($cacheweekly)) || (empty($cacheweekly[$postdata['Date']]))) { if((!isset($cacheweekly)) || (empty($cacheweekly[$postdata['Date']]))) {
$cacheweekly[$post->post_date] = $wpdb->get_var("SELECT WEEK('$post->post_date')"); $cacheweekly[$post->post_date] = $wpdb->get_var("SELECT WEEK('$post->post_date')");
++$querycount; ++$querycount;
} }
echo $file.$querystring_start.'m'.$querystring_equal.substr($post->post_date,0,4).$querystring_separator.'w'.$querystring_equal.$cacheweekly[$post->post_date].'#'.$anchor; echo $file.$querystring_start.'m'.$querystring_equal.substr($post->post_date,0,4).$querystring_separator.'w'.$querystring_equal.$cacheweekly[$post->post_date].'#post-'.$anchor;
break; break;
case 'postbypost': case 'postbypost':
echo $file.$querystring_start.'p'.$querystring_equal.$id; echo $file.$querystring_start.'p'.$querystring_equal.$id;