Hello
Good time
With change in this piece of function code Dear Asti , is it possible for the user to be able to see all the comments he liked or disliked on the page?
Â
add_shortcode('wpdiscuz_likes', 'wpdiscuz_current_user_likes');
function wpdiscuz_current_user_likes(){
global $wpdb,$user_ID;
if(!$user_ID){
return;
} $like_count = (int)$wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM `{$wpdb->prefix}wc_users_voted` WHERE `vote_type` = 1 AND `user_id` = %d", $user_ID));
$dislike_count = (int)$wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM `{$wpdb->prefix}wc_users_voted` WHERE `vote_type` = -1 AND `user_id` = %d", $user_ID)); echo 'Like Count - ' . $like_count .' Dislike Count - ' . $dislike_count;}

