WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #12668, comment 18


Ignore:
Timestamp:
06/22/2013 05:49:52 PM (6 years ago)
Author:
joshlevinson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12668, comment 18

    initial v1  
    1 I would also like to see custom comment types. I will probably end up using comment taxonomies for now (if I can), but I could see types becoming very useful. For example, along with registering a post type, I could register a comment type ( think Products with Product FAQs and Product Reviews ). Querying, submitting, and segregating these different types of comments would be easier done as a comment type IMHO.
     1I could see types becoming very useful. For example, along with registering a post type, I could register a comment type ( think Products with Product FAQs and Product Reviews ). Querying, submitting, and segregating these different types of comments would be easier done as a comment type IMHO.
     2
     3I'm thinking about tackling this, but the repercussions of changing this extend into many areas of the admin and obviously into the core of comments itself. I am considering re-working `edit-comments.php` to behave similar to edit.php in that it can be used for editing custom types.
     4
     5Technically, comment types are already possible (albeit in a bare-bones manner) in that if you alter a comment in the database by putting something in the `comment_type` field, then visit `/wp-admin/edit-comments.php?comment_type=abc`, the listed comments will be filtered and your single comment will be present, inheriting all the functionality of the comment list table view. This is because WP is already setup to filter the displayed comments by comment type, although only with the built-in pingback and trackback in mind.
     6
     7I have been able to replicate much of the functionality of `register_post_type`, along with it's related functions like `get_post_type_object`, `get_comment_types`, etc.
     8
     9What is hanging me up is whether or not to actually register the default comment types with the new `register_comment_type` functions, the same way that posts, pages, etc. are registered through `register_post_type` on init.
     10
     11Any thoughts on this?
     12
     13My gut tells me that this is the correct avenue, but I also think that doing so will require a significant re-work of how comments already work (but maybe not, that's why I'm asking). Sorry for the book, I'm just trying to lay out my thoughts on the matter.