#14550 closed feature request (invalid)
No action when comments are closed by WP after close_comments_days_old
Reported by: | gormer | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | trivial | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
There doesn't seem to be any action triggered when comments for a post is closed by WordPress itself.
The function in question is called _close_comments_for_old_posts in wp-includes/comment.php
The use-case I want to support is dispatching a request to external archiving system after WP closes the comments.
Since comments also could be closed from a number of other reasons, I suggest adding just an event for the particular case that a comment gets closed by WP itself. That is, when the option close_comments_for_old_posts is set and close_comments_days_old is > 0.
I can provide a patch for this, but would first check if such an action is considered interesting enough to be added or if there are other ways to achieve the same use-case that I'm not aware of.
Not really relevant as _close_comments_for_old_posts doesn't modify db state, but only memory post state. W