Created
October 16, 2013 08:05
-
-
Save jamiemitchell/7004251 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Show WP-PostRatings dislikes for a post | |
| * | |
| * For use with a +1 and -1 system | |
| * | |
| */ | |
| function ac_get_post_dislikes() { | |
| global $post; | |
| $ratings_users = intval( get_post_meta( $post->ID, 'ratings_users', true) ); | |
| $ratings_score = intval( get_post_meta( $post->ID, 'ratings_score', true) ); | |
| $post_dislikes = ( $ratings_users - $ratings_score ) / 2; | |
| return $post_dislikes; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment