Changeset 31699
- Timestamp:
- 03/10/2015 07:07:31 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r31518 r31699 2154 2154 * 2155 2155 * @since 3.0.0 2156 * @since 4.2.0 Introduced 'submit_button' and 'submit_fields' arguments. 2156 2157 * 2157 2158 * @param array $args { … … 2181 2182 * @type string $cancel_reply_link The translatable 'cancel reply' button label. Default 'Cancel reply'. 2182 2183 * @type string $label_submit The translatable 'submit' button label. Default 'Post a comment'. 2184 * @type string $submit_button HTML format for the Submit button. 2185 * Default: '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />'. 2186 * @type string $submit_field HTML format for the markup surrounding the Submit button and comment hidden 2187 * fields. Default: '<p class="form-submit">%1$s %2$s</a>', where %1$s is the 2188 * submit button markup and %2$s is the comment hidden fields. 2183 2189 * @type string $format The comment form format. Default 'xhtml'. Accepts 'xhtml', 'html5'. 2184 2190 * } … … 2237 2243 'cancel_reply_link' => __( 'Cancel reply' ), 2238 2244 'label_submit' => __( 'Post Comment' ), 2245 'submit_button' => '<input name="%1$s" type="submit" id="%2$s" class="%3$s" value="%4$s" />', 2246 'submit_field' => '<p class="form-submit">%1$s %2$s</p>', 2239 2247 'format' => 'xhtml', 2240 2248 ); … … 2351 2359 ?> 2352 2360 <?php echo $args['comment_notes_after']; ?> 2353 <p class="form-submit"> 2354 <input name="<?php echo esc_attr( $args['name_submit'] ); ?>" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" class="<?php echo esc_attr( $args['class_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" /> 2355 <?php comment_id_fields( $post_id ); ?> 2356 </p> 2361 2357 2362 <?php 2363 $submit_button = sprintf( 2364 $args['submit_button'], 2365 esc_attr( $args['name_submit'] ), 2366 esc_attr( $args['id_submit'] ), 2367 esc_attr( $args['class_submit'] ), 2368 esc_attr( $args['label_submit'] ) 2369 ); 2370 2371 /** 2372 * Filter the submit button for the comment form to display. 2373 * 2374 * @since 4.2.0 2375 * 2376 * @param string $submit_button HTML markup for the submit button. 2377 * @param array $args Arguments passed to `comment_form()`. 2378 */ 2379 $submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args ); 2380 2381 $submit_field = sprintf( 2382 $args['submit_field'], 2383 $submit_button, 2384 get_comment_id_fields( $post_id ) 2385 ); 2386 2387 /** 2388 * Filter the submit field for the comment form to display. 2389 * 2390 * The submit field includes the submit button, hidden fields for the 2391 * comment form, and any wrapper markup. 2392 * 2393 * @since 4.2.0 2394 * 2395 * @param string $submit_field HTML markup for the submit field. 2396 * @param array $args Arguments passed to `comment_form()`. 2397 */ 2398 echo apply_filters( 'comment_form_submit_field', $submit_field, $args ); 2399 2358 2400 /** 2359 2401 * Fires at the bottom of the comment form, inside the closing </form> tag.
Note: See TracChangeset
for help on using the changeset viewer.