Yasr – Yet Another Stars Rating - Version 0.6.7

Version Description

  • Small bugfix
Download this release

Release Info

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

Code changes from version 0.6.6 to 0.6.7

lib/yasr-db-functions.php CHANGED
@@ -109,6 +109,7 @@ function yasr_install() {
109
  $option['allowed_user'] = 'allow_anonymous';
110
  $option['scheme_color'] = 'light';
111
  $option['metabox_overall_rating'] = 'stars'; //This is not in settings page but in overall rating metabox
 
112
 
113
  add_option("yasr_general_options", $option); //Write here the default value if there is not option
114
 
109
  $option['allowed_user'] = 'allow_anonymous';
110
  $option['scheme_color'] = 'light';
111
  $option['metabox_overall_rating'] = 'stars'; //This is not in settings page but in overall rating metabox
112
+ $option['visitors_stats'] = 'yes';
113
 
114
  add_option("yasr_general_options", $option); //Write here the default value if there is not option
115
 
lib/yasr-functions.php CHANGED
@@ -109,7 +109,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
109
  wp_die( __( 'You do not have sufficient permissions to access this page.', 'yasr' ) );
110
  }
111
 
112
- include(YASR_ABSOLUTE_PATH . '/yasr-settings-page.php');
113
 
114
  } //End yasr_settings_page_content
115
 
@@ -152,7 +152,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
152
 
