WordPress.org

Make WordPress Core

Changeset 17812


Ignore:
Timestamp:
05/05/2011 07:33:47 PM (7 years ago)
Author:
ryan
Message:

Pass post id along to *comment_id_fields(). Props natecook. fixes #17193

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-template.php

    r17071 r17812  
    11631163 * @return string Hidden input HTML for replying to comments
    11641164 */
    1165 function get_comment_id_fields() {
    1166     $id = get_the_ID();
     1165function get_comment_id_fields( $id = 0 ) {
     1166    if ( empty( $id ) )
     1167        $id = get_the_ID();
    11671168
    11681169    $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
     
    11781179 * @see get_comment_id_fields() Echoes result
    11791180 */
    1180 function comment_id_fields() {
    1181     echo get_comment_id_fields();
     1181function comment_id_fields( $id = 0 ) {
     1182    echo get_comment_id_fields( $id );
    11821183}
    11831184
     
    15741575                        <p class="form-submit">
    15751576                            <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
    1576                             <?php comment_id_fields(); ?>
     1577                            <?php comment_id_fields( $post_id ); ?>
    15771578                        </p>
    15781579                        <?php do_action( 'comment_form', $post_id ); ?>
Note: See TracChangeset for help on using the changeset viewer.