No plans for now.
Your theme should work with jQuery, although it could be something wrong with it. If that were the case, I’d suggest choosing an other theme.
Regarding the code, you should paste it in your footer.php (or similar). However I think it needs more tweaking. Right now it will pop the alert but actually let you vote.
We should remove the “onclick” event from the buttons when the user is not logged in.
I think it’d have to look something like this:
<?php
if ( !is_user_logged_in() ){ ?>
<script>
jQuery(document).ready(function() {
// Remove the onclick event from the buttons
jQuery(".thumbs-rating-container .thumbs-rating-up, .thumbs-rating-container .thumbs-rating-down"). removeAttr('onclick');
// Pop an alert if the user clicks on it.
jQuery(".thumbs-rating-container .thumbs-rating-up, .thumbs-rating-container .thumbs-rating-down").on("click", function(event){
alert('You need to be registered in order to vote!');
});
});
</script>
<?php } /* END if user is not logged in */ ?>
I haven’t tested this on a local environment. If I find sometime on Monday I’ll get back to you.
More on the removeAttr function here https://api.jquery.com/removeattr/