Contributors: seezee
Donate link: https://messengerwebdesign.com/donate
Author URI: https://github.com/seezee
Plugin URI: https://wordpress.org/plugins/five-star-ratings-shortcode/
Tags: ratings, stars, icon, shortcode, accessible
Requires at least: 4.6.0
Tested up to: 6.7.1
Requires PHP: 7.0
Stable tag: 1.2.56
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
GitHub Plugin URI: seezee/Five-Star-Ratings-Plugin
Simple lightweight shortcode to add 5-star ratings anywhere.
Add accessible, attractive 5-star ratings anywhere on your site with a simple shortcode. The plugin uses Font Awesome icons via their SVG + JavaScript method.
This plugin is based on Hugh Lashbrooke’s Starter Plugin, a robust and GPL-licensed code template for creating a standards-compliant WordPress plugin.
- Google Rich Snippets for Products, Restaurants, & Recipes
- Custom icon sizes
- Custom icon and text colors
- Choice of HTML
<i>
or<span>
elements in HTML output - Change maximum rating (from 3 – 10)
- Change minimum rating (0.0, 0.5, or 1.0)
- Shortcode generator
- Show/hide numeric text
- Locale aware decimal separator
- Options reset button
- Navigate to “Add New” in the plugins dashboard
- Search for “Five-Star Ratings Shortcode”
- Click “Install Now”
- Activate the plugin on the Plugin dashboard
- The FREE plugin has no settings. PRO users: Go to Settings -> Five-Star Ratings Shortcode if you want to customize the shortcode output.
- Click the download button on this and save “five-star-ratings-plugin.zip” to your computer
- Navigate to “Add New” in the plugins dashboard
- Navigate to the “Upload” area
- Select “five-star-ratings-plugin.zip” from your computer
- Click “Install Now”
- Activate the plugin in the Plugin dashboard
- The FREE plugin has no settings. PRO users: Go to Settings -> Five-Star Ratings Shortcode if you want to customize the shortcode output.
- Download the Five-Star Ratings Shortcode ZIP file
- Extract the Five-Star Ratings Shortcode ZIP file to your computer
- Upload the “five-star-ratings-plugin” directory to the
/wp-content/plugins/
directory - Activate the plugin in the Plugin dashboard
- The FREE plugin has no settings. PRO users: Go to Settings -> Five-Star Ratings Shortcode if you want to customize the shortcode output.
- Go to Settings -> Five-Star Ratings Shortcode -> Upgrade
- Fill out the payment form and submit
- Your license key will automatically be entered
- Download the plugin via https://github.com/seezee/Five-Star-Ratings-Shortcode
- Follow the directions for using FTP
[rating stars="0.5"] (Displays ½ star out of 5)
[rating stars="3.0"] (Displays 3 stars out of 5)
[rating stars="2.5"] (Displays 2½ stars out of 5)
[rating stars="4.0"] (Displays 4 stars out of 5)
[rating stars="5.5"] (Incorrect usage but will display 5 stars out of 5)
In the 2nd example, the raw output will be like this before processing:
<span class="fsrs">
<span class="fsrs-stars">
<i class="fsrs-fas fa-fw fa-star"></i>
<i class="fsrs-fas fa-fw fa-star"></i>
<i class="fsrs-fas fa-fw fa-star-half-alt"></i>
<i class="fsrs-far fa-fw fa-star"></i>
<i class="fsrs-far fa-fw fa-star"></i>
</span>
<span class="hide fsrs-text fsrs-text__hidden" aria-hidden="false">2.5 out of 5</span>
<span class="lining fsrs-text fsrs-text__visible" aria-hidden="true">2.5</span>
</span>
- English: Default language, always included
Would you like to help translate Five-Star Ratings Shortcode into your own language? You can do that here!
This plugin adds accessible, attractive 5-star ratings anywhere on your site with a simple shortcode. The plugin uses Font Awesome icons via their SVG + JavaScript method.
I’d love to hear your feedback. In particular, tell me about your experience configuring the plugin. Are the instructions clear? Do I need to reword them? Did I leave out something crucial? You get the drift.
I’m looking for collaborators to improve the code. If you are an experienced Wordpress programmer, hit me up!
Feel free to send a donation to my Paypal account. Or buy me a beer if you’re in town.
This plugin includes these third-party libraries in its package.
- 2024-12-13
- Tested up to WordPress 6.7.1
- Fix missing recipe author in rich snippets
- Restructure rich snippets JSON for review author
- Update Freemius SDK
- 2024-10-23
- Tested up to WordPress 6.6.2
- Update Freemius SDK
- 2024-08-29
- Tested up to WordPress 6.6.1
- 2024-05-07
- Tested up to WordPress 6.5.3
- 2024-05-02
- Tested up to WordPress 6.5.2
- BUGFIX: Fix
creation of dynamic property is deprecated error
- Update Freemius SDK
- 2023-12-21
- Tested up to WordPress 6.4.2
- 2023-11-20
- Tested up to WordPress 6.4.1
- 2023-08-28
- Freemius SDK update to 2.5.11
- 2023-07-05
- Freemius SDK update to 2.5.10
- 2023-04-21
- Tested up to WordPress 6.2
- 2022-11-25
- Added font-style declaration to /assets/dist/css/style.css
- 2022-11-22
- Tested up to WordPress 6.1.1
- BUGFIX: fixed error in conditional code that prevented necessary code from loading for users of PRO version who haven't activated their license
- Removed decimal separator option in favor of localized numeric output
-
2022-08-18
-
BUGFIX: refactored
function add_menu_item()
to avoid undefined variable$page
- 2022-07-24
- Tested up to WordPress 6.0.1
- BUGFIX: Added
( is_a( $post, 'WP_Post' )
check toenqueue_fa_scripts()
to prevent non-object error
- 2022-05-27
- Tested up to WordPress 6.0.0
- 2022-04-05
- Tested up to WordPress 5.9.3
- 2022-03-11
- Tested up to WordPress 5.9.2
- 2022-02-24
- Security fix
- 2022-02-22
- Tested up to WordPress 5.9.1
- 2022-02-14
- DRY refactored class-five-star-ratings-shortcode.php: moved variables into the constructor function
- Replaced wp_kses with esc_html__ where possible
- Revised and improved some comments
- 2022-02-11
- Reverted SRI hash check and ensured local scripts pass the check
- Updated jquery-validate.js to v1.19.3
- Updated clipboard.js to v2.0.10
- 2022-02-10
- Updated to Fontawesome 6.0.0
- Don’t add SRI hash to fallback scripts if external scripts don’t load
- 2022-02-09
- Remove unused JavaScript and dev tools from plugin FREE version
- 2022-02-08
- Reorganized assets directory
- Removed 4 unnecessary translation calls
- ACCESSIBILITY IMPROVEMENT: Changed starsminValue & starsmaxValue ratings fields to <output>
- Updated description in class-five-star-ratings-shortcode-admin-api.php file comment
- 2022-01-26
- Tested up to WordPress 5.9
- 2022-01-20
- Update contact & support URL on plugins page for PRO users
- Add index.php to project root
- 2022-01-10
- Tested up to WordPress 5.8.3
- Check for FREE vs. PRO and serve appropriate support URL
- 2021-11-22
- BUGFIX: (PRO only) Check whether $post->post_content and $post->post_author are set before assigning variables
- 2021-11-11
- Tested up to WordPress 5.8.2
- Update PRO plugin description in README & upgrade notice
- 2021-11-07
- BUGFIX: Options reset now returns decimal separator to default
- 2021-11-04
- NEW FEATURE (PRO ONLY): Option to output numeric text using alternate decimal separator (comma)
- 2021-09-16
- BUGFIX: Fixed reset button not rendering on options tab in some instances
- 2021-09-15
- BUGFIX: Added check to remove unused PRO code from FREE version of class-five-star-ratings-shortcode-settings.php
- Update README
- 2021-09-14
- (PRO ONLY) Add options reset button to options tab
- 2021-09-13
- (PRO ONLY) Added show/hide option for numerical text
- (PRO ONLY) Fixed missing translator comment for gettext call
- 2021-09-09
- Tested up to WordPress 5.8.1
- BUGFIX: added additional check before printing JSON to avoid undefined variable error
- 2021-07-23
- Tested up to WordPress 5.8
- 2021-05-20
- Added short description to README
- Updated plugin tags
- Updated header in main plugin file
- 2021-05-13
- BUGFIX: Updated assets/settings.js to check whether ClipboardJS has been defined so we don't get an error in the FREE plugin version
- 2021-05-13
- Tested up to WordPress 5.7.2
- 2021-05-11
- BUGFIX: fix "previously declared function" error
- Refactored code to ensure premium code is not rendered in free version
- 2021-05-04
- BUGFIX: add ( isset( $_GET['tab'] ) ) check
- 2021-05-04
- MULTIPLE BUGFIXES for PRO plugin
- Fixed undefined variables
- Added check for non-existing featured image when using rich snippets
- Added check for incorrect shortcode syntax when using maximum star rating feature in PRO plugin.
- Updated Freemius SDK
- 2021-04-21
- Tested up to WordPress 5.7.1
- 2021-03-12
- Tested up to WordPress 5.7
- 2021-01-28
- Add check for existence of $review_type
- 2021-01-19
- Update to Fontawesome 5.15.2
- 2021-01-18
- BUGFIX: Replace incorrect variable $link with $url in function checklink()
- 2021-01-07
- BUGFIX: Revert strict comparison operators to loose-typing
2021-01-07 Tested up to WordPress 5.6 BUGFIX: fix undefined variable
- 2021-01-07
- Add local fallback for external scripts
- Some code formatting cleanup to meet WordPress coding standard, but more is needed
- Load Farbtastic script in footer
- SECURITY: Sanitize $textsize & $textcolor on output
- SECURITY: Add nonce to form reset for to prevent CSFR attacks
- 2020-10-08
- Tested up to 5.5.3
- Update FREEMIUS SDK to v.2.4.1
- Use Dashicons coffee glyph instead of FontAwesome coffee glyph in plugin meta
- 2020-09-29
- BUGFIX fix missing borders on <details> element
- 2020-09-29
- SECURITY FIX: escape or sanitize all translatable strings
- 2020-09-22
- Improved microcopy
- Fix some i18n errors
- 2020-09-21
- (PRO only) Improved label and validation message for ratings field in shortcode generator
- 2020-09-20
- (PRO only) BREAKING CHANGES: Recipe Rich Snippets require new syntax
- (PRO only) BUGFIX: fix missing curly brace in Recipe Rich Snippets output
- (PRO only) Improve Recipe Rich Snippets syntax
- (PRO only) Now supports guided recipes
- 2020-09-17
- Fix incorrect translator notes
- Improve ARIA text in output
- (PRO only) Better currency regex (allow period (.) as 1000s separater & comma (,) as decimal separater)
- 2020-09-14
- Replace $pagenow global with $hook check wherever appropriate
- Complete overhaul of i18n internationalization
- Sanitize links in internationalized strings
- Update .pot file
- Update README
- 2020-09-13
- BUGFIX: 1.1.2 reintroduced error of scripts loading outside plugin settings page, conflicting with other plugins; this update fixes that while ensuring scripts still load when needed
- 2020-09-13
- BUGFIX: fix version check
- BUGFIX: fix missing admin scripts
- BUGFIX: fix missing padding on details:summary
- New PRO feature: shortcode generator
- Updated UX & CSS
- Updated usage examples
- There is no v1.1.0 :-(
- 2020-09-04
- Tested up to WordPress 5.5.1
- 2020-08-01
- BUGFIX: Load admin scripts and styles correctly to fix critical conflict with other plugins
- 2020-07-23
- Integrate auto-deactivation of FREE version when upgrading to PRO
- 2020-07-20
- BUGFIX: Fix fatal error on upgrade: cannot redeclare fsrs_fs_uninstall_cleanup()
- 2020-06-25
- BUGFIX: Fix coffee cup icon not rendering in plugin meta
- 2020-06-16
- Tested up to WordPress 5.4.2
- BUGFIX: Fix premium code rendering in free plugin
- 2020-04-30
- Tested up to WordPress 5.4.1
- 2020-04-01
- Tested up to WordPress 5.4
- BUGFIX: Fix use of "this" keyword outside object context
- BUGFIX (PRO ONLY): Replace borked color picker with native HTML color picker
- Remove surrounding underscores from constant names per WordPress coding standards
- 2019-12-17
- Use get_bloginfo( 'wpurl' ) instead of get_bloginfo( 'url' )
- 2019-12-16
- New PRO feature: Google Rich Snippets for products, restaurants, & recipes
- Add debugging on PHP contants conflict
- 2019-12-10
- Correct Plugin URI in README
- Correct link to Github repo in README
- 2019-12-10
- BUGFIX: Fix stars showing zero if rating is 0.5
- Improve usage examples
- 2019-12-10
- Update usage examples in readme
- 2019-12-09
- BUGFIX: Fix incorrect text output if user enters x.5 where x is the maximum number of stars
- 2019-12-09
- Change SCRIPT_DEBUG CORS policy check
- Fix missing translation string
- Change PRO version slug
- 2019-12-09
- BUGFIX: Fix CORS policy error
- 2019-12-09
- Update .POT file.
- 2019-12-09
- Fix error in documentation.
- 2019-12-09
- Fix error in documentation.
- 2019-12-09
- BUGFIX: Fix options not displaying for PRO plugin
- BUGFIX: Fix incorrect class in ratings text output
- Refactor shortcode: remove "half" attribute & use float instead
- Remove unused admin CSS rules
- 2019-12-08
- Correct plugin tags
- Correct badge links in readme.md
- 2019-12-08
- BUGFIX: Fix incorrect VERSION constant; should be FSRS_VERSION
- 2019-12-06
- Initial release
- 2024-12-13
- Tested up to WordPress 6.7.1
- Fix missing recipe author in rich snippets
- Restructure rich snippets JSON for review author
- Update Freemius SDK