Notifications::new_comment( object $comment )
Description #
Notify user on new comment.
Parameters #
- $commentobject (Required) WordPress comment object.
Source #
File: addons/notifications/notifications.php
public function new_comment( $comment ) { $_post = get_post( $comment->comment_post_ID ); if ( get_current_user_id() !== (int) $_post->post_author ) { ap_insert_notification( array( 'user_id' => $_post->post_author, 'actor' => $comment->user_id, 'parent' => $comment->comment_post_ID, 'ref_id' => $comment->comment_ID, 'ref_type' => 'comment', 'verb' => 'new_comment', ) ); } }
Expand full source code Collapse full source code View on GitHub: addons/notifications/notifications.php:354
Add your comment