ap_is_user_voted( integer $post_id, string|array $type = 'vote', integer $user_id = false )
Description #
Check if user vote on a post.
Parameters #
- $post_idinteger (Required) Post ID.
- $typestring | array (Optional) Vote type. Default value: 'vote'
- $user_idinteger (Optional) User ID. Default value: false
Source #
File: includes/votes.php
function ap_is_user_voted( $post_id, $type = 'vote', $user_id = false ) { if ( false === $user_id ) { $user_id = get_current_user_id(); } if ( false === ap_get_vote( $post_id, $user_id, $type ) ) { return false; } return true; }
Expand full source code Collapse full source code View on GitHub: includes/votes.php:466
Add your comment