Yasr – Yet Another Stars Rating - Version 2.0.1

Version Description

  • TWEAKED: changed code in yasr-shortcode-functions.php to support php version < 7
Download this release

Release Info

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

Code changes from version 2.0.0 to 2.0.1

lib/yasr-shortcode-functions.php CHANGED
@@ -268,17 +268,20 @@ function shortcode_visitor_votes_callback($atts) {
268
}
269
270
if (YASR_VISITORS_STATS === 'yes') {
271
//default
272
$span_dashicon = "<span class='dashicons dashicons-chart-bar yasr-dashicons-visitor-stats'
273
data-postid='$post_id' id='yasr-total-average-dashicon-$post_id'></span>";
274
275
- if (is_array(YASR_PLUGIN_IMPORTED)) {
276
- if (array_key_exists('wppr', YASR_PLUGIN_IMPORTED)) {
277
- $plugin_import_date = YASR_PLUGIN_IMPORTED['wppr']['date'];
278
}
279
280
- if (array_key_exists('kksr', YASR_PLUGIN_IMPORTED)) {
281
- $plugin_import_date = YASR_PLUGIN_IMPORTED['kksr']['date'];
282
}
283
284
//remove hour from date
268
}
269
270
if (YASR_VISITORS_STATS === 'yes') {
271
+
272
+ global $yasr_plugin_imported;
273
+
274
//default
275
$span_dashicon = "<span class='dashicons dashicons-chart-bar yasr-dashicons-visitor-stats'
276
data-postid='$post_id' id='yasr-total-average-dashicon-$post_id'></span>";
277
278
+ if (is_array($yasr_plugin_imported)) {
279
+ if (array_key_exists('wppr', $yasr_plugin_imported)) {
280
+ $plugin_import_date = $yasr_plugin_imported['wppr']['date'];
281
}
282
283
+ if (array_key_exists('kksr', $yasr_plugin_imported)) {
284
+ $plugin_import_date = $yasr_plugin_imported['kksr']['date'];
285
}
286
287
//remove hour from date
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires at least: 4.3.0
5
Contributors: Dudo
6
Tested up to: 5.2.2
7
Requires PHP: 5.3
8
- Stable tag: 2.0.0
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
11
Boost the way people interact with your website, e-commerce or blog with an easy and intuitive WordPress rating system!
@@ -133,6 +133,9 @@ If doesn't, it's suggested to ask in a SEO oriented forum.
133
134
The full changelog can be found in the plugin's directory. Recent entries:
135
136
= 2.0.0 =
137
* NEW FEATURE: is now possible to import date from:
138
- Wp Post Ratings
5
Contributors: Dudo
6
Tested up to: 5.2.2
7
Requires PHP: 5.3
8
+ Stable tag: 2.0.1
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
11
Boost the way people interact with your website, e-commerce or blog with an easy and intuitive WordPress rating system!
133
134
The full changelog can be found in the plugin's directory. Recent entries:
135
136
+ = 2.0.1 =
137
+ * TWEAKED: changed code in yasr-shortcode-functions.php to support php version < 7
138
+
139
= 2.0.0 =
140
* NEW FEATURE: is now possible to import date from:
141
- Wp Post Ratings
yet-another-stars-rating.php CHANGED
@@ -4,7 +4,7 @@
4
* Plugin Name: Yet Another Stars Rating
5
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
6
* Description: Yasr - Yet Another Stars Rating is a powerful way to add SEO-friendly user-generated reviews and testimonials to your website posts, pages and CPT, without affecting its speed.
7
- * Version: 2.0.0
8
* Author: Dario Curvino
9
* Author URI: https://dariocurvino.it/
10
* Text Domain: yet-another-stars-rating
@@ -76,7 +76,7 @@ if ( !function_exists( 'yasr_fs' ) ) {
76
yasr_fs();
77
// Signal that SDK was initiated.
78
do_action( 'yasr_fs_loaded' );
79
- define( 'YASR_VERSION_NUM', '2.0.0' );
80
//Plugin relative path
81
define( "YASR_ABSOLUTE_PATH", dirname( __FILE__ ) );
82
//Plugin RELATIVE PATH without slashes (just the directory's name)
@@ -208,7 +208,7 @@ if ( !function_exists( 'yasr_fs' ) ) {
208
$yasr_version_installed = get_option( 'yasr-version' );
209
global $yasr_version_installed ;
210
$yasr_plugin_imported = get_option( 'yasr_plugin_imported' );
211
- define( 'YASR_PLUGIN_IMPORTED', $yasr_plugin_imported );
212
//Run this only on plugin activation (doesn't work on update)
213
register_activation_hook( __FILE__, 'yasr_on_activation' );
214
function yasr_on_activation()
@@ -232,7 +232,7 @@ if ( !function_exists( 'yasr_fs' ) ) {
232
global $yasr_stored_options ;
233
if ($yasr_version_installed && $yasr_version_installed < '1.7.3') {
234
$wpdb->query("ALTER TABLE " . YASR_MULTI_SET_FIELDS_TABLE .
235
- " CHANGE field_name field_name varchar(40)
236
COLLATE 'utf8_unicode_ci' NOT NULL
237
AFTER parent_set_id;
238
");
4
* Plugin Name: Yet Another Stars Rating
5
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
6
* Description: Yasr - Yet Another Stars Rating is a powerful way to add SEO-friendly user-generated reviews and testimonials to your website posts, pages and CPT, without affecting its speed.
7
+ * Version: 2.0.1
8
* Author: Dario Curvino
9
* Author URI: https://dariocurvino.it/
10
* Text Domain: yet-another-stars-rating
76
yasr_fs();
77
// Signal that SDK was initiated.
78
do_action( 'yasr_fs_loaded' );
79
+ define( 'YASR_VERSION_NUM', '2.0.1' );
80
//Plugin relative path
81
define( "YASR_ABSOLUTE_PATH", dirname( __FILE__ ) );
82
//Plugin RELATIVE PATH without slashes (just the directory's name)
208
$yasr_version_installed = get_option( 'yasr-version' );
209
global $yasr_version_installed ;
210
$yasr_plugin_imported = get_option( 'yasr_plugin_imported' );
211
+ global $yasr_plugin_imported ;
212
//Run this only on plugin activation (doesn't work on update)
213
register_activation_hook( __FILE__, 'yasr_on_activation' );
214
function yasr_on_activation()
232
global $yasr_stored_options ;
233
if ($yasr_version_installed && $yasr_version_installed < '1.7.3') {
234
$wpdb->query("ALTER TABLE " . YASR_MULTI_SET_FIELDS_TABLE .
235
+ " CHANGE field_name field_name varchar(40)
236
COLLATE 'utf8_unicode_ci' NOT NULL
237
AFTER parent_set_id;
238
");