WordPress.org

Make WordPress Core

Changeset 37208


Ignore:
Timestamp:
04/14/2016 06:17:23 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Comments: Allow for default comment form action, /wp-comments-post.php, to be changed via the comment_form_defaults filter.

Props cliffseal.
Fixes #26841.

File:
1 edited

Legend:

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

    r36918 r37208  
    20662066 * @since 4.5.0 The 'author', 'email', and 'url' form fields are limited to 245, 100,
    20672067 *              and 200 characters, respectively.
     2068 * @since 4.6.0 Introduced the 'action' argument.
    20682069 *
    20692070 * @param array       $args {
     
    20842085 *                                        Default 'Your email address will not be published.'.
    20852086 *     @type string $comment_notes_after  HTML element for a message displayed after the textarea field.
     2087 *     @type string $action               The comment form element action attribute. Default '/wp-comments-post.php'.
    20862088 *     @type string $id_form              The comment form element id attribute. Default 'commentform'.
    20872089 *     @type string $id_submit            The comment submit element id attribute. Default 'submit'.
     
    21652167        'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>',
    21662168        'comment_notes_after'  => '',
     2169        'action'               => site_url( '/wp-comments-post.php' ),
    21672170        'id_form'              => 'commentform',
    21682171        'id_submit'            => 'submit',
     
    22292232                do_action( 'comment_form_must_log_in_after' );
    22302233            else : ?>
    2231                 <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo esc_attr( $args['class_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>>
     2234                <form action="<?php echo esc_url( $args['action'] ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo esc_attr( $args['class_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>>
    22322235                    <?php
    22332236                    /**
Note: See TracChangeset for help on using the changeset viewer.