comment_moderation_recipients
Filter HookDescription
Filters the list of recipients for comment moderation emails.Hook Information
File Location |
wp-includes/pluggable.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1956 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$emails
|
List of email addresses to notify for comment moderation. |
int
|
$comment_id
|
Comment ID. |
Usage Examples
Basic Usage
<?php
// Hook into comment_moderation_recipients
add_filter('comment_moderation_recipients', 'my_custom_filter', 10, 2);
function my_custom_filter($emails, $comment_id) {
// Your custom filtering logic here
return $emails;
}
Source Code Context
wp-includes/pluggable.php:1956
- How this hook is used in WordPress core
<?php
1951 * @since 3.7.0
1952 *
1953 * @param string[] $emails List of email addresses to notify for comment moderation.
1954 * @param int $comment_id Comment ID.
1955 */
1956 $emails = apply_filters( 'comment_moderation_recipients', $emails, $comment_id );
1957
1958 /**
1959 * Filters the comment moderation email headers.
1960 *
1961 * @since 2.8.0
PHP Documentation
<?php
/**
* Filters the list of recipients for comment moderation emails.
*
* @since 3.7.0
*
* @param string[] $emails List of email addresses to notify for comment moderation.
* @param int $comment_id Comment ID.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/pluggable.php
Related Hooks
Related hooks will be displayed here in future updates.