Comments: Add a back link to wp_die() comment form submission error 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
This commit is contained in:
Rachel Baker 2016-01-30 21:56:27 +00:00
parent 98518bdd4d
commit 099b35933d
2 changed files with 3 additions and 3 deletions

View File

@ -19,9 +19,9 @@ nocache_headers();
$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;
}

View File

@ -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.