Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#14550 closed feature request (invalid)

No action when comments are closed by WP after close_comments_days_old

Reported by: gormer's profile 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.

Change History (3)

#1 @gormer
15 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @gormer
15 years ago

Not really relevant as _close_comments_for_old_posts doesn't modify db state, but only memory post state. W

#3 @nacin
14 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.