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:

functions.php
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.

  1. FV Antispam icon FV Antispam800+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) fv-antispam.php:2091
  2. Clean Notifications icon Clean Notifications100+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) clean-notifications.php:131
  3. No Comment icon No Comment100+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) no-comment.php:88
  4. Post Comment Notification icon Post Comment Notification70+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) post-comment-notification-to-multiple-user.php:222
  5. Notifly icon Notifly20+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) notifly.php:849
  6. HTML Emails icon HTML Emails20+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) includes/emails.php:113
  7. WP Comments Moderators icon WP Comments Moderators10+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) fay-comments-moderators.php:309
  8. WP NotifyComment icon WP NotifyComment10+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) notify-comment.php:98
  9. Custom Pingback Email icon Custom Pingback Email10+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) custom_pingback_email.php:158
  10. One Click Comments icon One Click Comments10+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) one-click-comments.php:262
  11. Enhanced Emails icon Enhanced Emails10+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) pluggable.php:527
  12. Filter Email Notifications icon Filter Email Notifications10+ installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) filter-email-notifications.php:204
  13. Comment Notifications via SMS icon Comment Notifications via SMSFewer than 10 installs apply_filters( 'comment_moderation_subject', $subject, $comment_id ) comment-notifications-via-sms.php:86
  14. Post Author Comment Notification icon 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.