AnsPress_Notification_Hook::new_comment( object $comment )
Description #
Notify user on new comment.
Parameters #
- $commentobject (Required) WordPress comment object.
Source #
File: addons/free/notification.php
public static function new_comment( $comment ) { $_post = get_post( $comment->comment_post_ID ); if ( get_current_user_id() !== $_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/free/notification.php:306
Add your comment