WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 8 months ago

#38200 new enhancement

Store a `comment_type` for all Comments, not just custom comment types

Reported by: rachelbaker Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Comments Keywords: needs-patch comment-type
Focuses: rest-api Cc:
PR Number:

Description

Currently the comment_type column for the comments table only stores a value (like trackback or pingback) when an irregular comment object is added. Standard comments are stored with a comment_type of ''.

SELECT * FROM `wp_comments` WHERE `comment_type` = ' ';

This isn't very intuitive, and does not follow the expectations set by the post_type column in the posts table.

Changing to storing a comment_type value for all comments is also pre-requisite for supporting custom comment types (see #35214).

This change will require an upgrade routine as well as some back-compat work.

Change History (5)

#1 @bordoni
3 years ago

Would we store the value as comment? To follow the structure done by post_type been post.

#2 @rachelbaker
3 years ago

  • Keywords REST-API added

#3 @rachelbaker
3 years ago

  • Keywords comment-type added

Related #31072

#4 @ocean90
3 years ago

  • Focuses rest-api added
  • Keywords REST-API removed

#5 @desrosj
8 months ago

  • Milestone changed from Awaiting Review to Future Release
Note: See TracTickets for help on using tickets.