WP Foto Vote <<How can I allow for users to vote as many times as they wish for any photos?
<?php
/**
>> WP Foto Vote <<How can I allow for users to vote as many times as they wish for any photos?
Add it to your theme functions.php for example.
#### Note: you must have option Fast Voting (Photo Contest => Settings => Voting) disabled. ####
*/
// Allow for all
// Note: You can use just one of this lines for disable one of checks.
add_filter('fv/vote/need_check_ip_query', '__return_false', 10, 1); // Disalbe IP check
add_filter('fv_vote_check_cookies', '__return_false', 10, 1); // Disalbe Cookies check
#################################################################
// Allow for user with specified Capabilities
// https://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table
add_filter('fv/vote/need_check_ip_query', 'filter_fv_vote_not_need_check_ip_and_cookies', 10, 1);
add_filter('fv_vote_check_cookies', 'filter_fv_vote_not_need_check_ip_and_cookies', 10, 1);
function filter_fv_vote_not_need_check_ip_and_cookies() {
// disable for Administrator
if ( current_user_can('manage_options') ) {
return false;
}
return true;
}