AnsPress_BP_Hooks::remove_comment_notify( object $comment )
Description #
Remove answer notification when corresponding answer get deleted.
Parameters #
- $commentobject (Required) Comment object.
Source #
File: addons/free/buddypress.php
public static function remove_comment_notify( $comment ) { if ( ! bp_is_active( 'notifications' ) ) { return; } if ( $comment->comment_ID ) { bp_notifications_delete_all_notifications_by_type( $comment->comment_ID, buddypress()->ap_notifier->id, 'new_comment_' . $comment->comment_post_ID ); } else { $comments = get_comments( [ 'post_id' => $comment ] ); foreach ( (array) $comments as $comment ) { bp_notifications_delete_all_notifications_by_type( $comment->comment_ID, buddypress()->ap_notifier->id, 'new_comment_' . $comment->comment_post_ID ); } } }
Expand full source code Collapse full source code View on GitHub: addons/free/buddypress.php:503
Add your comment