Pass post id along to *comment_id_fields(). Props natecook. fixes #17193
git-svn-id: https://develop.svn.wordpress.org/trunk@17812 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
771b3557c5
commit
e73ec3abe0
|
@ -1162,7 +1162,8 @@ function cancel_comment_reply_link($text = '') {
|
||||||
*
|
*
|
||||||
* @return string Hidden input HTML for replying to comments
|
* @return string Hidden input HTML for replying to comments
|
||||||
*/
|
*/
|
||||||
function get_comment_id_fields() {
|
function get_comment_id_fields( $id = 0 ) {
|
||||||
|
if ( empty( $id ) )
|
||||||
$id = get_the_ID();
|
$id = get_the_ID();
|
||||||
|
|
||||||
$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
|
$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
|
||||||
|
@ -1177,8 +1178,8 @@ function get_comment_id_fields() {
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
* @see get_comment_id_fields() Echoes result
|
* @see get_comment_id_fields() Echoes result
|
||||||
*/
|
*/
|
||||||
function comment_id_fields() {
|
function comment_id_fields( $id = 0 ) {
|
||||||
echo get_comment_id_fields();
|
echo get_comment_id_fields( $id );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1573,7 +1574,7 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||||
<?php echo $args['comment_notes_after']; ?>
|
<?php echo $args['comment_notes_after']; ?>
|
||||||
<p class="form-submit">
|
<p class="form-submit">
|
||||||
<input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
|
<input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
|
||||||
<?php comment_id_fields(); ?>
|
<?php comment_id_fields( $post_id ); ?>
|
||||||
</p>
|
</p>
|
||||||
<?php do_action( 'comment_form', $post_id ); ?>
|
<?php do_action( 'comment_form', $post_id ); ?>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue