Make WordPress Core


Ignore:
Timestamp:
04/17/2020 07:33:52 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Comments: Use comment instead of an empty string for the comment_type DB field value in comments table.

This is the first step to bring support for custom comment types into WordPress.

Add a scheduled upgrade routine to update the type value for existing comments, in batches of 100 at a time.

Props imath, aaroncampbell, jeremyfelt, dshanske.
Fixes #49236.

File:
1 edited

Legend:

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

    r47550 r47597  
    12841284        $comment_author_url   = wp_slash( $user->user_url );
    12851285        $comment_content      = trim( $_POST['content'] );
    1286         $comment_type         = isset( $_POST['comment_type'] ) ? trim( $_POST['comment_type'] ) : '';
     1286        $comment_type         = isset( $_POST['comment_type'] ) ? trim( $_POST['comment_type'] ) : 'comment';
    12871287
    12881288        if ( current_user_can( 'unfiltered_html' ) ) {
Note: See TracChangeset for help on using the changeset viewer.