Make WordPress Core


Ignore:
Timestamp:
04/17/2020 07:33:52 PM (4 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-includes/default-filters.php

    r47554 r47597  
    439439add_action( 'wp_split_shared_term_batch', '_wp_batch_split_terms' );
    440440
     441// Comment type updates.
     442add_action( 'admin_init', '_wp_check_for_scheduled_update_comment_type' );
     443add_action( 'wp_update_comment_type_batch', '_wp_batch_update_comment_type' );
     444
    441445// Email notifications.
    442446add_action( 'comment_post', 'wp_new_comment_notify_moderator' );
Note: See TracChangeset for help on using the changeset viewer.