AnsPress_Notification_Hook::vote_up( integer $post_id )
Description #
Award reputation when user recive an up vote.
Parameters #
- $post_idinteger (Required) Post ID.
Source #
File: addons/free/notification.php
public static function vote_up( $post_id ) { $_post = get_post( $post_id ); if ( get_current_user_id() !== $_post->post_author ) { ap_insert_notification( array( 'user_id' => $_post->post_author, 'actor' => get_current_user_id(), 'parent' => $_post->ID, 'ref_id' => $_post->ID, 'ref_type' => $_post->post_type, 'verb' => 'vote_up', ) ); } }
Expand full source code Collapse full source code View on GitHub: addons/free/notification.php:339
Add your comment