Skip to content

Commit

Permalink
Comments: Add a back link to wp_die() comment form submission error…
Browse files Browse the repository at this point in the history
… display.

Fixes #4332.

Props wonderboymusic, westonruter, shamess, rachelbaker.
Built from https://develop.svn.wordpress.org/trunk@36424


git-svn-id: http://core.svn.wordpress.org/trunk@36391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
rachelbaker committed Jan 30, 2016
1 parent 98518bd commit 099b359
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wp-comments-post.php
Expand Up @@ -19,9 +19,9 @@

$comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
if ( is_wp_error( $comment ) ) {
$data = $comment->get_error_data();
$data = intval( $comment->get_error_data() );
if ( ! empty( $data ) ) {
wp_die( $comment->get_error_message(), $data );
wp_die( '<p>' . $comment->get_error_message() . '</p>', __( 'Comment Submission Failure' ), array( 'response' => $data, 'back_link' => true ) );
} else {
exit;
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Expand Up @@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-36423';
$wp_version = '4.5-alpha-36424';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 099b359

Please sign in to comment.