Changeset 9367 for trunk/wp-includes/comment-template.php
- Timestamp:
- 10/27/2008 04:31:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-template.php
r9317 r9367 403 403 404 404 /** 405 * Retrieve the link to the currentcomment.405 * Retrieve the link to a given comment. 406 406 * 407 407 * @since 1.5.0 … … 412 412 */ 413 413 function get_comment_link($comment = null) { 414 global $wp_rewrite; 415 414 416 $comment = get_comment($comment); 415 return get_permalink( $comment->comment_post_ID ) . '#comment-' . $comment->comment_ID; 417 418 if ( get_option('page_comments') ) { 419 $page = get_page_of_comment( $comment->comment_ID ); 420 421 if ( $wp_rewrite->using_permalinks() ) 422 return user_trailingslashit( trailingslashit( get_permalink( $comment->comment_post_ID ) ) . "comment-page-$page", 'comment' ) . '#comment-' . $comment->comment_ID; 423 else 424 return add_query_arg( 'cpage', $page, get_permalink( $comment->comment_post_ID ) ) . '#comment-' . $comment->comment_ID; 425 } else { 426 return get_permalink( $comment->comment_post_ID ) . '#comment-' . $comment->comment_ID; 427 } 416 428 } 417 429 … … 1086 1098 <?php endif; ?> 1087 1099 1088 <div class="comment-meta commentmetadata"><a href=" #comment-<?php comment_ID() ?>" title=""><?php printf(__('%1$s at %2$s'), get_comment_date('F jS, Y'), get_comment_time()) ?></a><?php edit_comment_link('edit',' ','') ?></div>1100 <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date('F jS, Y'), get_comment_time()) ?></a><?php edit_comment_link('edit',' ','') ?></div> 1089 1101 1090 1102 <?php echo apply_filters('comment_text', get_comment_text()) ?>
Note: See TracChangeset
for help on using the changeset viewer.