Ticket #12893: get_comment_id_fields.diff
| File get_comment_id_fields.diff, 1.3 KB (added by zoranzaric, 3 years ago) |
|---|
-
wp-includes/comment-template.php
1131 1131 } 1132 1132 1133 1133 /** 1134 * Outputhidden input HTML for replying to comments.1134 * Retrieve hidden input HTML for replying to comments. 1135 1135 * 1136 * @ since 2.7.01136 * @return string Hidden input HTML for replying to comments 1137 1137 */ 1138 function comment_id_fields() {1138 function get_comment_id_fields() { 1139 1139 global $id; 1140 1140 1141 1141 $replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0; 1142 echo "<input type='hidden' name='comment_post_ID' value='$id' id='comment_post_ID' />\n"; 1143 echo "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n"; 1142 $result = "<input type='hidden' name='comment_post_ID' value='$id' id='comment_post_ID' />\n"; 1143 $result .= "<input type='hidden' name='comment_parent' id='comment_parent' value='$replytoid' />\n"; 1144 return $result; 1144 1145 } 1145 1146 1146 1147 /** 1148 * Output hidden input HTML for replying to comments. 1149 * 1150 * @since 2.7.0 1151 * @see get_comment_id_fields() Echoes result 1152 */ 1153 function comment_id_fields() { 1154 echo get_comment_id_fields(); 1155 } 1156 1157 /** 1147 1158 * Display text based on comment reply status. Only affects users with Javascript disabled. 1148 1159 * 1149 1160 * @since 2.7.0