ap_delete_comment_activity( Comment|integer $comment_id )

Description #

Delete all activities related to a comment.

More detail about activity delete can be found here @see AnsPress\Activity_Helper::delete()

Parameters #

  • $comment_id
    Comment | integer (Required) WordPress comment object or comment ID.

Changelog #

VersionDescription
4.1.2Introduced.

Source #

File: includes/activity.php

function ap_delete_comment_activity( $comment_id ) {
	if ( 'anspress' !== get_comment_type( $comment_id ) ) {
		return;
	}

	// Delete all activities by post id.
	return ap_activity_object()->delete( array( 'c_id' => $comment_id ) );
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment