comment_moderation_subject

comment_moderation_subject is a filter on the subject of "comment moderated" e-mails sent to the WP administrator e-mail address.

In WordPress 2.0.1 and higher, it passes 2 parameters: the subject and the comment's ID.

In WordPress 1.5.2 through WordPress 2.0, it only passes the subject.

This hook can pass multiple parameters. In order to get additional parameters (up to 2 for this hook) passed to your function, you will have to hook in like this: add_filter('comment_moderation_subject', 'your_function', 10, 2); where 10 is your function's priority, and 2 is the number of parameters you want your function to accept. Note that your function should only return the first parameter.

This hook is a filter which means that information is passed through it, and then used by WordPress. Your function needs to accept that information, and return it. Using add_filter('comment_moderation_subject', 'your_function'); helps you to remember this distinction. When you are passing an ID, it is assumed that you will return the ID as it was given to you. With filters that pass strings or arrays, you may manipulate the information before passing it along.