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 #
- $commentobject (Required) Comment object.
Changelog #
Version | Description |
---|---|
unknown Introduced | unknown Introduced |
4.1.8 | Changed event. |
4.1.5 | Introduced. |
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 ); } }
Expand full source code Collapse full source code View on GitHub: includes/hooks.php:1030
Add your comment