Languages:
English •
日本語
(Add your language)
Description
This function is responsible for sending comment notification emails to the post author whenever a reader leaves a comment. It is pluggable and can be customized using plugins.
This function is pluggable using the following filters:
- comment_notification_text
- comment_notification_subject
- comment_notification_headers
If the plugins do not redefine the functions using filters, then the default functionality will be used.
To modify the content of the email that is sent when a reader leaves a comment, you may provide filters for each of the above functions in your plugin.
This function also sanitizes a URL for use in a redirect.
Usage
<?php wp_notify_postauthor( $comment_id ) ?>
Parameters
- $comment_id
- (integer) (required) Comment ID
- Default: None
- $deprecated
- (string) (optional) Deprecated in Version 3.8 and should no longer be used. The comment type either 'comment' (default), 'trackback', or 'pingback'
- Default: ''
Return Values
- (boolean)
- False if user email does not exist. True on completion.
Examples
Notes
- This function can be replaced via plugins. If plugins do not redefine these functions, then this will be used instead.
- Uses: apply_filters() Calls 'allowed_redirect_hosts' on an array containing WordPress host string and $location host string.
Change Log
- 3.8.0: The comment $comment_type parameter was deprecated. See ticket #17862.
- Since: 1.0.0
Source File
wp_notify_postauthor() is located in wp-includes/pluggable.php
.
Related