Make WordPress Core


Ignore:
Timestamp:
06/24/2014 12:09:51 AM (10 years ago)
Author:
wonderboymusic
Message:

In comment_form(), allow name_submit to be passed to change the name attribute of the submit button.

Props obenland.
Fixes #22792.

File:
1 edited

Legend:

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

    r28654 r28813  
    20402040 *     @type string $id_form              The comment form element id attribute. Default 'commentform'.
    20412041 *     @type string $id_submit            The comment submit element id attribute. Default 'submit'.
     2042 *     @type string $name_submit          The comment submit element name attribute. Default 'submit'.
    20422043 *     @type string $title_reply          The translatable 'reply' button label. Default 'Leave a Reply'.
    20432044 *     @type string $title_reply_to       The translatable 'reply-to' button label. Default 'Leave a Reply to %s',
     
    20942095        'id_form'              => 'commentform',
    20952096        'id_submit'            => 'submit',
     2097        'name_submit'          => 'submit',
    20962098        'title_reply'          => __( 'Leave a Reply' ),
    20972099        'title_reply_to'       => __( 'Leave a Reply to %s' ),
     
    22142216                        <?php echo $args['comment_notes_after']; ?>
    22152217                        <p class="form-submit">
    2216                             <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
     2218                            <input name="<?php echo esc_attr( $args['name_submit'] ); ?>" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
    22172219                            <?php comment_id_fields( $post_id ); ?>
    22182220                        </p>
Note: See TracChangeset for help on using the changeset viewer.