BuddyPress::new_comment_notification( object $comment )
Description #
New comment notification.
Parameters #
- $commentobject (Required) Comment object.
Source #
File: addons/buddypress/buddypress.php
public function new_comment_notification( $comment ) { if ( ! bp_is_active( 'notifications' ) ) { return; } global $bp; $comment = (object) $comment; $post = get_post( $comment->comment_post_ID ); bp_notifications_add_notification( array( 'user_id' => $post->post_author, 'item_id' => $comment->comment_ID, 'component_name' => 'anspress', 'component_action' => 'new_comment', 'date_notified' => bp_core_current_time(), 'is_new' => 1, ) ); }
Expand full source code Collapse full source code View on GitHub: addons/buddypress/buddypress.php:562
Add your comment