PHPackages                             plenge/wp-postratings-pretty - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. plenge/wp-postratings-pretty

ActiveWordpress-plugin

plenge/wp-postratings-pretty
============================

Adds an AJAX rating system for your WordPress site's content

1.0(8y ago)0664GPL-2.0+PHP

Since Jul 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/plenge/wp-postratings)[ Packagist](https://packagist.org/packages/plenge/wp-postratings-pretty)[ RSS](/packages/plenge-wp-postratings-pretty/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

wp-postratings-pretty
=====================

[](#wp-postratings-pretty)

Contributors: GamerZ
Donate link:
Tags: ratings, rating, postratings, postrating, vote, digg, ajax, post
Requires at least: 4.2
Tested up to: 4.7
Stable tag: 1.84.1

Adds an AJAX rating system for your WordPress site's content.

Description
-----------

[](#description)

### Usage

[](#usage)

1. Open `wp-content/themes//index.php`
2. You may place it in archive.php, single.php, post.php or page.php also.
3. Find: ``
4. Add Anywhere Below It (The Place You Want The Ratings To Show): ``

- If you DO NOT want the ratings to appear in every post/page, DO NOT use the code above. Just type in `[ratings]` into the selected post/page content and it will embed ratings into that post/page only.
- If you want to embed other post ratings use `[ratings id="1"]`, where 1 is the ID of the post/page ratings that you want to display.
- If you want to embed other post ratings results, use `[ratings id="1" results="true"]`, where 1 is the ID of the post/page ratings results that you want to display.

### Build Status

[](#build-status)

[![Build Status](https://camo.githubusercontent.com/ba1b3207a3874156c7ba5c2a5b75c88341b4e9af80f34b1fe238cae3ed010304/68747470733a2f2f7472617669732d63692e6f72672f6c65737465726368616e2f77702d706f7374726174696e67732d7072657474792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lesterchan/wp-postratings-pretty)

### Development

[](#development)

[https://github.com/lesterchan/wp-postratings-pretty](https://github.com/lesterchan/wp-postratings-pretty "https://github.com/lesterchan/wp-postratings-pretty")

### Translations

[](#translations)

[http://dev.wp-plugins.org/browser/wp-postratings-pretty/i18n/](http://dev.wp-plugins.org/browser/wp-postratings-pretty/i18n/ "http://dev.wp-plugins.org/browser/wp-postratings-pretty/i18n/")

### Credits

[](#credits)

- Plugin icon by [Freepik](http://www.freepik.com) from [Flaticon](http://www.flaticon.com)
- Icons courtesy of [FamFamFam](http://www.famfamfam.com/ "FamFamFam") and [Everaldo](http://www.everaldo.com "Everaldo")

### Donations

[](#donations)

I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.

Changelog
---------

[](#changelog)

### Version 1.84.1

[](#version-1841)

- NEW: New wp\_postratings\_google\_structured\_data filter to filter Google Structured Data.
- FIXED: unnamed-file.numbers due to sanitize\_file\_name().
- FIXED: Generate the full path to image to prevent Googlebot from 404.

### Version 1.84

[](#version-184)

- NEW: Added '%POST\_THUMBNAIL%' Template variable.
- NEW: Added 'wp\_postratings\_cookie\_expiration' filter. Props @ramiy.
- NEW: Added 'wp\_postratings\_ratings\_image\_alt' filter
- NEW: Added more meta itemprops to pass Structured Data Testing Tool test
- NEW: Remove po/mo files from the plugin. Props @ramiy.
- NEW: Use translate.wordpress.org to translate the plugin. Props @ramiy.
- NEW: Add phpDocs and update file headers. Props @ramiy.
- NEW: Adds the ability to restrict voting rights to members of the blog. Props @stephenharris.
- FIXED: Use the new admin headings hierarchy with H1, H2, H3 tags. Props @ramiy.
- FIXED: Move \*.js files to /js/ sub-folder. Props @ramiy.
- FIXED: Move \*.css files to /css/ sub-folder. Props @ramiy.
- FIXED: Move the scripts to a separate file in /includes/ sub-folder. Props @ramiy.
- FIXED: Move the widget to a separate file in /includes/ sub-folder. Props @ramiy.
- FIXED: Move the shortcode to a separate file in /includes/ sub-folder. Props @ramiy.
- FIXED: Move activation hooks to a separate file in /includes/ sub-folder. Props @ramiy.
- FIXED: Move admin functions and hooks to a separate file in /includes/ sub-folder. Props @ramiy.
- FIXED: Move the i18n load to a separate file in /includes/ sub-folder. Props @ramiy.
- FIXED: Replace die() with wp\_die() and add i18n to the strings. Props @ramiy.
- FIXED: Update translation strings to avoid using 'post' as the post type. Props @ramiy.
- FIXED: Minor translation string fix. Props @ramiy.
- FIXED: Update rating widget. Props @ramiy.
- FIXED: Security hardening. Props @stephenharris.

### Version 1.83.2

[](#version-1832)

- FIXED: Unauthenticated blind SQL injection in ratings\_most\_orderby(). Props @Ben Bidner from Automattic.

### Version 1.83.1

[](#version-1831)

- FIXED: Remove No Results template from the\_ratings\_results()

### Version 1.83

[](#version-183)

- NEW: Added 'wp\_postratings\_display\_comment\_author\_ratings' filter. Props @ramiy.
- FIXED: Removing Loading ... because SERP will index the text if the ratings is at the top of the article
- FIXED: Move 'wp\_postratings\_image\_extension' filter to init()
- FIXED: Show headline, datePublished and image despite there is no ratings
- FIXED: Show post without ratings as well when sorting is done in URL. Props @talljosh.

### Version 1.82

[](#version-182)

- NEW: Added 'wp\_postratings\_image\_extension' filter. Props @ramiy.
- FIXED: Added headline, datePublished, image to Article Schema type
- FIXED: Deprecated PHP4 constructor in WordPress 4.3
- FIXED: Remove schema code when Rich Snippets is off

### Version 1.81

[](#version-181)

- NEW: Added worstRating of 1. Props @rafaellop
- NEW: Checked for defined() for RATINGS\_IMG\_EXT to allow overwrite
- FIXED: Integration with WP-Stats

### Version 1.80

[](#version-180)

- NEW: Suppor Custom Post Types in Widgets
- NEW: Added 'wp\_postratings\_process\_ratings\_user', 'wp\_postratings\_process\_ratings\_userid' &amp; 'wp\_postratings\_check\_rated' filters
- NEW: Supports WordPress Multisite Network Activate
- NEW: Uses WordPress native uninstall.php

### Version 1.79

[](#version-179)

- NEW: Use POST for ratings instead
- NEW: Add 'wp\_postratings\_schema\_itemtype' filter so that you can change the Schema Type. See the FAQ for sample.
- FIXED: Use 'is\_rtl()' instead of $text\_direction

### Version 1.78

[](#version-178)

- NEW: Uses Dash Icons
- NEW: Option to turn off Google Rich Snippets
- FIXED: Use SITECOOKIEPATH instead of COOKIEPATH. Props jbrule.
- FIXED: If global $id is 0, use get\_the\_ID(). Props instruite.
- FIXED: use esc\_attr() and esc\_js() to escape characters

### Version 1.77

[](#version-177)

- NEW: Add in %POST\_ID% template variables
- FIXED: Ensure Google Rich Snippet only displays in main loop and not in the widget
- FIXED: Removed reviewCount from Google Rich Snippet
- FIXED: Make the ratings widget more optimized
- FIXED: Some widget templates are using postratings\_template\_mostrated instead of postratings\_template\_highestrated

### Version 1.76

[](#version-176)

- FIXED: No longer needing add\_post\_meta() if update\_post\_meta() fails
- FIXED: Update 'Individual Rating Text/Value' Display no working due to missing nonce
- FIXED: Added stripslashes() to remove slashes in the templates
- FIXED: Check whether it is an array to prevent array\_key\_exists() from throwing a warning.

### Version 1.75

[](#version-175)

- Change htmlspecialchars to esc\_attr(). Props Ryan Satterfield.
- Change esc\_attr() to wp\_kses() For itemprop. Props oneTarek.

### Version 1.74

[](#version-174)

- check\_rated\_username() should be using $user\_ID. Props Artem Gordinsky.

### Version 1.73

[](#version-173)

- Add Stars Flat (PNG) Icons. Props hebaf.
- Change Schema From  To

### Version 1.72 (11-07-2013)

[](#version-172-11-07-2013)

- Fixed not logging ratings
- Fixed sorting of ratings logs

Upgrade Notice
--------------

[](#upgrade-notice)

N/A

Screenshots
-----------

[](#screenshots)

1. Admin - Ratings Log Bottom
2. Admin - Ratings Log Top
3. Admin - Ratings Options
4. Admin - Ratings Templates
5. Ratings
6. Ratings Hover

Frequently Asked Questions
--------------------------

[](#frequently-asked-questions)

### How To Change Schema Type?

[](#how-to-change-schema-type)

```
