comment_id_fields(). see #7635

git-svn-id: http://svn.automattic.com/wordpress/trunk@9175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-10-14 19:06:18 +00:00
parent a6aff48081
commit 461b32e12c
2 changed files with 5 additions and 3 deletions

View File

@ -78,8 +78,7 @@
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p> <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /> <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> <?php comment_id_fields(); ?>
<?php comment_parent_field(); ?>
</p> </p>
<?php do_action('comment_form', $post->ID); ?> <?php do_action('comment_form', $post->ID); ?>

View File

@ -936,8 +936,11 @@ function cancel_comment_reply_link($text = '') {
* *
* @since 2.7.0 * @since 2.7.0
*/ */
function comment_parent_field() { function comment_id_fields() {
global $id;
$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0; $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
echo "<input type='hidden' name='comment_post_ID' value='$id' />\n";
echo "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n"; echo "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n";
} }