[wp-trac] [WordPress Trac] #18259: Comment_ID() should be relative to the article
WordPress Trac
wp-trac at lists.automattic.com
Tue Jul 26 15:33:53 UTC 2011
#18259: Comment_ID() should be relative to the article
--------------------------+-----------------------------
Reporter: gazpachu | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version: 3.2.1
Severity: normal | Keywords: needs-patch
--------------------------+-----------------------------
After posting a comment, the anchor to the comment_ID is attached to the
URL to send the user to his new comment.
This comment_ID should be relative to the article instead of showing the
ID of the last comment in our wordpress DB.
i.e. I'm getting "<li id="comment-4833" ..." in an article that has two
comments. And the URL is: "http://domain.ltd/post-name#comment4833", when
it should be "http://domain.ltd/post-name#comment2"
The code:
{{{
<li <?php if($depth > 1) {echo comment_class('comment-replied');} else
{echo comment_class();}; ?> id="comment-<?php comment_ID() ?>">
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18259>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list