WP Review - Version 3.2.8

Version Description

  • Removed extra closing span tag in markup
  • Added Title option for widget
Download this release

Release Info

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

Code changes from version 3.2.7 to 3.2.8

Files changed (4) hide show
  1. includes/functions.php +1 -1
  2. includes/widget.php +11 -3
  3. readme.txt +5 -1
  4. wp-review.php +1 -1
includes/functions.php CHANGED
@@ -379,7 +379,7 @@ function wp_review_show_total($echo = true, $class = 'review-total-only', $post_
379
  if ( 'percentage' == $type ) {
380
  $review .= '<span class="review-total-box"><span>' . $total . '</span> <i class="percentage-icon">%</i>' . '</span>';
381
  } elseif ( 'point' == $type ) {
382
- $review .= '<span class="review-total-box">' . $total . '/'.__('10','wp-review').'</span></span>';
383
  } elseif ( 'star' == $type ) {
384
  // star
385
  $review .= '<div class="review-total-star">';
379
  if ( 'percentage' == $type ) {
380
  $review .= '<span class="review-total-box"><span>' . $total . '</span> <i class="percentage-icon">%</i>' . '</span>';
381
  } elseif ( 'point' == $type ) {
382
+ $review .= '<span class="review-total-box">' . $total . '/'.__('10','wp-review').'</span>';
383
  } elseif ( 'star' == $type ) {
384
  // star
385
  $review .= '<div class="review-total-star">';
includes/widget.php CHANGED
@@ -33,6 +33,7 @@ class wp_review_tab_widget extends WP_Widget {
33
 
34
  function form( $instance ) {
35
  $instance = wp_parse_args( (array) $instance, array(
 
36
  'tabs' => array('toprated' => 1, 'recent' => 1, 'mostvoted' => 0, 'custom' => 0),
37
  'tab_order' => array('toprated' => 1, 'recent' => 2, 'mostvoted' => 3, 'custom' => 4),
38
  'tab_titles' => array('toprated' => __('Top Rated'), 'recent' => __('Recent'), 'mostvoted' => __('Most Voted'), 'custom' => __('Editor\'s choice')),
@@ -48,6 +49,11 @@ class wp_review_tab_widget extends WP_Widget {
48
  extract($instance);
49
  ?>
50
  <div class="wp_review_tab_options_form">
 
 
 
 
 
51
  <h4><?php _e('Select Tabs', 'wp-review'); ?></h4>
52
 
53
  <div class="wp_review_tab_select_tabs">
@@ -99,8 +105,6 @@ class wp_review_tab_widget extends WP_Widget {
99
  <p>
100
  <label for="<?php echo $this->get_field_id('title_length'); ?>"><?php _e('Title length (words):', 'mts_wpt'); ?>
101
  <br />
102
- <!-- dummy input so that WP doesn't pick up title_length as title -->
103
- <input id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="" style="display: none;" />
104
  <input id="<?php echo $this->get_field_id('title_length'); ?>" name="<?php echo $this->get_field_name('title_length'); ?>" type="number" min="1" step="1" value="<?php echo $title_length; ?>" />
105
  </label>
106
  </p>
@@ -182,6 +186,7 @@ class wp_review_tab_widget extends WP_Widget {
182
 
183
  function update( $new_instance, $old_instance ) {
184
  $instance = $old_instance;
 
185
  $instance['tabs'] = $new_instance['tabs'];
186
  $instance['tab_order'] = $new_instance['tab_order'];
187
  $instance['tab_titles'] = wp_kses_post($new_instance['tab_titles']);
@@ -197,6 +202,7 @@ class wp_review_tab_widget extends WP_Widget {
197
  function widget( $args, $instance ) {
198
  extract($args, EXTR_SKIP);
199
  extract($instance, EXTR_SKIP);
 
200
  wp_enqueue_script('wp_review-js');
201
  wp_enqueue_style('wp_review-style');
202
  wp_enqueue_script('wp_review_tab_widget');
@@ -219,7 +225,9 @@ class wp_review_tab_widget extends WP_Widget {
219
  array_multisort($tab_order, $available_tabs);
220
 
221
  ?>
222
- <?php echo $before_widget; ?>
 
 
223
  <div class="wp_review_tab_widget_content" id="<?php echo $widget_id; ?>_content">
224
  <ul class="wp-review-tabs <?php echo "has-$tabs_count-"; ?>tabs">
225
  <?php foreach ($available_tabs as $tab => $label) : ?>
33
 
34
  function form( $instance ) {
35
  $instance = wp_parse_args( (array) $instance, array(
36
+ 'title' => '',
37
  'tabs' => array('toprated' => 1, 'recent' => 1, 'mostvoted' => 0, 'custom' => 0),
38
  'tab_order' => array('toprated' => 1, 'recent' => 2, 'mostvoted' => 3, 'custom' => 4),
39
  'tab_titles' => array('toprated' => __('Top Rated'), 'recent' => __('Recent'), 'mostvoted' => __('Most Voted'), 'custom' => __('Editor\'s choice')),
49
  extract($instance);
50
  ?>
51
  <div class="wp_review_tab_options_form">
52
+ <p>
53
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:','mythemeshop' ); ?></label>
54
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
55
+ </p>
56
+
57
  <h4><?php _e('Select Tabs', 'wp-review'); ?></h4>
58
 
59
  <div class="wp_review_tab_select_tabs">
105
  <p>
106
  <label for="<?php echo $this->get_field_id('title_length'); ?>"><?php _e('Title length (words):', 'mts_wpt'); ?>
107
  <br />
 
 
108
  <input id="<?php echo $this->get_field_id('title_length'); ?>" name="<?php echo $this->get_field_name('title_length'); ?>" type="number" min="1" step="1" value="<?php echo $title_length; ?>" />
109
  </label>
110
  </p>
186
 
187
  function update( $new_instance, $old_instance ) {
188
  $instance = $old_instance;
189
+ $instance['title'] = strip_tags( $new_instance['title'] );
190
  $instance['tabs'] = $new_instance['tabs'];
191
  $instance['tab_order'] = $new_instance['tab_order'];
192
  $instance['tab_titles'] = wp_kses_post($new_instance['tab_titles']);
202
  function widget( $args, $instance ) {
203
  extract($args, EXTR_SKIP);
204
  extract($instance, EXTR_SKIP);
205
+ $title = apply_filters( 'widget_title', $title );
206
  wp_enqueue_script('wp_review-js');
207
  wp_enqueue_style('wp_review-style');
208
  wp_enqueue_script('wp_review_tab_widget');
225
  array_multisort($tab_order, $available_tabs);
226
 
227
  ?>
228
+ <?php echo $before_widget;
229
+ if ( ! empty( $title ) ) echo $before_title . $title . $after_title; ?>
230
+
231
  <div class="wp_review_tab_widget_content" id="<?php echo $widget_id; ?>_content">
232
  <ul class="wp-review-tabs <?php echo "has-$tabs_count-"; ?>tabs">
233
  <?php foreach ($available_tabs as $tab => $label) : ?>
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.1
7
- Stable tag: 3.2.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -89,6 +89,10 @@ Please disable all plugins and check if rating is working properly. Then you can
89
 
90
  == Changelog ==
91
 
 
 
 
 
92
  = 3.2.7 =
93
  * Added Title Length option for widget
94
  * Added Filter to control default title length
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.1
7
+ Stable tag: 3.2.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
89
 
90
  == Changelog ==
91
 
92
+ = 3.2.8 =
93
+ * Removed extra closing span tag in markup
94
+ * Added Title option for widget
95
+
96
  = 3.2.7 =
97
  * Added Title Length option for widget
98
  * Added Filter to control default title length
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: 3.2.7
7
  * Author: MyThemesShop
8
  * Author URI: http://mythemeshop.com/
9
  *
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: 3.2.8
7
  * Author: MyThemesShop
8
  * Author URI: http://mythemeshop.com/
9
  *