[wp-trac] [WordPress Trac] #12217: get_comment_reply_link gets post ID from wrong place
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 21 16:44:50 UTC 2010
#12217: get_comment_reply_link gets post ID from wrong place
--------------------------+-------------------------------------------------
Reporter: juggledad | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 2.9.1
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Comment(by juggledad):
The documentation in the code says;
/**
* Retrieve HTML content for reply to comment link.
*
* The default arguments that can be override are 'add_below',
'respond_id',
* 'reply_text', 'login_text', and 'depth'. The 'login_text' argument will
be
* used, if the user must log in or register first before posting a
comment. The
* 'reply_text' will be used, if they can post a reply. The 'add_below'
and
* 'respond_id' arguments are for the JavaScript moveAddCommentForm()
function
* parameters.
*
* @since 2.7.0
*
* @param array $args Optional. Override default options.
* @param int $comment Optional. Comment being replied to.
* @param int $post Optional. Post that the comment is going to be
displayed on.
* @return string|bool|null Link to show comment form, if successful.
False, if comments are closed.
*/
Note that the parameter '$post' is OPTIONAL. Therefor the only way to
gaurentee you can find the correct post id is to use the code suggested
above.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12217#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list