WP Review - Version 4.0.4

Version Description

  • Fixed: backlink option is not enabled by default anymore. Sorry for that!
Download this release

Release Info

Developer MyThemeShop
Plugin Icon 128x128 WP Review
Version 4.0.4
Comparing to
See all releases

Code changes from version 4.0.3 to 4.0.4

admin/admin.php CHANGED
@@ -11,6 +11,9 @@
11
  /* Register admin.css file. */
12
  add_action( 'admin_enqueue_scripts', 'wp_review_admin_style' );
13
 
 
 
 
14
  /**
15
  * Register custom style for the meta box.
16
  *
@@ -39,4 +42,37 @@ function wp_review_admin_style( $hook_suffix ) {
39
  wp_enqueue_style( 'wp_review-style', trailingslashit( WP_REVIEW_ASSETS ) . 'css/wp-review.css', array(), WP_REVIEW_PLUGIN_VERSION, 'all' );
40
  }
41
  }
42
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  /* Register admin.css file. */
12
  add_action( 'admin_enqueue_scripts', 'wp_review_admin_style' );
13
 
14
+ add_action( 'wp_ajax_wpreview_rated', 'wp_review_rated_ajax', 10 );
15
+ add_filter( 'admin_footer_text', 'wp_review_admin_footer_text', 10 );
16
+
17
  /**
18
  * Register custom style for the meta box.
19
  *
42
  wp_enqueue_style( 'wp_review-style', trailingslashit( WP_REVIEW_ASSETS ) . 'css/wp-review.css', array(), WP_REVIEW_PLUGIN_VERSION, 'all' );
43
  }
44
  }
45
+
46
+ function wp_review_admin_footer_text( $footer_text ) {
47
+ $current_screen = get_current_screen();
48
+
49
+ $post_types = get_post_types( array('public' => true), 'names' );
50
+ $excluded_post_types = apply_filters('wp_review_excluded_post_types', array('attachment'));
51
+ $allowed_post_types = array_diff($post_types, $excluded_post_types);
52
+
53
+ // Check to make sure we're on a Review Editing page
54
+ if ( ( isset( $current_screen->id ) && strpos($current_screen->id, 'wp-review') !== false ) ||
55
+ ( isset( $current_screen->action ) && $current_screen->action == 'add' && in_array( $current_screen->id, $allowed_post_types ) ) ||
56
+ ( isset( $_GET['action'] ) && $_GET['action'] == 'edit' && in_array( $current_screen->id, $allowed_post_types ) ) ) {
57
+ // Change the footer text
58
+ if ( ! get_option( 'wpreview_admin_footer_text_rated' ) ) {
59
+ $footer_text = sprintf( __( 'If you like <strong>WP Review</strong> please leave us a %s rating. A huge thank you from MyThemeShop in advance!', 'woocommerce' ), '<a href="https://wordpress.org/support/view/plugin-reviews/wp-review?filter=5" target="_blank" class="wpreview-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'wp-review' ) . '"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a>' );
60
+ $footer_text .= "
61
+ <script type=\"text/javascript\">
62
+ jQuery( 'a.wpreview-rating-link' ).click( function() {
63
+ jQuery.post( ajaxurl, { action: 'wpreview_rated' } );
64
+ jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
65
+ });
66
+ </script>
67
+ ";
68
+ } else {
69
+ //$footer_text = __( 'Thank you for using WP Review.', 'wp-review' );
70
+ }
71
+ }
72
+
73
+ return $footer_text;
74
+ }
75
+
76
+ function wp_review_rated_ajax() {
77
+ update_option( 'wpreview_admin_footer_text_rated', '1' );
78
+ }
admin/options.php CHANGED
@@ -115,7 +115,7 @@ function wpreview_settings_page() {
115
  $bgcolor2 = ! empty($options['colors']['bgcolor2']) ? $options['colors']['bgcolor2'] : '';
116
  $bordercolor = ! empty($options['colors']['bordercolor']) ? $options['colors']['bordercolor'] : '';
117
  $registered_only = ! empty( $options['registered_only'] ) ? $options['registered_only'] : '';
118
- $add_backlink = isset( $options['add_backlink'] ) && $options['add_backlink'] == '0' ? false : true;
119
  if ( $items == '' ) $items = $defaultItems;
120
  if( $color == '' ) $color = $defaultColors['color'];
121
  if( $location == '' ) $location = $defaultLocation;
@@ -180,6 +180,14 @@ function wpreview_settings_page() {
180
  <input type="text" class="wp-review-color" name="wp_review_options[colors][bordercolor]" id="wp_review_bordercolor" value="<?php echo $bordercolor; ?>" />
181
  </p>
182
  </div>
 
 
 
 
 
 
 
 
183
 
184
  </div>
185
  <div class="settings-tab-defaults">
@@ -251,13 +259,8 @@ function wpreview_settings_page() {
251
  </table>
252
  </div>
253
  <div class="settings-tab-pro">
254
- <p class="wp-review-field">
255
- <?php
256
- $backlink_text = wp_review_get_backlink();
257
- ?>
258
- <input name="wp_review_options[add_backlink]" type="hidden" value="0" />
259
- <input name="wp_review_options[add_backlink]" id="wp_review_add_backlink" type="checkbox" value="1" <?php checked( $add_backlink, '1' ); ?> />
260
- <label for="wp_review_add_backlink" style="width: 300px;"><?php printf(__( 'Add Backlink (%s)', 'wp-review' ), $backlink_text); ?></label>
261
  </p>
262
  </div>
263
  <?php if ( $rows_left ) : ?>
115
  $bgcolor2 = ! empty($options['colors']['bgcolor2']) ? $options['colors']['bgcolor2'] : '';
116
  $bordercolor = ! empty($options['colors']['bordercolor']) ? $options['colors']['bordercolor'] : '';
117
  $registered_only = ! empty( $options['registered_only'] ) ? $options['registered_only'] : '';
118
+ $add_backlink = ! empty( $options['add_backlink'] ) ? true : false;
119
  if ( $items == '' ) $items = $defaultItems;
120
  if( $color == '' ) $color = $defaultColors['color'];
121
  if( $location == '' ) $location = $defaultLocation;
180
  <input type="text" class="wp-review-color" name="wp_review_options[colors][bordercolor]" id="wp_review_bordercolor" value="<?php echo $bordercolor; ?>" />
181
  </p>
182
  </div>
183
+ <p class="wp-review-field">
184
+ <?php
185
+ $backlink_text = wp_review_get_backlink();
186
+ ?>
187
+ <input name="wp_review_options[add_backlink]" type="hidden" value="0" />
188
+ <input name="wp_review_options[add_backlink]" id="wp_review_add_backlink" type="checkbox" value="1" <?php checked( $add_backlink, '1' ); ?> />
189
+ <label for="wp_review_add_backlink" style="width: 300px;"><?php printf(__( 'Add Backlink (%s)', 'wp-review' ), $backlink_text); ?></label>
190
+ </p>
191
 
192
  </div>
193
  <div class="settings-tab-defaults">
259
  </table>
260
  </div>
261
  <div class="settings-tab-pro">
262
+ <p>
263
+ <?php _e('Create Reviews Easily &amp; Rank Higher In Search Engines', 'wp-review'); ?> - <a target="_blank" href="https://mythemeshop.com/plugins/wp-review-pro/?utm_source=WP+Review&utm_medium=Notification+Link&utm_content=WP+Review+Pro+LP&utm_campaign=WordPressOrg"><strong><?php _e('WP Review Pro Plugin', 'wp-review'); ?></strong></a>
 
 
 
 
 
264
  </p>
265
  </div>
266
  <?php if ( $rows_left ) : ?>
assets/css/admin.css CHANGED
@@ -178,4 +178,18 @@ h4.wp-review-comment-title {
178
  .wp-review-rating-feature { display: inline-block }
179
  .wp-review-notice {
180
  position: relative;
181
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  .wp-review-rating-feature { display: inline-block }
179
  .wp-review-notice {
180
  position: relative;
181
+ }
182
+
183
+ .settings-tab-styling .wp-review-plugin-backlink {
184
+ display: inline;
185
+ margin-bottom: 0;
186
+ }
187
+ #wpfooter .wpreview-rating-link:hover {
188
+ text-decoration: none;
189
+ }
190
+
191
+ #wpfooter .wpreview-rating-link .dashicons {
192
+ font-size: 16px;
193
+ width: 16px;
194
+ height: 16px;
195
+ }
assets/css/wp-review.css CHANGED
@@ -521,11 +521,6 @@ form.wp-review-comment-form > div, #commentform.wp-review-comment-form > div {
521
  margin-bottom: 1.5em;
522
  }
523
 
524
- .settings-tab-pro .wp-review-plugin-backlink {
525
- display: inline;
526
- margin-bottom: 0;
527
- }
528
-
529
  #review.wp-review-box-with-backlink {
530
  margin-bottom: 0;
531
  }
521
  margin-bottom: 1.5em;
522
  }
523
 
 
 
 
 
 
524
  #review.wp-review-box-with-backlink {
525
  margin-bottom: 0;
526
  }
includes/functions.php CHANGED
@@ -1082,7 +1082,7 @@ function wp_review_get_review_box( $post_id = null ) {
1082
  $author_field = get_post_meta( $post_id, 'wp_review_author', true );
1083
 
1084
  $author = ( !$author_field || empty( $author_field ) || !$custom_author ) ? get_the_author() : $author_field;
1085
- $add_backlink = isset( $options['add_backlink'] ) && $options['add_backlink'] == '0' ? false : true;
1086
 
1087
  $colors = array();
1088
  $colors['custom_colors'] = get_post_meta( $post_id, 'wp_review_custom_colors', true );
1082
  $author_field = get_post_meta( $post_id, 'wp_review_author', true );
1083
 
1084
  $author = ( !$author_field || empty( $author_field ) || !$custom_author ) ? get_the_author() : $author_field;
1085
+ $add_backlink = ! empty( $options['add_backlink'] ) ? true : false;
1086
 
1087
  $colors = array();
1088
  $colors['custom_colors'] = get_post_meta( $post_id, 'wp_review_custom_colors', true );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Creator's website link: http://mythemeshop.com/plugins/wp-review/
4
  Tags: review, wp review, rating, wp rating, user rating, google rating, star rating, product review
5
  Requires at least: 3.0.1
6
  Tested up to: 4.4
7
- Stable tag: 4.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,6 +12,12 @@ Create reviews! Choose from Stars, Percentages or Points for review scores. Supp
12
 
13
  == Description ==
14
 
 
 
 
 
 
 
15
  Did you always want to increase the user interaction on your website by rating products/services/anything? We at <a href="http://mythemeshop.com/">MyThemeShop</a> understand your need, & created a premium Review plugin. We are now distributing it for FREE to give back to the WordPress community. We have been given so much by the WordPress community, it's time to give back.
16
 
17
  **WP Review plugin** is an easy yet powerful way to review content easily, without affecting the speed of your site. If you're a blogger, you probably occasionally review or rank products, services, tools, recipes, or other content on your site. WP Review plugin is a customizable and lightweight way to create reviews, using stars, percentage or point rating, and it includes support for translation, WPMU, Google rich snippets and unlimited colors. Just install it and follow the simple configuration instructions to place it in your desired location.
@@ -101,7 +107,10 @@ Please disable all plugins and check if rating is working properly. Then you can
101
 
102
  == Changelog ==
103
 
104
- = 4.0.2 =
 
 
 
105
  * Fixed decimals issue in Point reviews
106
  * Fixed bug preventing reviews to appear on Pages
107
 
@@ -110,15 +119,15 @@ Please disable all plugins and check if rating is working properly. Then you can
110
 
111
  = 4.0.1 =
112
  * Replaced anonymous functions for compatibility with older PHP versions
113
- * Added optional backlink (an option to disable it can be found on the plugin settings page)
114
  * Removed unneeded Review Links metabox
115
 
116
  = 4.0 =
117
  * Huge code improvement and optimization
118
  * Choose any rating type for user reviews (user reviews were restricted to stars before)
119
- * View and edit user ratings from the WordPress dashbaord
120
  * Added Drag & Drop for Review Items
121
- * Added Rating Column on 'Posts' page
122
  * For developers: Review box templates - Create custom review box templates
123
  * For developers: Rating type templates - Create custom rating types
124
  * Various bug fixes and improvements
4
  Tags: review, wp review, rating, wp rating, user rating, google rating, star rating, product review
5
  Requires at least: 3.0.1
6
  Tested up to: 4.4
7
+ Stable tag: 4.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ [youtube https://www.youtube.com/watch?v=IvJUHKNYAMc]
16
+
17
+ = Complete Setup Tutorial =
18
+ [youtube https://www.youtube.com/watch?v=NzMe-QY_WZY]
19
+
20
+
21
  Did you always want to increase the user interaction on your website by rating products/services/anything? We at <a href="http://mythemeshop.com/">MyThemeShop</a> understand your need, & created a premium Review plugin. We are now distributing it for FREE to give back to the WordPress community. We have been given so much by the WordPress community, it's time to give back.
22
 
23
  **WP Review plugin** is an easy yet powerful way to review content easily, without affecting the speed of your site. If you're a blogger, you probably occasionally review or rank products, services, tools, recipes, or other content on your site. WP Review plugin is a customizable and lightweight way to create reviews, using stars, percentage or point rating, and it includes support for translation, WPMU, Google rich snippets and unlimited colors. Just install it and follow the simple configuration instructions to place it in your desired location.
107
 
108
  == Changelog ==
109
 
110
+ = 4.0.4 =
111
+ * Fixed: backlink option is not enabled by default anymore. Sorry for that!
112
+
113
+ = 4.0.3 =
114
  * Fixed decimals issue in Point reviews
115
  * Fixed bug preventing reviews to appear on Pages
116
 
119
 
120
  = 4.0.1 =
121
  * Replaced anonymous functions for compatibility with older PHP versions
122
+ * Added optional backlink
123
  * Removed unneeded Review Links metabox
124
 
125
  = 4.0 =
126
  * Huge code improvement and optimization
127
  * Choose any rating type for user reviews (user reviews were restricted to stars before)
128
+ * View and edit user ratings from the WordPress dashboard
129
  * Added Drag & Drop for Review Items
130
+ * Added Rating Column on 'Posts' page
131
  * For developers: Review box templates - Create custom review box templates
132
  * For developers: Rating type templates - Create custom rating types
133
  * Various bug fixes and improvements
wp-review.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Review
4
  * Plugin URI: http://mythemeshop.com/plugins/wp-review/
5
  * Description: Create reviews! Choose from stars, percentages or points for review scores. Supports Retina Display, WPMU and Unlimited Color Schemes.
6
- * Version: 4.0.3
7
  * Author: MyThemesShop
8
  * Author URI: http://mythemeshop.com/
9
  *
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
20
  if ( ! defined( 'MTS_WP_REVIEW_DB_TABLE' )) {
21
 
22
  /* Plugin version */
23
- define( 'WP_REVIEW_PLUGIN_VERSION', '4.0.3' );
24
 
25
  /* Sets the custom db table name. */
26
  define( 'MTS_WP_REVIEW_DB_TABLE', 'mts_wp_reviews' );
3
  * Plugin Name: WP Review
4
  * Plugin URI: http://mythemeshop.com/plugins/wp-review/
5
  * Description: Create reviews! Choose from stars, percentages or points for review scores. Supports Retina Display, WPMU and Unlimited Color Schemes.
6
+ * Version: 4.0.4
7
  * Author: MyThemesShop
8
  * Author URI: http://mythemeshop.com/
9
  *
20
  if ( ! defined( 'MTS_WP_REVIEW_DB_TABLE' )) {
21
 
22
  /* Plugin version */
23
+ define( 'WP_REVIEW_PLUGIN_VERSION', '4.0.4' );
24
 
25
  /* Sets the custom db table name. */
26
  define( 'MTS_WP_REVIEW_DB_TABLE', 'mts_wp_reviews' );