Ticket #4740 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

New action for wp_update_comment_count()

Reported by: mdawaffe Assigned to: anonymous
Priority: normal Milestone: 2.3
Component: Administration Version: 2.2.2
Severity: normal Keywords: has-patch
Cc:

Description

wp_update_comment_count() calls the edit_post action (with different parameters than does the wp_insert_post() function), but this action doesn't receive information on how and if the count changed.

Knowing this information would be useful to advanced caching systems, plugins that do fancy things with plugins/pings, and surely a buch of stuff I can't think of.

I propose a new hook:

do_action('wp_update_comment_count', $post_id, $new_count, $old_count);

Attached makes that happen and gives the edi_post hook the same parameters as it has in wp_insert_post().

Attachments

4740.diff (1.3 kB) - added by mdawaffe on 08/13/07 18:25:39.

Change History

08/13/07 18:25:39 changed by mdawaffe

  • attachment 4740.diff added.

08/14/07 03:08:44 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [5869]) wp_update_comment_count hook from mdawaffe. fixes #4740

08/18/07 21:43:34 changed by foolswisdom

  • milestone changed from 2.4 (future) to 2.3 (trunk).