In `wp_ajax_replyto_comment()`, if `$_POST['comment_type']` is set, use it for the value of `$comment_type`, which the `compact()` call has assumed is set since [8720]. It never was.
`wp_comment_reply()`'s output can be complete overridden by the `wp_comment_reply` filter, so this check is justified and makes the AJAX callback more flexible. Props nerrad. Fixes #29704. Built from https://develop.svn.wordpress.org/trunk@29758 git-svn-id: http://core.svn.wordpress.org/trunk@29530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9768b89cc7
commit
2f328cc4c1
|
@ -935,7 +935,8 @@ function wp_ajax_replyto_comment( $action ) {
|
|||
$comment_author = wp_slash( $user->display_name );
|
||||
$comment_author_email = wp_slash( $user->user_email );
|
||||
$comment_author_url = wp_slash( $user->user_url );
|
||||
$comment_content = trim($_POST['content']);
|
||||
$comment_content = trim( $_POST['content'] );
|
||||
$comment_type = isset( $_POST['comment_type'] ) ? trim( $_POST['comment_type'] ) : '';
|
||||
if ( current_user_can( 'unfiltered_html' ) ) {
|
||||
if ( ! isset( $_POST['_wp_unfiltered_html_comment'] ) )
|
||||
$_POST['_wp_unfiltered_html_comment'] = '';
|
||||
|
|
Loading…
Reference in New Issue