Yasr – Yet Another Stars Rating - Version 0.7.7

Version Description

  • Removed an useless row in yasr_votes table.
  • Minor change on [yasr_top_5_reviewers] shortcode
  • Code cleanup
Download this release

Release Info

Developer Dudo
Plugin Icon 128x128 Yasr – Yet Another Stars Rating
Version 0.7.7
Comparing to
See all releases

Code changes from version 0.7.6 to 0.7.7

lib/yasr-ajax-functions.php CHANGED
@@ -31,11 +31,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
31
function yasr_insert_overall_rating_callback() {
32
33
if (isset($_POST['rating']) && ($_POST['post_id']) && $_POST['post_id'] != '') {
34
- global $current_user;
35
- get_currentuserinfo();
36
$rating = $_POST['rating'];
37
$post_id = $_POST['post_id'];
38
- $reviewer_id = $current_user->ID;
39
$nonce = $_POST['nonce'];
40
}
41
@@ -58,10 +55,9 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
58
YASR_VOTES_TABLE,
59
array (
60
'overall_rating' => $rating,
61
- 'reviewer_id' => $reviewer_id
62
),
63
array('post_id' => $post_id),
64
- array('%s', '%d')
65
);
66
67
//If update result fails this is a new post or post has no visitor ratings
@@ -72,7 +68,6 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
72
array (
73
'post_id' => $post_id,
74
'overall_rating' => $rating,
75
- 'reviewer_id' => $reviewer_id,
76
'review_type' => 'Product' //default review type in a new post
77
),
78
array('%d', '%s', '%d', '%s')
31
function yasr_insert_overall_rating_callback() {
32
33
if (isset($_POST['rating']) && ($_POST['post_id']) && $_POST['post_id'] != '') {
34
$rating = $_POST['rating'];
35
$post_id = $_POST['post_id'];
36
$nonce = $_POST['nonce'];
37
}
38
55
YASR_VOTES_TABLE,
56
array (
57
'overall_rating' => $rating,
58
),
59
array('post_id' => $post_id),
60
+ array('%s')
61
);
62
63
//If update result fails this is a new post or post has no visitor ratings
68
array (
69
'post_id' => $post_id,
70
'overall_rating' => $rating,
71
'review_type' => 'Product' //default review type in a new post
72
),
73
array('%d', '%s', '%d', '%s')
lib/yasr-db-functions.php CHANGED
@@ -35,7 +35,6 @@ function yasr_install() {
35
$sql_yasr_votes_table = "CREATE TABLE IF NOT EXISTS $yasr_votes_table (
36
id bigint(20) NOT NULL AUTO_INCREMENT,
37
post_id bigint(20) NOT NULL,
38
- reviewer_id bigint(20) NOT NULL,
39
overall_rating decimal(2,1) NOT NULL,
40
number_of_votes bigint(20) NOT NULL,
41
sum_votes decimal(11,1) NOT NULL,
@@ -138,7 +137,7 @@ function yasr_get_overall_rating($post_id_referenced=FALSE) {
138
139
}
140
141
- if ($post_id == '') {
142
143
exit();
144
@@ -202,14 +201,14 @@ function yasr_get_multi_set() {
202
function yasr_get_multi_set_values_and_field ($post_id, $set_type) {
203
global $wpdb;
204
205
- $result=$wpdb->get_results("SELECT f.field_name AS name, f.field_id AS id, v.votes AS vote
206
FROM " . YASR_MULTI_SET_FIELDS_TABLE . " AS f, " . YASR_MULTI_SET_VALUES_TABLE . " AS v
207
WHERE f.parent_set_id=$set_type
208
AND f.field_id = v.field_id
209
- AND v.post_id = $post_id
210
- AND v.set_type = $set_type
211
AND f.parent_set_id=v.set_type
212
- ORDER BY f.field_id ASC");
213
214
return $result;
215
}
@@ -232,7 +231,7 @@ function yasr_get_visitor_votes ($post_id_referenced=FALSE) {
232
233
}
234
235
- if ($post_id == '' ) {
236
237
exit();
238
35
$sql_yasr_votes_table = "CREATE TABLE IF NOT EXISTS $yasr_votes_table (
36
id bigint(20) NOT NULL AUTO_INCREMENT,
37
post_id bigint(20) NOT NULL,
38
overall_rating decimal(2,1) NOT NULL,
39
number_of_votes bigint(20) NOT NULL,
40
sum_votes decimal(11,1) NOT NULL,
137
138
}
139
140
+ if (!$post_id) {
141
142
exit();
143
201
function yasr_get_multi_set_values_and_field ($post_id, $set_type) {
202
global $wpdb;
203
204
+ $result=$wpdb->get_results($wpdb->prepare("SELECT f.field_name AS name, f.field_id AS id, v.votes AS vote
205
FROM " . YASR_MULTI_SET_FIELDS_TABLE . " AS f, " . YASR_MULTI_SET_VALUES_TABLE . " AS v
206
WHERE f.parent_set_id=$set_type
207
AND f.field_id = v.field_id
208
+ AND v.post_id = %d
209
+ AND v.set_type = %d
210
AND f.parent_set_id=v.set_type
211
+ ORDER BY f.field_id ASC", $post_id, $set_type));
212
213
return $result;
214
}
231
232
}
233
234
+ if (!$post_id) {
235
236
exit();
237
lib/yasr-functions.php CHANGED
@@ -30,7 +30,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
30
31
//if visitors stats are enabled
32
if (YASR_VISITORS_STATS === 'yes') {
33
- wp_enqueue_style( 'jquery-ui','//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.min.css', FALSE, NULL, 'all' );
34
}
35
36
wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', FALSE, NULL, 'all' );
@@ -174,11 +174,11 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
174
175
/****** Auto insert overall rating and visitor rating ******/
176
177
- add_filter('the_content', 'yasr_auto_insert_shortcode_callback');
178
179
- function yasr_auto_insert_shortcode_callback($content) {
180
181
- if (YASR_AUTO_INSERT_ENABLED == 1) {
182
183
$auto_insert_shortcode=NULL; //To avoid undefined variable notice outside the loop (if (is_singular) )
184
@@ -255,18 +255,9 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
255
}
256
}
257
258
259
- } //End if (YASR_AUTO_INSERT_ENABLED
260
-
261
- //Return if auto insert is off
262
- else {
263
-
264
- return $content;
265
-
266
- }
267
-
268
-
269
- } //End function yasr_auto_insert_shortcode_callback
270
271
272
/****** Add review schema data at the end of the post *******/
@@ -448,58 +439,4 @@ add_action( 'admin_init', 'yasr_get_custom_post_type');
448
449
}
450
451
- /****** Donation box dx ******/
452
-
453
- function yasr_donate_dx () {
454
-
455
- ?>
456
-
457
- <div class="yasr-donatedivdx" style="display:none">
458
- <h3><?php _e('Donations', 'yasr'); ?></h3>
459
-
460
- <?php _e('If you have found this plugin useful, please consider making a donation to help support future development. Your support will be much appreciated. ', 'yasr'); ?>
461
- <br />
462
- <?php _e('Thank you!', 'yasr'); ?>
463
- <br />
464
- <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXE284FYMNWDC">
465
- <?php echo("<img src=" . YASR_IMG_DIR . "/paypal.png>"); ?>
466
- </a>
467
-
468
- <hr>
469
-
470
- <h3><a href="http://yetanotherstarsrating.com"><?php _e('Follow YASR official site!', 'yasr') ?></a></h3>
471
-
472
- </div>
473
-
474
- <?php
475
-
476
- }
477
-
478
-
479
- function yasr_donate_bottom () {
480
-
481
- ?>
482
-
483
- <div class="yasr-donatedivbottom" style="display:none">
484
- <h3><?php _e('Donations', 'yasr'); ?></h3>
485
-
486
- <?php _e('If you have found this plugin useful, please consider making a donation to help support future development. Your support will be much appreciated. ', 'yasr'); ?>
487
- <br />
488
- <?php _e('Thank you!', 'yasr'); ?>
489
- <br />
490
-
491
- <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXE284FYMNWDC">
492
- <?php echo("<img src=" . YASR_IMG_DIR . "/paypal.png>"); ?>
493
- </a>
494
-
495
- <hr>
496
-
497
- <h3><a href="http://yetanotherstarsrating.com"><?php _e('Follow YASR official site!', 'yasr') ?></a></h3>
498
-
499
- </div>
500
-
501
- <?php
502
-
503
- }
504
-
505
- ?>
30
31
//if visitors stats are enabled
32
if (YASR_VISITORS_STATS === 'yes') {
33
+ wp_enqueue_style( 'jquery-ui','//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css', FALSE, NULL, 'all' );
34
}
35
36
wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', FALSE, NULL, 'all' );
174
175
/****** Auto insert overall rating and visitor rating ******/
176
177
+ if (YASR_AUTO_INSERT_ENABLED == 1) {
178
179
+ add_filter('the_content', 'yasr_auto_insert_shortcode_callback');
180
181
+ function yasr_auto_insert_shortcode_callback($content) {
182
183
$auto_insert_shortcode=NULL; //To avoid undefined variable notice outside the loop (if (is_singular) )
184
255
}
256
}
257
258
+ } //End function yasr_auto_insert_shortcode_callback
259
260
+ } //End if (YASR_AUTO_INSERT_ENABLED
261
262
263
/****** Add review schema data at the end of the post *******/
439
440
}
441
442
+ ?>
lib/yasr-settings-functions.php CHANGED
@@ -1145,40 +1145,40 @@ function yasr_process_edit_multi_set_form() {
1145
1146
add_action( 'admin_init', 'yasr_style_options_init' ); //This is for auto insert options
1147
1148
- function yasr_style_options_init() {
1149
- register_setting(
1150
- 'yasr_style_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
1151
- 'yasr_style_options' //The name of an option to sanitize and save.
1152
- );
1153
1154
- $style_options = get_option( 'yasr_style_options' );
1155
1156
- if (!$style_options) {
1157
1158
- $style_options = array();
1159
- $style_options['textarea'] = NULL;
1160
1161
- }
1162
1163
- add_settings_section( 'yasr_style_options_section_id', __('Style Options', 'yasr'), 'yasr_style_section_callback', 'yasr_style_tab' );
1164
- add_settings_field( 'yasr_style_options_textarea', __('Custom CSS Styles', 'yasr'), 'yasr_style_options_textarea_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options );
1165
1166
- }
1167
1168
- function yasr_style_section_callback () {
1169
- _e("Please use text area below to write your own CSS styles to override the default ones.", "yasr");
1170
- echo "<strong>";
1171
- _e("Leave it blank if you don't know what you're doing", "yasr");
1172
- echo "</strong>";
1173
- }
1174
1175
- function yasr_style_options_textarea_callback ($style_options) {
1176
1177
- echo ("
1178
- <textarea rows=\"20\" cols=\"50\" name=\"yasr_style_options[textarea]\" id=\"yasr_style_options_textarea\">$style_options[textarea]</textarea>
1179
- ");
1180
1181
- }
1182
1183
1184
function yasr_go_pro () {
@@ -1192,7 +1192,7 @@ function yasr_go_pro () {
1192
<?php
1193
1194
_e("Looking for more features?", "yasr");
1195
- echo " <a href=\"http://yetanotherstarsrating.com/pro-version/\">" . __("Upgrade to yasr pro!", "yasr") . "</a>";
1196
1197
echo "<br>";
1198
@@ -1284,6 +1284,60 @@ function yasr_go_pro () {
1284
1285
}
1286
1287
1288
1289
/*************************BEGIN IMPORT FUNCTIONS*******************************/
@@ -1347,7 +1401,7 @@ function yasr_import_gdstar_data(){
1347
$data=$wpdb->get_results(" SELECT gd.post_id, (gd.user_voters + gd.visitor_voters) AS voters,
1348
(gd.user_votes + gd.visitor_votes) AS sum_votes,
1349
gd.review,
1350
- p.ID, p.post_author
1351
FROM $gdsr_data_article AS gd, $wpdb->posts AS p
1352
WHERE gd.post_id = p.id" );
1353
@@ -1464,7 +1518,6 @@ function yasr_insert_gdstar_data($votes){
1464
$result=$wpdb->replace(
1465
YASR_VOTES_TABLE,
1466
array (
1467
- 'reviewer_id' => $column->post_author,
1468
'post_id' => $column->post_id,
1469
'overall_rating' => $column->review,
1470
'number_of_votes' => $column->voters,
@@ -1582,7 +1635,7 @@ function yasr_insert_gdstar_multi_value($multi_datas) {
1582
}
1583
1584
1585
- /****************************END IMPORT FUNCTIONS******************************/
1586
1587
1588
?>
1145
1146
add_action( 'admin_init', 'yasr_style_options_init' ); //This is for auto insert options
1147
1148
+ function yasr_style_options_init() {
1149
+ register_setting(
1150
+ 'yasr_style_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
1151
+ 'yasr_style_options' //The name of an option to sanitize and save.
1152
+ );
1153
1154
+ $style_options = get_option( 'yasr_style_options' );
1155
1156
+ if (!$style_options) {
1157
1158
+ $style_options = array();
1159
+ $style_options['textarea'] = NULL;
1160
1161
+ }
1162
1163
+ add_settings_section( 'yasr_style_options_section_id', __('Style Options', 'yasr'), 'yasr_style_section_callback', 'yasr_style_tab' );
1164
+ add_settings_field( 'yasr_style_options_textarea', __('Custom CSS Styles', 'yasr'), 'yasr_style_options_textarea_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options );
1165
1166
+ }
1167
1168
+ function yasr_style_section_callback () {
1169
+ _e("Please use text area below to write your own CSS styles to override the default ones.", "yasr");
1170
+ echo "<strong>";
1171
+ _e("Leave it blank if you don't know what you're doing", "yasr");
1172
+ echo "</strong>";
1173
+ }
1174
1175
+ function yasr_style_options_textarea_callback ($style_options) {
1176
1177
+ echo ("
1178
+ <textarea rows=\"20\" cols=\"50\" name=\"yasr_style_options[textarea]\" id=\"yasr_style_options_textarea\">$style_options[textarea]</textarea>
1179
+ ");
1180
1181
+ }
1182
1183
1184
function yasr_go_pro () {
1192
<?php
1193
1194
_e("Looking for more features?", "yasr");
1195
+ echo " <a href=\"https://yetanotherstarsrating.com/pro-version/\">" . __("Upgrade to yasr pro!", "yasr") . "</a>";
1196
1197
echo "<br>";
1198
1284
1285
}
1286
1287
+ /****** Donation box dx ******/
1288
+
1289
+ function yasr_donate_dx () {
1290
+
1291
+ ?>
1292
+
1293
+ <div class="yasr-donatedivdx" style="display:none">
1294
+ <h3><?php _e('Donations', 'yasr'); ?></h3>
1295
+
1296
+ <?php _e('If you have found this plugin useful, please consider making a donation to help support future development. Your support will be much appreciated. ', 'yasr'); ?>
1297
+ <br />
1298
+ <?php _e('Thank you!', 'yasr'); ?>
1299
+ <br />
1300
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXE284FYMNWDC">
1301
+ <?php echo("<img src=" . YASR_IMG_DIR . "/paypal.png>"); ?>
1302
+ </a>
1303
+
1304
+ <hr>
1305
+
1306
+ <h3><a href="https://yetanotherstarsrating.com"><?php _e('Follow YASR official site!', 'yasr') ?></a></h3>
1307
+
1308
+ </div>
1309
+
1310
+ <?php
1311
+
1312
+ }
1313
+
1314
+
1315
+ function yasr_donate_bottom () {
1316
+
1317
+ ?>
1318
+
1319
+ <div class="yasr-donatedivbottom" style="display:none">
1320
+ <h3><?php _e('Donations', 'yasr'); ?></h3>
1321
+
1322
+ <?php _e('If you have found this plugin useful, please consider making a donation to help support future development. Your support will be much appreciated. ', 'yasr'); ?>
1323
+ <br />
1324
+ <?php _e('Thank you!', 'yasr'); ?>
1325
+ <br />
1326
+
1327
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AXE284FYMNWDC">
1328
+ <?php echo("<img src=" . YASR_IMG_DIR . "/paypal.png>"); ?>
1329
+ </a>
1330
+
1331
+ <hr>
1332
+
1333
+ <h3><a href="https://yetanotherstarsrating.com"><?php _e('Follow YASR official site!', 'yasr') ?></a></h3>
1334
+
1335
+ </div>
1336
+
1337
+ <?php
1338
+
1339
+ }
1340
+
1341
1342
1343
/*************************BEGIN IMPORT FUNCTIONS*******************************/
1401
$data=$wpdb->get_results(" SELECT gd.post_id, (gd.user_voters + gd.visitor_voters) AS voters,
1402
(gd.user_votes + gd.visitor_votes) AS sum_votes,
1403
gd.review,
1404
+ p.ID
1405
FROM $gdsr_data_article AS gd, $wpdb->posts AS p
1406
WHERE gd.post_id = p.id" );
1407
1518
$result=$wpdb->replace(
1519
YASR_VOTES_TABLE,
1520
array (
1521
'post_id' => $column->post_id,
1522
'overall_rating' => $column->review,
1523
'number_of_votes' => $column->voters,
1635
}
1636
1637
1638
+ /************************************************END IMPORT FUNCTIONS****************************************************/
1639
1640
1641
?>
lib/yasr-shortcode-functions.php CHANGED
@@ -554,11 +554,11 @@ function yasr_top_5_reviewers_callback () {
554
555
global $wpdb;
556
557
- $query_result = $wpdb->get_results("SELECT COUNT( reviewer_id ) as total_count, reviewer_id as reviewer
558
- FROM " . YASR_VOTES_TABLE . ", $wpdb->posts AS p
559
WHERE post_id = p.ID
560
AND p.post_status = 'publish'
561
- GROUP BY reviewer_id
562
ORDER BY (total_count) DESC
563
LIMIT 5");
564
554
555
global $wpdb;
556
557
+ $query_result = $wpdb->get_results("SELECT COUNT( post_author ) as total_count, post_author as reviewer
558
+ FROM $wpdb->posts AS p, " . YASR_VOTES_TABLE . "
559
WHERE post_id = p.ID
560
AND p.post_status = 'publish'
561
+ GROUP BY post_author
562
ORDER BY (total_count) DESC
563
LIMIT 5");
564
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post r
4
Requires at least: 3.5
5
Contributors: Dudo
6
Tested up to: 4.1
7
- Stable tag: 0.7.6
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
10
Yet Another Stars Rating is a simple plugin which allows you and / or your visitor to rate a post or element. Ideal for review's website
@@ -50,7 +50,8 @@ If with gd-star-rating you're using a different number of stars from the default
50
Check [here](http://translate.yetanotherstarsrating.com/) to see if your translation is up to date
51
52
= Related Link =
53
- News and doc at [Yasr Official Site](http://yetanotherstarsrating.com/)
54
55
= Press =
56
* [WPMUDEV](http://premium.wpmudev.org/blog/free-wordpress-ratings-testimonials-subscriber-count-plugins/)
@@ -105,6 +106,8 @@ When a visitor (logged in or not) rates a post/page, his rating is stored in the
105
= Wait, wait! Do I need to keep in mind all this shortcode? =
106
Of course not: you can easily add it on the visual editor just by clicking on the yellow star and then choose what to insert.
107
108
== Screenshots ==
109
1. Example of yasr in a videogame review
110
2. Another example of a restaurant review
@@ -114,6 +117,11 @@ Of course not: you can easily add it on the visual editor just by clicking on th
114
115
== Changelog ==
116
117
= 0.7.6 =
118
* Updated pro info.
119
* .po file update
4
Requires at least: 3.5
5
Contributors: Dudo
6
Tested up to: 4.1
7
+ Stable tag: 0.7.7
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
10
Yet Another Stars Rating is a simple plugin which allows you and / or your visitor to rate a post or element. Ideal for review's website
50
Check [here](http://translate.yetanotherstarsrating.com/) to see if your translation is up to date
51
52
= Related Link =
53
+ * News and doc at [Yasr Official Site](http://yetanotherstarsrating.com/)
54
+ * [Demo site](http://yetanotherstarsrating.com/)
55
56
= Press =
57
* [WPMUDEV](http://premium.wpmudev.org/blog/free-wordpress-ratings-testimonials-subscriber-count-plugins/)
106
= Wait, wait! Do I need to keep in mind all this shortcode? =
107
Of course not: you can easily add it on the visual editor just by clicking on the yellow star and then choose what to insert.
108
109
+ [Demo site](http://yetanotherstarsrating.com/)
110
+
111
== Screenshots ==
112
1. Example of yasr in a videogame review
113
2. Another example of a restaurant review
117
118
== Changelog ==
119
120
+ = 0.7.7 =
121
+ * Removed an useless row in yasr_votes table.
122
+ * Minor change on [yasr_top_5_reviewers] shortcode
123
+ * Code cleanup
124
+
125
= 0.7.6 =
126
* Updated pro info.
127
* .po file update
yet-another-stars-rating.php CHANGED
@@ -3,7 +3,7 @@
3
* Plugin Name: Yet Another Stars Rating
4
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
5
* Description: Rating system with rich snippets
6
- * Version: 0.7.6
7
* Author: Dario Curvino
8
* Author URI: http://yetanotherstarsrating.com/
9
* License: GPL2
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
28
*/
29
30
31
- define('YASR_VERSION_NUM', '0.7.6');
32
33
//Plugin relative path
34
define( "YASR_RELATIVE_PATH", dirname(__FILE__) );
@@ -151,6 +151,14 @@ define ("YASR_LOADER_IMAGE", YASR_IMG_DIR . "/loader.gif");
151
152
/****** backward compatibility functions ******/
153
154
//Remove mid feb 2015
155
if ($version_installed && $version_installed < '0.6.9' ) {
156
@@ -162,12 +170,9 @@ if ($version_installed && $version_installed < '0.6.9' ) {
162
163
}
164
165
- //remove end gen 2015
166
- if ($version_installed && $version_installed < '0.5.9') {
167
168
- $wpdb->query("ALTER TABLE " . YASR_VOTES_TABLE . " ADD review_type VARCHAR( 10 )");
169
170
- }
171
172
if ($version_installed != YASR_VERSION_NUM) {
173
@@ -176,6 +181,4 @@ if ($version_installed != YASR_VERSION_NUM) {
176
}
177
178
179
- /****** End backward compatibility functions ******/
180
-
181
?>
3
* Plugin Name: Yet Another Stars Rating
4
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
5
* Description: Rating system with rich snippets
6
+ * Version: 0.7.7
7
* Author: Dario Curvino
8
* Author URI: http://yetanotherstarsrating.com/
9
* License: GPL2
28
*/
29
30
31
+ define('YASR_VERSION_NUM', '0.7.7');
32
33
//Plugin relative path
34
define( "YASR_RELATIVE_PATH", dirname(__FILE__) );
151
152
/****** backward compatibility functions ******/
153
154
+
155
+ //remove end may 2015
156
+ if ($version_installed && $version_installed < '0.7.7') {
157
+
158
+ $wpdb->query("ALTER TABLE " . YASR_VOTES_TABLE . " DROP reviewer_id");
159
+
160
+ }
161
+
162
//Remove mid feb 2015
163
if ($version_installed && $version_installed < '0.6.9' ) {
164
170
171
}
172
173
174
+ /****** End backward compatibility functions ******/
175
176
177
if ($version_installed != YASR_VERSION_NUM) {
178
181
}
182
183
184
?>