Support » Plugins and Hacks » Hacks » comment_form() does not pass post_id argument onto comments_open()

  • I noticed today that comment_form() does not pass the $post_id argument onto comments_open() on line 1550 of comment-template.php. This presents a challenge when one wants to, for whatever reason, display a comment_form() outside of post context (or, perhaps in their own post context).

    By simply passing $post_id to comments_open() the form will display correctly.

    Comments read:

    @param mixed $post_id Post ID to generate the form for, uses the current post if null

    In fact, the form will _only_ generate if there is a current post.

    Curious to know your thoughts on this.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘comment_form() does not pass post_id argument onto comments_open()’ is closed to new replies.