WordPress.org

Make WordPress Core

Changeset 29758


Ignore:
Timestamp:
09/23/2014 03:28:51 AM (6 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r29681 r29758  
    936936        $comment_author_email = wp_slash( $user->user_email );
    937937        $comment_author_url   = wp_slash( $user->user_url );
    938         $comment_content      = trim($_POST['content']);
     938        $comment_content      = trim( $_POST['content'] );
     939        $comment_type         = isset( $_POST['comment_type'] ) ? trim( $_POST['comment_type'] ) : '';
    939940        if ( current_user_can( 'unfiltered_html' ) ) {
    940941            if ( ! isset( $_POST['_wp_unfiltered_html_comment'] ) )
Note: See TracChangeset for help on using the changeset viewer.