153
  function yasr_metabox_overall_rating_content() {
154
  if ( current_user_can( 'publish_posts' ) ) {
155
- include (YASR_ABSOLUTE_PATH . '/yasr-metabox-overall-rating.php');
156
  }
157
  else {
158
  _e("You don't have enought privileges to insert Overall Rating");
@@ -162,7 +162,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
162
 
163
  function yasr_metabox_multiple_rating_content() {
164
  if ( current_user_can( 'publish_posts' ) ) {
165
- include (YASR_ABSOLUTE_PATH . '/yasr-metabox-multiple-rating.php');
166
  }
167
  else {
168
  _e("You don't have enought privileges to insert Multi Set");
@@ -501,108 +501,4 @@ function yasr_donate_bottom () {
501
 
502
  }
503
 
504
-
505
- function yasr_go_pro () {
506
-
507
- ?>
508
-
509
- <div class="yasr-settingsdiv">
510
-
511
- <div id="yasr-info-pro-version">
512
-
513
- <?php
514
-
515
- _e("Looking for more features?", "yasr");
516
- echo " <a href=\"http://yetanotherstarsrating.com/pro-version/\">" . __("Upgrade to yasr pro!", "yasr") . "</a>";
517
-
518
- echo "<br>";
519
-
520
- ?>
521
-
522
- </div>
523
-
524
- <table id="comparetable" class="softgreen">
525
- <tr>
526
- <td class="blank"> </td>
527
- <th>Free</th>
528
- <th>Pro</th>
529
- </tr>
530
-
531
- <tr>
532
- <td class="rowTitle">Unlimited ratings and votes</td>
533
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
534
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
535
- </tr>
536
-
537
- <tr>
538
- <td class="rowTitle">Works with shortcodes</td>
539
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
540
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
541
- </tr>
542
-
543
- <tr>
544
- <td class="rowTitle">Multi Set Support</td>
545
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
546
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
547
- </tr>
548
- <tr>
549
- <td class="rowTitle">Logs for visitors' votes</td>
550
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
551
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
552
- </tr>
553
- <tr>
554
- <td class="rowTitle">Localization (.po and .mo files included)</td>
555
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
556
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
557
- </tr>
558
- <tr>
559
- <td class="rowTitle">Rich Snippet Support</td>
560
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
561
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
562
- </tr>
563
- <tr>
564
- <td class="rowTitle">Rankings for reviews, votes and users</td>
565
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
566
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
567
- </tr>
568
- <tr>
569
- <td class="rowTitle">Rankings Customization</td>
570
- <td><img src=<?php echo YASR_IMG_DIR . '/addRedX2.png' ?> alt='icon' /></td>
571
- <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
572
- </tr>
573
- <tr>
574
- <td class="rowTitle">Stars Customization</td>
575
- <td>Size Only</td>
576
- <td>Users can upload their own images. <img src=<?php echo YASR_IMG_DIR . '/addExclamation.png' ?> alt='icon' /></td>
577
- </tr>
578
- <tr>
579
- <td class="rowTitle">Visitors can vote on Multi Set</td>
580
- <td><img src=<?php echo YASR_IMG_DIR . '/addRedX2.png' ?> alt='icon' /></td>
581
- <td><img src=<?php echo YASR_IMG_DIR . '/addExclamation.png' ?> alt='icon' /></td>
582
- </tr>
583
- <tr>
584
- <td class="rowTitle">Users can review in comments</td>
585
- <td><img src=<?php echo YASR_IMG_DIR . '/addRedX2.png' ?> alt='icon' /></td>
586
- <td><img src=<?php echo YASR_IMG_DIR . '/addExclamation.png' ?> alt='icon' /></td>
587
- </tr>
588
-
589
- </table>
590
-
591
- <?php
592
-
593
- echo "<img src=" . YASR_IMG_DIR . "/addExclamation.png alt=icon /> =" ;
594
-
595
- _e("Not avaible yet", "yasr");
596
-
597
- echo "<p>";
598
-
599
- ?>
600
-
601
- </div>
602
-
603
-
604
- <?php
605
-
606
- }
607
-
608
  ?>
109
  wp_die( __( 'You do not have sufficient permissions to access this page.', 'yasr' ) );
110
  }
111
 
112
+ include(YASR_RELATIVE_PATH . '/yasr-settings-page.php');
113
 
114
  } //End yasr_settings_page_content
115
 
152
 
153
  function yasr_metabox_overall_rating_content() {
154
  if ( current_user_can( 'publish_posts' ) ) {
155
+ include (YASR_RELATIVE_PATH . '/yasr-metabox-overall-rating.php');
156
  }
157
  else {
158
  _e("You don't have enought privileges to insert Overall Rating");
162
 
163
  function yasr_metabox_multiple_rating_content() {
164
  if ( current_user_can( 'publish_posts' ) ) {
165
+ include (YASR_RELATIVE_PATH . '/yasr-metabox-multiple-rating.php');
166
  }
167
  else {
168
  _e("You don't have enought privileges to insert Multi Set");
501
 
502
  }
503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  ?>
lib/yasr-settings-functions.php CHANGED
@@ -1154,6 +1154,111 @@ add_action( 'admin_init', 'yasr_style_options_init' ); //This is for auto insert
1154
  }
1155
 
1156
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1157
  /*************************BEGIN IMPORT FUNCTIONS*******************************/
1158
 
1159
  /****** Check for previous GD STAR INSTALLATION *******/
1154
  }
1155
 
1156
 
1157
+ function yasr_go_pro () {
1158
+
1159
+ ?>
1160
+
1161
+ <div class="yasr-settingsdiv">
1162
+
1163
+ <div id="yasr-info-pro-version">
1164
+
1165
+ <?php
1166
+
1167
+ _e("Looking for more features?", "yasr");
1168
+ echo " <a href=\"http://yetanotherstarsrating.com/pro-version/\">" . __("Upgrade to yasr pro!", "yasr") . "</a>";
1169
+
1170
+ echo "<br>";
1171
+
1172
+ ?>
1173
+
1174
+ </div>
1175
+
1176
+ <table id="comparetable" class="softgreen">
1177
+ <tr>
1178
+ <td class="blank"> </td>
1179
+ <th>Free</th>
1180
+ <th>Pro</th>
1181
+ </tr>
1182
+
1183
+ <tr>
1184
+ <td class="rowTitle">Unlimited ratings and votes</td>
1185
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1186
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1187
+ </tr>
1188
+
1189
+ <tr>
1190
+ <td class="rowTitle">Works with shortcodes</td>
1191
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1192
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1193
+ </tr>
1194
+
1195
+ <tr>
1196
+ <td class="rowTitle">Multi Set Support</td>
1197
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1198
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1199
+ </tr>
1200
+ <tr>
1201
+ <td class="rowTitle">Logs for visitors' votes</td>
1202
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1203
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1204
+ </tr>
1205
+ <tr>
1206
+ <td class="rowTitle">Localization (.po and .mo files included)</td>
1207
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1208
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1209
+ </tr>
1210
+ <tr>
1211
+ <td class="rowTitle">Rich Snippet Support</td>
1212
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1213
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1214
+ </tr>
1215
+ <tr>
1216
+ <td class="rowTitle">Rankings for reviews, votes and users</td>
1217
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1218
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1219
+ </tr>
1220
+ <tr>
1221
+ <td class="rowTitle">Rankings Customization</td>
1222
+ <td><img src=<?php echo YASR_IMG_DIR . '/addRedX2.png' ?> alt='icon' /></td>
1223
+ <td><img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /></td>
1224
+ </tr>
1225
+ <tr>
1226
+ <td class="rowTitle">Stars Customization</td>
1227
+ <td>Size Only</td>
1228
+ <td> <img src=<?php echo YASR_IMG_DIR . '/addCheck.png' ?> alt='icon' /> <br /> Users can choose different ready to use sets or can upload their own images.</td>
1229
+ </tr>
1230
+ <tr>
1231
+ <td class="rowTitle">Visitors can vote on Multi Set</td>
1232
+ <td><img src=<?php echo YASR_IMG_DIR . '/addRedX2.png' ?> alt='icon' /></td>
1233
+ <td><img src=<?php echo YASR_IMG_DIR . '/addExclamation.png' ?> alt='icon' /></td>
1234
+ </tr>
1235
+ <tr>
1236
+ <td class="rowTitle">Users can review in comments</td>
1237
+ <td><img src=<?php echo YASR_IMG_DIR . '/addRedX2.png' ?> alt='icon' /></td>
1238
+ <td><img src=<?php echo YASR_IMG_DIR . '/addExclamation.png' ?> alt='icon' /></td>
1239
+ </tr>
1240
+
1241
+ </table>
1242
+
1243
+ <?php
1244
+
1245
+ echo "<img src=" . YASR_IMG_DIR . "/addExclamation.png alt=icon /> =" ;
1246
+
1247
+ _e("Not avaible yet", "yasr");
1248
+
1249
+ echo "<p>";
1250
+
1251
+ ?>
1252
+
1253
+ </div>
1254
+
1255
+
1256
+ <?php
1257
+
1258
+ }
1259
+
1260
+
1261
+
1262
  /*************************BEGIN IMPORT FUNCTIONS*******************************/
1263
 
1264
  /****** Check for previous GD STAR INSTALLATION *******/
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.0
7
- Stable tag: 0.6.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
@@ -90,6 +90,9 @@ Of course not: you can easily add it on the visual editor just by clicking on th
90
 
91
  == Changelog ==
92
 
 
 
 
93
  = 0.6.6 =
94
  * Bugfix: Auto insert in custom post type have been fixed
95
  * "stars" inside the stats tooltip is now translatable
4
  Requires at least: 3.5
5
  Contributors: Dudo
6
  Tested up to: 4.0
7
+ Stable tag: 0.6.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
90
 
91
  == Changelog ==
92
 
93
+ = 0.6.7 =
94
+ * Small bugfix
95
+
96
  = 0.6.6 =
97
  * Bugfix: Auto insert in custom post type have been fixed
98
  * "stars" inside the stats tooltip is now translatable
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.6.6
7
  * Author: Dario Curvino
8
  * Author URI: http://yetanotherstarsrating.com/
9
  * License: GPL2
@@ -28,38 +28,37 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
28
  */
29
 
30
 
31
- define('YASR_VERSION_NUM', '0.6.6');
32
 
33
- //Plugin absolute path
34
- define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
35
 
36
  //Plugin RELATIVE PATH without slashes (just the directory's name)
37
- define( "YASR_RELATIVE_PATH", dirname( plugin_basename(__FILE__) ) );
38
 
39
  //Plugin language directory: here I've to use relative path
40
  //because load_plugin_textdomain wants relative and not absolute path
41
- define( "YASR_LANG_DIR", YASR_RELATIVE_PATH . '/languages/' );
42
 
43
- //Js directory
44
- define ("YASR_JS_DIR", plugins_url( YASR_RELATIVE_PATH . '/js/' ));
45
 
46
- //CSS directory
47
- define ("YASR_CSS_DIR", plugins_url( YASR_RELATIVE_PATH . '/css/' ));
48
 
49
- //IMG directory
50
- define ("YASR_IMG_DIR", plugins_url( YASR_RELATIVE_PATH . '/img/'));
51
 
52
- /* Include function file */
 
53
 
54
- require (YASR_ABSOLUTE_PATH . '/lib/yasr-functions.php');
55
 
56
- require (YASR_ABSOLUTE_PATH . '/lib/yasr-settings-functions.php');
57
 
58
- require (YASR_ABSOLUTE_PATH . '/lib/yasr-db-functions.php');
59
 
60
- require (YASR_ABSOLUTE_PATH . '/lib/yasr-ajax-functions.php');
61
-
62
- require (YASR_ABSOLUTE_PATH . '/lib/yasr-shortcode-functions.php');
63
 
64
  $version_installed = get_option('yasr-version') ;
65
 
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.6.7
7
  * Author: Dario Curvino
8
  * Author URI: http://yetanotherstarsrating.com/
9
  * License: GPL2
28
  */
29
 
30
 
31
+ define('YASR_VERSION_NUM', '0.6.7');
32
 
33
+ //Plugin relative path
34
+ define( "YASR_RELATIVE_PATH", dirname(__FILE__) );
35
 
36
  //Plugin RELATIVE PATH without slashes (just the directory's name)
37
+ define( "YASR_RELATIVE_PATH_PLUGIN_DIR", dirname( plugin_basename(__FILE__) ) );
38
 
39
  //Plugin language directory: here I've to use relative path
40
  //because load_plugin_textdomain wants relative and not absolute path
41
+ define( "YASR_LANG_DIR", YASR_RELATIVE_PATH_PLUGIN_DIR . '/languages/' );
42
 
43
+ //Js directory absolute
44
+ define ("YASR_JS_DIR", plugins_url( YASR_RELATIVE_PATH_PLUGIN_DIR . '/js/' ));
45
 
46
+ //CSS directory absolute
47
+ define ("YASR_CSS_DIR", plugins_url( YASR_RELATIVE_PATH_PLUGIN_DIR . '/css/' ));
48
 
49
+ //IMG directory absolute
50
+ define ("YASR_IMG_DIR", plugins_url( YASR_RELATIVE_PATH_PLUGIN_DIR . '/img/'));
51
 
52
+ // Include function file
53
+ require (YASR_RELATIVE_PATH . '/lib/yasr-functions.php');
54
 
55
+ require (YASR_RELATIVE_PATH . '/lib/yasr-settings-functions.php');
56
 
57
+ require (YASR_RELATIVE_PATH . '/lib/yasr-db-functions.php');
58
 
59
+ require (YASR_RELATIVE_PATH . '/lib/yasr-ajax-functions.php');
60
 
61
+ require (YASR_RELATIVE_PATH . '/lib/yasr-shortcode-functions.php');
 
 
62
 
63
  $version_installed = get_option('yasr-version') ;
64