AnsPress_Hooks::update_user_vote_casted_count( integer $userid, string $type, integer $actionid, integer $receiving_userid )
Description #
Update user meta of vote
Parameters #
- $useridinteger (Required) User ID who is voting.
- $typestring (Required) Vote type.
- $actionidinteger (Required) Post ID.
- $receiving_useridinteger (Required) User who is receiving vote.
Source #
File: includes/hooks.php
public static function update_user_vote_casted_count( $userid, $type, $actionid, $receiving_userid ) { $voted = ap_count_post_votes_by( 'user_id', $userid ); // Update total casted vote of user. update_user_meta( $userid, '__up_vote_casted', $voted['votes_up'] ); update_user_meta( $userid, '__down_vote_casted', $voted['votes_down'] ); }
Expand full source code Collapse full source code View on GitHub: includes/hooks.php:838
Add your comment