Comments: Allow for default comment form action, `/wp-comments-post.php`, to be changed via the `comment_form_defaults` filter.
Props cliffseal. Fixes #26841. Built from https://develop.svn.wordpress.org/trunk@37208 git-svn-id: http://core.svn.wordpress.org/trunk@37174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4074bcc6a1
commit
8e498b933d
|
@ -2065,6 +2065,7 @@ function wp_list_comments( $args = array(), $comments = null ) {
|
||||||
* 'cancel_reply_before', and 'cancel_reply_after' arguments.
|
* 'cancel_reply_before', and 'cancel_reply_after' arguments.
|
||||||
* @since 4.5.0 The 'author', 'email', and 'url' form fields are limited to 245, 100,
|
* @since 4.5.0 The 'author', 'email', and 'url' form fields are limited to 245, 100,
|
||||||
* and 200 characters, respectively.
|
* and 200 characters, respectively.
|
||||||
|
* @since 4.6.0 Introduced the 'action' argument.
|
||||||
*
|
*
|
||||||
* @param array $args {
|
* @param array $args {
|
||||||
* Optional. Default arguments and form fields to override.
|
* Optional. Default arguments and form fields to override.
|
||||||
|
@ -2083,6 +2084,7 @@ function wp_list_comments( $args = array(), $comments = null ) {
|
||||||
* if the user is not logged in.
|
* if the user is not logged in.
|
||||||
* Default 'Your email address will not be published.'.
|
* Default 'Your email address will not be published.'.
|
||||||
* @type string $comment_notes_after HTML element for a message displayed after the textarea field.
|
* @type string $comment_notes_after HTML element for a message displayed after the textarea field.
|
||||||
|
* @type string $action The comment form element action attribute. Default '/wp-comments-post.php'.
|
||||||
* @type string $id_form The comment form element id attribute. Default 'commentform'.
|
* @type string $id_form The comment form element id attribute. Default 'commentform'.
|
||||||
* @type string $id_submit The comment submit element id attribute. Default 'submit'.
|
* @type string $id_submit The comment submit element id attribute. Default 'submit'.
|
||||||
* @type string $class_form The comment form element class attribute. Default 'comment-form'.
|
* @type string $class_form The comment form element class attribute. Default 'comment-form'.
|
||||||
|
@ -2164,6 +2166,7 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||||
) . '</p>',
|
) . '</p>',
|
||||||
'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>',
|
'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>',
|
||||||
'comment_notes_after' => '',
|
'comment_notes_after' => '',
|
||||||
|
'action' => site_url( '/wp-comments-post.php' ),
|
||||||
'id_form' => 'commentform',
|
'id_form' => 'commentform',
|
||||||
'id_submit' => 'submit',
|
'id_submit' => 'submit',
|
||||||
'class_form' => 'comment-form',
|
'class_form' => 'comment-form',
|
||||||
|
@ -2228,7 +2231,7 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||||
*/
|
*/
|
||||||
do_action( 'comment_form_must_log_in_after' );
|
do_action( 'comment_form_must_log_in_after' );
|
||||||
else : ?>
|
else : ?>
|
||||||
<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' : ''; ?>>
|
<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' : ''; ?>>
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Fires at the top of the comment form, inside the form tag.
|
* Fires at the top of the comment form, inside the form tag.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6-alpha-37207';
|
$wp_version = '4.6-alpha-37208';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue