Version Description
- TWEAKED: minor changes. Nothing to be excited about
Download this release
Release Info
Developer | Dudo |
Plugin | Yasr – Yet Another Stars Rating |
Version | 2.5.0 |
Comparing to | |
See all releases |
Code changes from version 2.4.9 to 2.5.0
- admin/yasr-admin-actions.php +1 -1
- admin/yasr-admin-functions.php +0 -23
- freemius/includes/class-freemius.php +37 -1
- freemius/includes/fs-plugin-info-dialog.php +1 -1
- includes/yasr-includes-functions.php +32 -0
- public/classes/YasrPublicFilters.php +2 -2
- public/yasr-public-actions.php +1 -23
- readme.txt +6 -2
- yet-another-stars-rating.php +2 -2
admin/yasr-admin-actions.php
CHANGED
@@ -184,7 +184,7 @@ function yasr_style_options_choose_stars_lite_callback($style_options) {
|
|
184 |
</script>
|
185 |
|
186 |
<?php
|
187 |
-
submit_button(__('Save Settings'));
|
188 |
}
|
189 |
|
190 |
?>
|
184 |
</script>
|
185 |
|
186 |
<?php
|
187 |
+
submit_button(__('Save Settings', 'yet-another-stars-rating'));
|
188 |
}
|
189 |
|
190 |
?>
|
admin/yasr-admin-functions.php
CHANGED
@@ -80,12 +80,6 @@ function yasr_add_admin_scripts($hook) {
|
|
80 |
|
81 |
do_action('yasr_add_admin_scripts_begin');
|
82 |
|
83 |
-
$rater_file_to_include = 'rater-js.js';
|
84 |
-
|
85 |
-
if (is_rtl()) {
|
86 |
-
$rater_file_to_include = 'rater-js-rtl.js';
|
87 |
-
}
|
88 |
-
|
89 |
wp_enqueue_style(
|
90 |
'yasrcss',
|
91 |
YASR_CSS_DIR_ADMIN . 'yasr-admin.css',
|
@@ -94,14 +88,6 @@ function yasr_add_admin_scripts($hook) {
|
|
94 |
'all'
|
95 |
);
|
96 |
|
97 |
-
wp_enqueue_script(
|
98 |
-
'tippy',
|
99 |
-
YASR_JS_DIR_INCLUDES . 'tippy.all.min.js',
|
100 |
-
'',
|
101 |
-
'3.6.0',
|
102 |
-
true
|
103 |
-
);
|
104 |
-
|
105 |
wp_enqueue_script(
|
106 |
'yasradmin',
|
107 |
YASR_JS_DIR_ADMIN . 'yasr-admin.js',
|
@@ -110,15 +96,6 @@ function yasr_add_admin_scripts($hook) {
|
|
110 |
true
|
111 |
);
|
112 |
|
113 |
-
wp_enqueue_script(
|
114 |
-
'rater',
|
115 |
-
YASR_JS_DIR_INCLUDES .
|
116 |
-
$rater_file_to_include,
|
117 |
-
'',
|
118 |
-
YASR_VERSION_NUM,
|
119 |
-
true
|
120 |
-
);
|
121 |
-
|
122 |
do_action('yasr_add_admin_scripts_end', $hook);
|
123 |
|
124 |
$yasr_loader = YASR_IMG_DIR . 'loader.gif';
|
80 |
|
81 |
do_action('yasr_add_admin_scripts_begin');
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
wp_enqueue_style(
|
84 |
'yasrcss',
|
85 |
YASR_CSS_DIR_ADMIN . 'yasr-admin.css',
|
88 |
'all'
|
89 |
);
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
wp_enqueue_script(
|
92 |
'yasradmin',
|
93 |
YASR_JS_DIR_ADMIN . 'yasr-admin.js',
|
96 |
true
|
97 |
);
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
do_action('yasr_add_admin_scripts_end', $hook);
|
100 |
|
101 |
$yasr_loader = YASR_IMG_DIR . 'loader.gif';
|
freemius/includes/class-freemius.php
CHANGED
@@ -1645,7 +1645,12 @@
|
|
1645 |
add_action( 'deactivate_blog', array( $this, '_after_site_deactivated_callback' ) );
|
1646 |
add_action( 'archive_blog', array( $this, '_after_site_deactivated_callback' ) );
|
1647 |
add_action( 'make_spam_blog', array( $this, '_after_site_deactivated_callback' ) );
|
1648 |
-
|
|
|
|
|
|
|
|
|
|
|
1649 |
|
1650 |
add_action( 'activate_blog', array( $this, '_after_site_reactivated_callback' ) );
|
1651 |
add_action( 'unarchive_blog', array( $this, '_after_site_reactivated_callback' ) );
|
@@ -15691,6 +15696,37 @@
|
|
15691 |
$this->switch_to_blog( $current_blog_id );
|
15692 |
}
|
15693 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15694 |
/**
|
15695 |
* Executed after site re-activation.
|
15696 |
*
|
1645 |
add_action( 'deactivate_blog', array( $this, '_after_site_deactivated_callback' ) );
|
1646 |
add_action( 'archive_blog', array( $this, '_after_site_deactivated_callback' ) );
|
1647 |
add_action( 'make_spam_blog', array( $this, '_after_site_deactivated_callback' ) );
|
1648 |
+
//call the deprecated version if wp_version < 5.1
|
1649 |
+
if ( version_compare($GLOBALS['wp_version'],'5.1') === -1) {
|
1650 |
+
add_action( 'deleted_blog', array( $this, '_after_site_deleted_callback' ), 10, 2);
|
1651 |
+
} else {
|
1652 |
+
add_action( 'wp_delete_site', array( $this, '_after_wpsite_deleted_callback' ), 10, 2 );
|
1653 |
+
}
|
1654 |
|
1655 |
add_action( 'activate_blog', array( $this, '_after_site_reactivated_callback' ) );
|
1656 |
add_action( 'unarchive_blog', array( $this, '_after_site_reactivated_callback' ) );
|
15696 |
$this->switch_to_blog( $current_blog_id );
|
15697 |
}
|
15698 |
|
15699 |
+
/**
|
15700 |
+
* Executed after site deletion, called from wp_delete_site
|
15701 |
+
*
|
15702 |
+
* @author Dario Curvino (@dudo)
|
15703 |
+
* @author Vova Feldman (@svovaf)
|
15704 |
+
* @since 2.0.0
|
15705 |
+
*
|
15706 |
+
* @param WP_Site $old_site
|
15707 |
+
*/
|
15708 |
+
public function _after_wpsite_deleted_callback( WP_Site $old_site ) {
|
15709 |
+
$this->_logger->entrance();
|
15710 |
+
|
15711 |
+
$install = $this->get_install_by_blog_id( $old_site->blog_id );
|
15712 |
+
|
15713 |
+
if ( ! is_object( $install ) ) {
|
15714 |
+
// Site not connected.
|
15715 |
+
return;
|
15716 |
+
}
|
15717 |
+
|
15718 |
+
$this->update_multisite_data_after_site_deactivation( $old_site->blog_id );
|
15719 |
+
|
15720 |
+
$current_blog_id = get_current_blog_id();
|
15721 |
+
|
15722 |
+
$this->switch_to_blog( $old_site->blog_id );
|
15723 |
+
|
15724 |
+
// Delete install if dropping site DB.
|
15725 |
+
$this->delete_account_event();
|
15726 |
+
|
15727 |
+
$this->switch_to_blog( $current_blog_id );
|
15728 |
+
}
|
15729 |
+
|
15730 |
/**
|
15731 |
* Executed after site re-activation.
|
15732 |
*
|
freemius/includes/fs-plugin-info-dialog.php
CHANGED
@@ -1203,7 +1203,7 @@
|
|
1203 |
|
1204 |
$(document).ready(function () {
|
1205 |
var $plan = $('.plugin-information-pricing .fs-plan[data-plan-id=<?php echo $plan->id ?>]');
|
1206 |
-
$plan.find('input[type=radio]').
|
1207 |
_updateCtaUrl(
|
1208 |
$plan.attr('data-plan-id'),
|
1209 |
$(this).val(),
|
1203 |
|
1204 |
$(document).ready(function () {
|
1205 |
var $plan = $('.plugin-information-pricing .fs-plan[data-plan-id=<?php echo $plan->id ?>]');
|
1206 |
+
$plan.find('input[type=radio]').on('click', function () {
|
1207 |
_updateCtaUrl(
|
1208 |
$plan.attr('data-plan-id'),
|
1209 |
$(this).val(),
|
includes/yasr-includes-functions.php
CHANGED
@@ -22,6 +22,38 @@ if (!defined('ABSPATH')) {
|
|
22 |
exit('You\'re not allowed to see this page');
|
23 |
} // Exit if accessed directly
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
/*** Css rules for stars set, from version 1.2.7
|
26 |
* Here I use add_action instead of directly use wp_add_inline_style so I can
|
27 |
* use remove_action if needed (e.g. Yasr Stylish)
|
22 |
exit('You\'re not allowed to see this page');
|
23 |
} // Exit if accessed directly
|
24 |
|
25 |
+
/***** Adding javascript and css needed on both admin and public *****/
|
26 |
+
add_action('wp_enqueue_scripts', 'yasr_add_scripts_includes');
|
27 |
+
add_action('admin_enqueue_scripts', 'yasr_add_scripts_includes');
|
28 |
+
|
29 |
+
function yasr_add_scripts_includes() {
|
30 |
+
$rater_file_to_include = 'rater-js.js';
|
31 |
+
|
32 |
+
if (is_rtl()) {
|
33 |
+
$rater_file_to_include = 'rater-js-rtl.js';
|
34 |
+
}
|
35 |
+
|
36 |
+
wp_enqueue_script('jquery');
|
37 |
+
|
38 |
+
wp_enqueue_script(
|
39 |
+
'tippy',
|
40 |
+
YASR_JS_DIR_INCLUDES . 'tippy.all.min.js',
|
41 |
+
'',
|
42 |
+
'3.6.0',
|
43 |
+
true
|
44 |
+
);
|
45 |
+
|
46 |
+
wp_enqueue_script(
|
47 |
+
'rater',
|
48 |
+
YASR_JS_DIR_INCLUDES .
|
49 |
+
$rater_file_to_include,
|
50 |
+
'',
|
51 |
+
YASR_VERSION_NUM,
|
52 |
+
true
|
53 |
+
);
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
/*** Css rules for stars set, from version 1.2.7
|
58 |
* Here I use add_action instead of directly use wp_add_inline_style so I can
|
59 |
* use remove_action if needed (e.g. Yasr Stylish)
|
public/classes/YasrPublicFilters.php
CHANGED
@@ -374,7 +374,7 @@ class YasrPublicFilters {
|
|
374 |
if(in_the_loop()) {
|
375 |
$post_id = get_the_ID();
|
376 |
|
377 |
-
if(
|
378 |
return $title;
|
379 |
}
|
380 |
|
@@ -411,7 +411,7 @@ class YasrPublicFilters {
|
|
411 |
|
412 |
//Use this hook to customize widget overall
|
413 |
//if doesn't exists a filter for yasr_title_vv_widget, put $vv_widget into $content_after_title
|
414 |
-
$content_after_title = apply_filters('yasr_title_vv_widget', $vv_widget);
|
415 |
}
|
416 |
|
417 |
if (YASR_STARS_TITLE_WHAT === 'overall_rating') {
|
374 |
if(in_the_loop()) {
|
375 |
$post_id = get_the_ID();
|
376 |
|
377 |
+
if(YASR_STARS_TITLE_EXCLUDE_PAGES === 'yes' && get_post_type($post_id) === 'page') {
|
378 |
return $title;
|
379 |
}
|
380 |
|
411 |
|
412 |
//Use this hook to customize widget overall
|
413 |
//if doesn't exists a filter for yasr_title_vv_widget, put $vv_widget into $content_after_title
|
414 |
+
$content_after_title = apply_filters('yasr_title_vv_widget', $vv_widget, $stored_votes);
|
415 |
}
|
416 |
|
417 |
if (YASR_STARS_TITLE_WHAT === 'overall_rating') {
|
public/yasr-public-actions.php
CHANGED
@@ -24,6 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
24 |
/***** Adding javascript and css *****/
|
25 |
add_action('wp_enqueue_scripts', 'yasr_add_scripts');
|
26 |
function yasr_add_scripts() {
|
|
|
27 |
wp_enqueue_style(
|
28 |
'yasrcss',
|
29 |
YASR_CSS_DIR_INCLUDES . 'yasr.css',
|
@@ -60,29 +61,6 @@ function yasr_add_scripts() {
|
|
60 |
);
|
61 |
}
|
62 |
|
63 |
-
$rater_file_to_include = 'rater-js.js';
|
64 |
-
|
65 |
-
if (is_rtl()) {
|
66 |
-
$rater_file_to_include = 'rater-js-rtl.js';
|
67 |
-
}
|
68 |
-
|
69 |
-
wp_enqueue_script(
|
70 |
-
'rater',
|
71 |
-
YASR_JS_DIR_INCLUDES .
|
72 |
-
$rater_file_to_include,
|
73 |
-
'',
|
74 |
-
YASR_VERSION_NUM,
|
75 |
-
true
|
76 |
-
);
|
77 |
-
|
78 |
-
wp_enqueue_script(
|
79 |
-
'tippy',
|
80 |
-
YASR_JS_DIR_INCLUDES . 'tippy.all.min.js',
|
81 |
-
'',
|
82 |
-
'3.6.0',
|
83 |
-
true
|
84 |
-
);
|
85 |
-
|
86 |
wp_enqueue_script(
|
87 |
'yasrfront',
|
88 |
YASR_JS_DIR_INCLUDES . 'yasr-front.js',
|
24 |
/***** Adding javascript and css *****/
|
25 |
add_action('wp_enqueue_scripts', 'yasr_add_scripts');
|
26 |
function yasr_add_scripts() {
|
27 |
+
|
28 |
wp_enqueue_style(
|
29 |
'yasrcss',
|
30 |
YASR_CSS_DIR_INCLUDES . 'yasr.css',
|
61 |
);
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
wp_enqueue_script(
|
65 |
'yasrfront',
|
66 |
YASR_JS_DIR_INCLUDES . 'yasr-front.js',
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Requires at least: 4.9.0
|
|
5 |
Contributors: Dudo
|
6 |
Tested up to: 5.5.2
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 2.
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
@@ -181,6 +181,9 @@ If doesn't, you should work on your seo reputation.
|
|
181 |
|
182 |
The full changelog can be found in the plugin's directory. Recent entries:
|
183 |
|
|
|
|
|
|
|
184 |
= 2.4.9 =
|
185 |
* FIXED: Removed unnecessary closing div for yasr_visitor_votes shortcode
|
186 |
|
@@ -216,7 +219,8 @@ The full changelog can be found in the plugin's directory. Recent entries:
|
|
216 |
* FIXED: %overall_rating% pattern didn't work for custom text
|
217 |
* FIXED: fixed link in yasr_most_or_highest_rated_posts
|
218 |
* FIXED: warning in yasr-settings-functions-multiset.php
|
219 |
-
TWEAKED: minor changes
|
|
|
220 |
|
221 |
= 2.4.4 =
|
222 |
* TWEAKED: added yasr_auto_insert_exclude_cpt hook
|
5 |
Contributors: Dudo
|
6 |
Tested up to: 5.5.2
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 2.5.0
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
181 |
|
182 |
The full changelog can be found in the plugin's directory. Recent entries:
|
183 |
|
184 |
+
= 2.5.0 =
|
185 |
+
* TWEAKED: minor changes. Nothing to be excited about
|
186 |
+
|
187 |
= 2.4.9 =
|
188 |
* FIXED: Removed unnecessary closing div for yasr_visitor_votes shortcode
|
189 |
|
219 |
* FIXED: %overall_rating% pattern didn't work for custom text
|
220 |
* FIXED: fixed link in yasr_most_or_highest_rated_posts
|
221 |
* FIXED: warning in yasr-settings-functions-multiset.php
|
222 |
+
* TWEAKED: minor changes
|
223 |
+
|
224 |
|
225 |
= 2.4.4 =
|
226 |
* TWEAKED: added yasr_auto_insert_exclude_cpt hook
|
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: Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
7 |
-
* Version: 2.
|
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.
|
80 |
//Plugin absolute path
|
81 |
//e.g. /var/www/html/plugin_development/wp-content/plugins/yet-another-stars-rating
|
82 |
define( 'YASR_ABSOLUTE_PATH', __DIR__ );
|
4 |
* Plugin Name: Yet Another Stars Rating
|
5 |
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
|
6 |
* Description: Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
7 |
+
* Version: 2.5.0
|
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.5.0' );
|
80 |
//Plugin absolute path
|
81 |
//e.g. /var/www/html/plugin_development/wp-content/plugins/yet-another-stars-rating
|
82 |
define( 'YASR_ABSOLUTE_PATH', __DIR__ );
|