AnsPress_Hooks::comment_subscription( object $comment )

Description #

Add comment subscriber.

If question than subscription event will be question_{$question_id} and ref id will contain comment id. If answer than subscription event will be answer_{$answer_id} and ref_id will contain comment ID.

Parameters #

  • $comment
    object (Required) Comment object.

Changelog #

unknown Introducedunknown Introduced
4.1.8Changed event.

Source #

File: includes/hooks.php

	public static function comment_subscription( $comment ) {
		if ( $comment->user_id > 0 ) {
			$_post = ap_get_post( $comment->comment_post_ID );
			$type = $_post->post_type . '_' . $_post->ID;
			ap_new_subscriber( $comment->user_id, $type, $comment->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