Why AnsPress comments are “wordpress comments”, not post_type “ap_comment”?

Solved3.91K viewsCore
0

Why AnsPress comments are “wordpress comments”, not post_type “ap_comment”?

It certainly makes things more complicated, now wordpress may filter AnsPress comments with default wordpress comments pipeline.
I have just seen it on this anspress.io site: it holds my comment for moderation if it contains 2 or more links, but answer with such links would not be held for moderation anyway.

I can see a reason for every AP entity to be a “wp comment”.
I can see a reason for every AP entity to be a “custom post”.

But why questions and answers are custom posts, but comments are “wp comments”? What is the benefit of having it this way?

0

AnsPress comment type is anspress, so WP do not behave AP comments as default posts comments. But still this comments have to pass spam check.

You can see an example of wp-admin:

Yes, I can see that. comment_type “anspress”. Although WordPress still behave like it’s native WP comments: they are listed on dashboard, they are displayed in “Comments” where native post comments should be displayed.

What is the benefit of this inconsistency?
-anspress comments do have to pass spam check
-anspress questions and answers do NOT have to pass spam check (because wordpress do not treat them as comments, they are stored in wp_posts, not wp_comments)

As I currently see it, it will all be better, no downsides, if anspress comments would be implemented as post_type “ap_comment”.
Why am I wrong? What is your reason to use wp_comments table for storing 1/3 part of your system data, but have 2/3 of your data in wp_posts?

There is no reason for reinventing the wheel, if Wp already have a powerful comment system then why we create a new comment system for AP based on posts?
If your concern is about viewing AP comments in elsewhere rather then posts comments then it can be achieved easily using filters, will add in future.

No, not concerned about it, don’t care.

“why we create a new comment system for AP based on posts?”
The way I see it, “answers” are comments as well.
-it is something that users write under a piece of content
-it is something where can be spam links

If you don’t want to reinvent the wheel with comments (which is a good logic, I totally understand that), then why “answers” are not “wp_comments” too?
And if we go that far, why questions are not “wp_comments”?

I just want to understand logic behind your decisions, not trying to say something is wrong (yet 😉

Spam check is different thing (we will add a basic spam check in 2.4.1 for question and answers).

Answer shouldn’t be taken as comments but as child posts of question because they depend on question.
Also answer cannot be taken as a comment because question and answer have their own comments, so if there is already comments for question…how can we use comments as answer again?. Also answers have their own meta, taxonomy and terms which is possible with post type.

“so if there is already comments for question…how can we use comments as answer again?”
comment_parent
wordpress allows folded comments afaik.

I’ve got answer that I wanted.
Thank you, Rahul.