No action when comments are closed by WP after close_comments_days_old
|Reported by:||gormer||Owned by:|
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.