AnsPress_Notification_Hook::select_answer( object $_post )
Description #
Notify user when their answer is selected.
Parameters #
- $_postobject (Required) Post object.
Source #
File: addons/free/notification.php
public static function select_answer( $_post ) {
// Award select answer points to question author only.
if ( get_current_user_id() !== $_post->post_author ) {
ap_insert_notification( array(
'user_id' => $_post->post_author,
'actor' => get_current_user_id(),
'parent' => $_post->post_parent,
'ref_id' => $_post->ID,
'ref_type' => 'answer',
'verb' => 'best_answer',
) );
}
}
Expand full source code Collapse full source code View on GitHub: addons/free/notification.php:274
Add your comment