/** * Plugin Name: 5 Star Google Reviews * Plugin URI: https://josephstevenson.com/5-star-google-reviews/ * Description: Request reviews from your customers with this simple plugin and push only the 5 star reviews through to your favorite sites, including Google, Facebook and Yelp. * Version: 0.4 * Author: Joseph Stevenson * Author URI: https://josephstevenson.com/ */ wp_enqueue_script( 'jquery' ); if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly //load_plugin_textdomain('5-star-reviews-plugin', false, basename( dirname( __FILE__ ) ) . '/languages' ); // create custom plugin settings menu add_action('admin_menu', 'js5srp_plugin_create_menu'); function js5srp_plugin_create_menu() { //create new top-level menu //add_menu_page('5 Star Google Reviews', '5 Star Google Reviews', 'administrator', __FILE__, 'my_cool_plugin_settings_page' , plugins_url('dashicons-admin-page', __FILE__) ); add_menu_page( '5 Star Google Reviews', '5 Star Reviews', 'administrator', __FILE__, 'js5srp_settings_page', 'dashicons-star-filled', 81, __FILE__ ); //call register settings function add_action( 'admin_init', 'js5srp_plugin_settings' ); } function js5srp_plugin_settings() { //register our settings register_setting( 'js5srp_settings-group', 'js5srp_google' ); register_setting( 'js5srp_settings-group', 'js5srp_facebook' ); register_setting( 'js5srp_settings-group', 'js5srp_yelp' ); register_setting( 'js5srp_settings-group', 'js5srp_failtitle' ); register_setting( 'js5srp_settings-group', 'js5srp_faildescription' ); register_setting( 'js5srp_settings-group', 'js5srp_successtitle' ); register_setting( 'js5srp_settings-group', 'js5srp_successdescription' ); register_setting( 'js5srp_settings-group', 'js5srp_introtitle' ); register_setting( 'js5srp_settings-group', 'js5srp_introdescription' ); register_setting( 'js5srp_settings-group', 'js5srp_share' ); } function js5srp_settings_page() { ?>
This lightweight plugin will display a review form on your website. If the user leaves a 5 star review they will be forwarded to your google business, facebook or yelp page. Any reviews with 4 stars or less will be shown an apology page from you.
Perfect to get feedback from customers without complaints going straight to your google business, facebook or yelp pages.
To add the review form to any page please use the shortcode below:
[FiveStar]
The review form will appear and execute based on the settings you have choosen above.