WordPress filter hook · part of WordPress core
comment_moderation_subject
A WordPress core filter that 14 plugins also fire themselves, running on 1,170+ sites between them.
How to use comment_moderation_subject
It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'comment_moderation_subject', function( $subject, $comment_id ) {
// Change $subject here.
return $subject;
}, 10, 2 );Argument names come from FV Antispam's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
14 plugins that fire comment_moderation_subject
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
FV Antispam800+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )fv-antispam.php:2091 -
Clean Notifications100+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )clean-notifications.php:131 -
No Comment100+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )no-comment.php:88 -
Post Comment Notification70+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )post-comment-notification-to-multiple-user.php:222 -
Notifly20+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )notifly.php:849 -
HTML Emails20+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )includes/emails.php:113 -
WP Comments Moderators10+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )fay-comments-moderators.php:309 -
WP NotifyComment10+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )notify-comment.php:98 -
Custom Pingback Email10+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )custom_pingback_email.php:158 -
One Click Comments10+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )one-click-comments.php:262 -
Enhanced Emails10+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )pluggable.php:527 -
Filter Email Notifications10+ installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )filter-email-notifications.php:204 -
Comment Notifications via SMSFewer than 10 installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )comment-notifications-via-sms.php:86 -
Post Author Comment NotificationFewer than 10 installs
apply_filters( 'comment_moderation_subject', $subject, $comment_id )post-author-comment-notification.php:75
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.