AnsPress_Notification_Hook::new_answer( integer $post_id, object $_post )
Description #
Add notification for new answer.
Parameters #
- $post_idinteger (Required) Post ID.
- $_postobject (Required) Post object.
Source #
File: addons/free/notification.php
public static function new_answer( $post_id, $_post ) {
$_question = get_post( $_post->post_parent );
ap_insert_notification( array(
'user_id' => $_question->post_author,
'actor' => $_post->post_author,
'parent' => $_post->post_parent,
'ref_id' => $_post->ID,
'ref_type' => 'answer',
'verb' => 'new_answer',
) );
}
Expand full source code Collapse full source code View on GitHub: addons/free/notification.php:244
Add your comment