Make WordPress Core


Ignore:
Timestamp:
09/14/2015 02:16:02 AM (10 years ago)
Author:
boonebgorges
Message:

Send comment notification emails via a hooked function.

Previously, wp_notify_postauthor() and wp_notify_moderator() were called
directly from wp_new_comment(), making it difficult to modify or suppress
default notification emails.

Props dshanske, thomaswm.
See #33587.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r33615 r34106  
    335335add_action( 'wp_split_shared_term_batch', '_wp_batch_split_terms' );
    336336
     337// Email notifications.
     338add_action( 'comment_post', 'wp_new_comment_notify_moderator', 10, 2 );
     339add_action( 'comment_post', 'wp_new_comment_notify_postauthor' );
     340
    337341/**
    338342 * Filters formerly mixed into wp-includes
Note: See TracChangeset for help on using the changeset viewer.