Ticket #17193: comment-template.diff
File comment-template.diff, 1.2 KB (added by , 13 years ago) |
---|
-
comment-template.php
1162 1162 * 1163 1163 * @return string Hidden input HTML for replying to comments 1164 1164 */ 1165 function get_comment_id_fields() { 1166 $id = get_the_ID(); 1165 function get_comment_id_fields($id = NULL) { 1166 if ($id == NULL) 1167 $id = get_the_ID(); 1167 1168 1168 1169 $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0; 1169 1170 $result = "<input type='hidden' name='comment_post_ID' value='$id' id='comment_post_ID' />\n"; … … 1177 1178 * @since 2.7.0 1178 1179 * @see get_comment_id_fields() Echoes result 1179 1180 */ 1180 function comment_id_fields( ) {1181 echo get_comment_id_fields( );1181 function comment_id_fields($id = NULL) { 1182 echo get_comment_id_fields($id); 1182 1183 } 1183 1184 1184 1185 /** … … 1573 1574 <?php echo $args['comment_notes_after']; ?> 1574 1575 <p class="form-submit"> 1575 1576 <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); ?> 1577 1578 </p> 1578 1579 <?php do_action( 'comment_form', $post_id ); ?> 1579 1580 </form>