wp_new_comment_via_rest_notify_postauthor()
Send a notification to the post author when a new note is added via the REST API.
No Hooks.
Returns
null. Nothing (null).
Usage
wp_new_comment_via_rest_notify_postauthor( $comment );
- $comment(WP_Comment) (required)
- The comment object.
Changelog
| Since 6.9.0 | Introduced. |
wp_new_comment_via_rest_notify_postauthor() wp new comment via rest notify postauthor code WP 7.0
function wp_new_comment_via_rest_notify_postauthor( $comment ) {
if ( $comment instanceof WP_Comment && 'note' === $comment->comment_type ) {
wp_new_comment_notify_postauthor( (int) $comment->comment_ID );
}
}