Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#36594 closed enhancement (duplicate)

Add a Filter for Custom Comment Statuses

Reported by: dshanske's profile dshanske Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Comments Keywords:
Focuses: Cc:

Description

https://developer.wordpress.org/reference/functions/wp_set_comment_status/

Instead of the default being false, the default can easily be a filter that would allow the addition of Custom Comment Statuses.

As far as I know, this is the only place where comment status is hard coded.

Change History (4)

#1 @boonebgorges
9 years ago

@dshanske Can you say a little bit about the use case for introducing custom comment statuses in this way? I don't see a problem with allowing them, but I want to make sure that we don't add any stopgap filters that hamper the future development of a proper API.

#2 @dshanske
9 years ago

I was thinking about #35532, which asks for an alternative mitigation strategy for the resources used by Pingbacks.

One of the things I mentioned in regards to load as a possibility was to store the pingback and do the source verification later. So if there is a flood of pingbacks...the system could store them all but verify them over time.

That would require a comment status that reflects something that needs to go through the normal verifications and spam filters...but has not yet done so.

I could see some other use cases for those individuals who use comments in non-standard manners...such as for purchase orders and such.

Specifically in regard to this way...lowest hanging fruit. I know there are some people interested in custom comment types for 4.6. I suppose this could be implemented in a different way as part of that, if it ends up being something focused on.

This ticket was mentioned in Slack in #core-comments by boone. View the logs.


9 years ago

#4 @boonebgorges
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #20977.

Note: See TracTickets for help on using tickets.