Yasr – Yet Another Stars Rating - Version 1.3.8

Version Description

  • FIXED: Shortcode creatore finally works even in text mode
  • TWEAKED: Added a link to the settings in the plugin list under the plugin name
  • TWEAKED: minor changes
Download this release

Release Info

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

Code changes from version 1.3.7 to 1.3.8

css/yasr-admin.css CHANGED
@@ -540,6 +540,62 @@ div.bigstars .rateit-selected
540
text-align: center;
541
padding-left: 15px;
542
}
543
/**** End Yasr Aspect & Styles tab ***/
544
545
540
text-align: center;
541
padding-left: 15px;
542
}
543
+
544
+
545
+ #yasr-settings-stylish-image {
546
+
547
+ max-width:100%;
548
+ height:auto;
549
+
550
+ }
551
+
552
+ #yasr-settings-stylish-image:hover {
553
+
554
+ opacity: 0.4;
555
+
556
+ }
557
+
558
+ @media (max-width: 575px) {
559
+
560
+ #yasr-settings-stylish-text {
561
+
562
+ width: 50%;
563
+ margin: auto;
564
+ position: relative;
565
+ top: -80px;
566
+ background-color: #ffffff;
567
+ border: 1px solid black;
568
+ opacity: 0.8;
569
+ font-size: 2vh;
570
+ padding: 15px;
571
+ visibility: hidden;
572
+
573
+ }
574
+
575
+ }
576
+
577
+
578
+ @media (min-width: 576px) {
579
+
580
+ #yasr-settings-stylish-text {
581
+
582
+ width: 50%;
583
+ margin: auto;
584
+ position: relative;
585
+ top: -150px;
586
+ background-color: #ffffff;
587
+ border: 2px solid black;
588
+ opacity: 0.8;
589
+ font-size: 2vh;
590
+ padding: 15px;
591
+ visibility: hidden;
592
+
593
+ }
594
+
595
+ }
596
+
597
+
598
+
599
/**** End Yasr Aspect & Styles tab ***/
600
601
img/yasr-stylish-stars.png ADDED
Binary file
js/yasr-admin.js CHANGED
@@ -642,27 +642,70 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
642
643
jQuery('#yasr-overall-insert-small').on("click", function(){
644
var shortcode = '[yasr_overall_rating size="small"]';
645
- // inserts the shortcode into the active editor
646
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
647
- // close
648
tb_remove();
649
- //jQuery('#yasr-tinypopup-form').dialog('close');
650
});
651
652
jQuery('#yasr-overall-insert-medium').on("click", function(){
653
var shortcode = '[yasr_overall_rating size="medium"]';
654
- // inserts the shortcode into the active editor
655
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
656
- // close
657
- tb_remove();
658
});
659
660
jQuery('#yasr-overall-insert-large').on("click", function(){
661
var shortcode = '[yasr_overall_rating size="large"]';
662
- // inserts the shortcode into the active editor
663
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
664
- // close
665
- tb_remove();
666
});
667
668
//Add shortcode for visitors rating
@@ -672,26 +715,70 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
672
673
jQuery('#yasr-visitor-insert-small').on("click", function(){
674
var shortcode = '[yasr_visitor_votes size="small"]';
675
// inserts the shortcode into the active editor
676
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
677
- // closes Thickbox
678
- tb_remove();
679
});
680
681
jQuery('#yasr-visitor-insert-medium').on("click", function(){
682
var shortcode = '[yasr_visitor_votes size="medium"]';
683
- // inserts the shortcode into the active editor
684
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
685
- // closes Thickbox
686
- tb_remove();
687
});
688
689
jQuery('#yasr-visitor-insert-large').on("click", function(){
690
var shortcode = '[yasr_visitor_votes size="large"]';
691
- // inserts the shortcode into the active editor
692
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
693
- // closes Thickbox
694
- tb_remove();
695
});
696
697
if (nMultiSet > 1) {
@@ -724,10 +811,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
724
725
726
shortcode += ']';
727
// inserts the shortcode into the active editor
728
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
729
- // closes Thickbox
730
- tb_remove();
731
});
732
733
} //End if
@@ -762,10 +864,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
762
}
763
764
shortcode += ']';
765
// inserts the shortcode into the active editor
766
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
767
- // closes Thickbox
768
- tb_remove();
769
});
770
771
} //End elseif
@@ -773,37 +890,97 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
773
// Add shortcode for top 10 by overall ratings
774
jQuery('#yasr-top-10-overall-rating').on("click", function(){
775
var shortcode = '[yasr_top_ten_highest_rated]';
776
- // inserts the shortcode into the active editor
777
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
778
- // closes Thickbox
779
- tb_remove();
780
});
781
782
// Add shortcode for 10 highest most rated
783
jQuery('#yasr-10-highest-most-rated').on("click", function(){
784
var shortcode = '[yasr_most_or_highest_rated_posts]';
785
- // inserts the shortcode into the active editor
786
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
787
- // closes Thickbox
788
- tb_remove();
789
});
790
791
// Add shortcode for top 5 active reviewer
792
jQuery('#yasr-5-active-reviewers').on("click", function(){
793
var shortcode = '[yasr_top_5_reviewers]';
794
- // inserts the shortcode into the active editor
795
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
796
- // closes Thickbox
797
- tb_remove();
798
});
799
800
// Add shortcode for top 10 active users
801
jQuery('#yasr-top-10-active-users').on("click", function(){
802
var shortcode = '[yasr_top_ten_active_users]';
803
- // inserts the shortcode into the active editor
804
- tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
805
- // closes Thickbox
806
- tb_remove();
807
});
808
809
} //End function
642
643
jQuery('#yasr-overall-insert-small').on("click", function(){
644
var shortcode = '[yasr_overall_rating size="small"]';
645
+
646
+ if(tinyMCE.activeEditor==null) {
647
+
648
+ //this is for tinymce used in text mode
649
+ jQuery("#content").append(shortcode);
650
+
651
+ }
652
+
653
+ else {
654
+
655
+ // inserts the shortcode into the active editor
656
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
657
+
658
+ }
659
+
660
+ // close
661
tb_remove();
662
+ //jQuery('#yasr-tinypopup-form').dialog('close');
663
+
664
});
665
666
jQuery('#yasr-overall-insert-medium').on("click", function(){
667
var shortcode = '[yasr_overall_rating size="medium"]';
668
+
669
+ // inserts the shortcode into the active editor
670
+ if(tinyMCE.activeEditor==null) {
671
+
672
+ //this is for tinymce used in text mode
673
+ jQuery("#content").append(shortcode);
674
+
675
+ }
676
+
677
+ else {
678
+
679
+ // inserts the shortcode into the active editor
680
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
681
+
682
+ }
683
+
684
+ // close
685
+ tb_remove();
686
+ //jQuery('#yasr-tinypopup-form').dialog('close');
687
});
688
689
jQuery('#yasr-overall-insert-large').on("click", function(){
690
var shortcode = '[yasr_overall_rating size="large"]';
691
+
692
+ if(tinyMCE.activeEditor==null) {
693
+
694
+ //this is for tinymce used in text mode
695
+ jQuery("#content").append(shortcode);
696
+
697
+ }
698
+
699
+ else {
700
+
701
+ // inserts the shortcode into the active editor
702
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
703
+
704
+ }
705
+
706
+ // close
707
+ tb_remove();
708
+ //jQuery('#yasr-tinypopup-form').dialog('close');
709
});
710
711
//Add shortcode for visitors rating
715
716
jQuery('#yasr-visitor-insert-small').on("click", function(){
717
var shortcode = '[yasr_visitor_votes size="small"]';
718
+
719
// inserts the shortcode into the active editor
720
+ if(tinyMCE.activeEditor==null) {
721
+
722
+ //this is for tinymce used in text mode
723
+ jQuery("#content").append(shortcode);
724
+
725
+ }
726
+
727
+ else {
728
+
729
+ // inserts the shortcode into the active editor
730
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
731
+
732
+ }
733
+
734
+ // close
735
+ tb_remove();
736
+ //jQuery('#yasr-tinypopup-form').dialog('close');
737
});
738
739
jQuery('#yasr-visitor-insert-medium').on("click", function(){
740
var shortcode = '[yasr_visitor_votes size="medium"]';
741
+
742
+ if(tinyMCE.activeEditor==null) {
743
+
744
+ //this is for tinymce used in text mode
745
+ jQuery("#content").append(shortcode);
746
+
747
+ }
748
+
749
+ else {
750
+
751
+ // inserts the shortcode into the active editor
752
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
753
+
754
+ }
755
+
756
+ // close
757
+ tb_remove();
758
+ //jQuery('#yasr-tinypopup-form').dialog('close');
759
});
760
761
jQuery('#yasr-visitor-insert-large').on("click", function(){
762
var shortcode = '[yasr_visitor_votes size="large"]';
763
+
764
+ // inserts the shortcode into the active editor
765
+ if(tinyMCE.activeEditor==null) {
766
+
767
+ //this is for tinymce used in text mode
768
+ jQuery("#content").append(shortcode);
769
+
770
+ }
771
+
772
+ else {
773
+
774
+ // inserts the shortcode into the active editor
775
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
776
+
777
+ }
778
+
779
+ // close
780
+ tb_remove();
781
+ //jQuery('#yasr-tinypopup-form').dialog('close');
782
});
783
784
if (nMultiSet > 1) {
811
812
813
shortcode += ']';
814
+
815
// inserts the shortcode into the active editor
816
+ if(tinyMCE.activeEditor==null) {
817
+
818
+ //this is for tinymce used in text mode
819
+ jQuery("#content").append(shortcode);
820
+
821
+ }
822
+
823
+ else {
824
+
825
+ // inserts the shortcode into the active editor
826
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
827
+
828
+ }
829
+
830
+ // close
831
+ tb_remove();
832
+ //jQuery('#yasr-tinypopup-form').dialog('close');
833
});
834
835
} //End if
864
}
865
866
shortcode += ']';
867
+
868
// inserts the shortcode into the active editor
869
+ if(tinyMCE.activeEditor==null) {
870
+
871
+ //this is for tinymce used in text mode
872
+ jQuery("#content").append(shortcode);
873
+
874
+ }
875
+
876
+ else {
877
+
878
+ // inserts the shortcode into the active editor
879
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
880
+
881
+ }
882
+
883
+ // close
884
+ tb_remove();
885
+ //jQuery('#yasr-tinypopup-form').dialog('close');
886
});
887
888
} //End elseif
890
// Add shortcode for top 10 by overall ratings
891
jQuery('#yasr-top-10-overall-rating').on("click", function(){
892
var shortcode = '[yasr_top_ten_highest_rated]';
893
+
894
+ // inserts the shortcode into the active editor
895
+ if(tinyMCE.activeEditor==null) {
896
+
897
+ //this is for tinymce used in text mode
898
+ jQuery("#content").append(shortcode);
899
+
900
+ }
901
+
902
+ else {
903
+
904
+ // inserts the shortcode into the active editor
905
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
906
+
907
+ }
908
+
909
+ // close
910
+ tb_remove();
911
+ //jQuery('#yasr-tinypopup-form').dialog('close');
912
});
913
914
// Add shortcode for 10 highest most rated
915
jQuery('#yasr-10-highest-most-rated').on("click", function(){
916
var shortcode = '[yasr_most_or_highest_rated_posts]';
917
+
918
+ // inserts the shortcode into the active editor
919
+ if(tinyMCE.activeEditor==null) {
920
+
921
+ //this is for tinymce used in text mode
922
+ jQuery("#content").append(shortcode);
923
+
924
+ }
925
+
926
+ else {
927
+
928
+ // inserts the shortcode into the active editor
929
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
930
+
931
+ }
932
+
933
+ // close
934
+ tb_remove();
935
+ //jQuery('#yasr-tinypopup-form').dialog('close');
936
});
937
938
// Add shortcode for top 5 active reviewer
939
jQuery('#yasr-5-active-reviewers').on("click", function(){
940
var shortcode = '[yasr_top_5_reviewers]';
941
+
942
+ // inserts the shortcode into the active editor
943
+ if(tinyMCE.activeEditor==null) {
944
+
945
+ //this is for tinymce used in text mode
946
+ jQuery("#content").append(shortcode);
947
+
948
+ }
949
+
950
+ else {
951
+
952
+ // inserts the shortcode into the active editor
953
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
954
+
955
+ }
956
+
957
+ // close
958
+ tb_remove();
959
+ //jQuery('#yasr-tinypopup-form').dialog('close');
960
});
961
962
// Add shortcode for top 10 active users
963
jQuery('#yasr-top-10-active-users').on("click", function(){
964
var shortcode = '[yasr_top_ten_active_users]';
965
+
966
+ // inserts the shortcode into the active editor
967
+ if(tinyMCE.activeEditor==null) {
968
+
969
+ //this is for tinymce used in text mode
970
+ jQuery("#content").append(shortcode);
971
+
972
+ }
973
+
974
+ else {
975
+
976
+ // inserts the shortcode into the active editor
977
+ tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
978
+
979
+ }
980
+
981
+ // close
982
+ tb_remove();
983
+ //jQuery('#yasr-tinypopup-form').dialog('close');
984
});
985
986
} //End function
lib/yasr-admin-actions.php CHANGED
@@ -2,36 +2,37 @@
2
3
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
4
5
- //css
6
- add_action('yasr_add_front_script_css', 'yasr_pro_front_script_css' );
7
8
- function yasr_pro_front_script_css () {
9
10
- //if visitors stats are enabled
11
- if (YASR_VISITORS_STATS === 'yes') {
12
- wp_enqueue_style( 'jquery-ui','//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css', FALSE, NULL, 'all' );
13
- wp_enqueue_style( 'dashicons' ); //dashicons
14
- }
15
16
- }
17
18
- //js
19
- add_action('yasr_add_front_script_js', 'yasr_pro_front_script_js' );
20
21
- function yasr_pro_front_script_js () {
22
23
- //if visitors stats are enabled
24
- if (YASR_VISITORS_STATS === 'yes') {
25
- wp_enqueue_script( 'jquery-ui-progressbar' ); //script
26
- wp_enqueue_script( 'jquery-ui-tooltip' ); //script
27
- }
28
29
- }
30
31
32
- //Delete caches for wp_super_Cache and wp_rocket
33
- add_action('yasr_action_on_visitor_vote', 'yasr_delete_cache' );
34
- add_action('yasr_action_on_update_visitor_vote', 'yasr_delete_cache');
35
36
37
function yasr_delete_cache($post_id) {
@@ -43,7 +44,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
43
}
44
45
46
- add_filter('yasr_filter_style_options', 'yasr_filter_style_options_callback');
47
48
function yasr_filter_style_options_callback ($style_options) {
49
@@ -58,9 +60,9 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
58
}
59
60
61
- //Add stars set for yasr stle settings page
62
- //from version 1.2.7
63
- add_action('yasr_style_options_add_settings_field', 'yasr_style_options_add_settings_field_callback');
64
65
function yasr_style_options_add_settings_field_callback($style_options) {
66
@@ -96,22 +98,50 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
96
97
</div>
98
99
- <div class='yasr_choose_stars' style="text-align:left">
100
101
- <?php
102
- $text = __('Looking for more?', 'yet-another-stars-rating');
103
- $text .= '<br />';
104
- $text .= sprintf(__('Take a look to the %s', 'yet-another-stars-rating'), '<a href="https://yetanotherstarsrating.com/extensions/yasr-stylish/">Yasr Stylish Extension!</a>');
105
106
- echo $text;
107
108
- ?>
109
110
</div>
111
112
<?php
113
114
}
115
116
-
117
?>
2
3
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
4
5
6
+ //css
7
+ add_action('yasr_add_front_script_css', 'yasr_pro_front_script_css' );
8
9
+ function yasr_pro_front_script_css () {
10
11
+ //if visitors stats are enabled
12
+ if (YASR_VISITORS_STATS === 'yes') {
13
+ wp_enqueue_style( 'jquery-ui','//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css', FALSE, NULL, 'all' );
14
+ wp_enqueue_style( 'dashicons' ); //dashicons
15
+ }
16
+
17
+ }
18
19
+ //js
20
+ add_action('yasr_add_front_script_js', 'yasr_pro_front_script_js' );
21
22
+ function yasr_pro_front_script_js () {
23
24
+ //if visitors stats are enabled
25
+ if (YASR_VISITORS_STATS === 'yes') {
26
+ wp_enqueue_script( 'jquery-ui-progressbar' ); //script
27
+ wp_enqueue_script( 'jquery-ui-tooltip' ); //script
28
+ }
29
30
+ }
31
32
33
+ //Delete caches for wp_super_Cache and wp_rocket
34
+ add_action('yasr_action_on_visitor_vote', 'yasr_delete_cache' );
35
+ add_action('yasr_action_on_update_visitor_vote', 'yasr_delete_cache');
36
37
38
function yasr_delete_cache($post_id) {
44
}
45
46
47
+ //
48
+ add_filter('yasr_filter_style_options', 'yasr_filter_style_options_callback');
49
50
function yasr_filter_style_options_callback ($style_options) {
51
60
}
61
62
63
+ //Add stars set for yasr stle settings page
64
+ //from version 1.2.7
65
+ add_action('yasr_style_options_add_settings_field', 'yasr_style_options_add_settings_field_callback');
66
67
function yasr_style_options_add_settings_field_callback($style_options) {
68
98
99
</div>
100
101
102
103
+ <div id="yasr-settings-stylish-stars">
104
+
105
+
106
+ <div id="yasr-settings-stylish-image-container">
107
+
108
+ <?php
109
+
110
+ echo "<img id=\"yasr-settings-stylish-image\" src=" . YASR_IMG_DIR . "yasr-stylish-stars.png>";
111
+
112
+ ?>
113
114
+ </div>
115
116
</div>
117
118
+ <div id='yasr-settings-stylish-text'>
119
+
120
+ <?php
121
+
122
+ $text = __('Looking for more?', 'yet-another-stars-rating');
123
+ $text .= '<br />';
124
+ $text .= sprintf(__('Take a look to the %s', 'yet-another-stars-rating'), '<a href="https://yetanotherstarsrating.com/extensions/yasr-stylish/">Yasr Stylish Extension!</a>');
125
+
126
+ echo $text;
127
+
128
+ ?>
129
+
130
+ </div>
131
+
132
+
133
+ <script type="text/javascript">
134
+
135
+ jQuery('#yasr-settings-stylish-stars').mouseover(function() {
136
+ jQuery('#yasr-settings-stylish-text').css("visibility","visible");
137
+ jQuery('#yasr-settings-stylish-image').css("opacity", 0.4);
138
+ });
139
+
140
+ </script>
141
+
142
+
143
<?php
144
145
}
146
147
?>
lib/yasr-ajax-functions.php CHANGED
@@ -596,6 +596,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
596
597
yasrShortcodeCreator(nMultiSet);
598
599
});
600
601
</script>
@@ -1200,7 +1201,6 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
1200
1201
//try to update first, if fails the do the insert
1202
$result_update_log = $wpdb->update (
1203
-
1204
YASR_LOG_TABLE,
1205
array (
1206
'post_id' => $post_id,
596
597
yasrShortcodeCreator(nMultiSet);
598
599
+
600
});
601
602
</script>
1201
1202
//try to update first, if fails the do the insert
1203
$result_update_log = $wpdb->update (
1204
YASR_LOG_TABLE,
1205
array (
1206
'post_id' => $post_id,
lib/yasr-settings-functions.php CHANGED
@@ -1545,6 +1545,7 @@ add_action( 'admin_init', 'yasr_style_options_init' ); //This is for auto insert
1545
<textarea rows=\"20\" cols=\"50\" name=\"yasr_style_options[textarea]\" id=\"yasr_style_options_textarea\">$style_options[textarea]</textarea>
1546
");
1547
1548
}
1549
1550
//sanitize
1545
<textarea rows=\"20\" cols=\"50\" name=\"yasr_style_options[textarea]\" id=\"yasr_style_options_textarea\">$style_options[textarea]</textarea>
1546
");
1547
1548
+
1549
}
1550
1551
//sanitize
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post r
4
Requires at least: 4.3.0
5
Contributors: Dudo
6
Tested up to: 4.6
7
- Stable tag: 1.3.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
@@ -113,6 +113,11 @@ Of course not: you can easily add it on the visual editor just by clicking the "
113
114
The full changelog can be found in the plugin's directory. Recent entries:
115
116
= 1.3.7 =
117
* FIXED: Rankings yasr_top_ten_highest_rated, yasr_most_or_highest_rated_posts and yasr_top_5_reviewers has been fixed (broken in version 1.3.6)
118
* FIXED: js errors on yasr-front.js, thanks to jg88
4
Requires at least: 4.3.0
5
Contributors: Dudo
6
Tested up to: 4.6
7
+ Stable tag: 1.3.8
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
113
114
The full changelog can be found in the plugin's directory. Recent entries:
115
116
+ = 1.3.8 =
117
+ * FIXED: Shortcode creatore finally works even in text mode
118
+ * TWEAKED: Added a link to the settings in the plugin list under the plugin name
119
+ * TWEAKED: minor changes
120
+
121
= 1.3.7 =
122
* FIXED: Rankings yasr_top_ten_highest_rated, yasr_most_or_highest_rated_posts and yasr_top_5_reviewers has been fixed (broken in version 1.3.6)
123
* FIXED: js errors on yasr-front.js, thanks to jg88
yasr-metabox-top-right.php CHANGED
@@ -238,7 +238,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
238
239
<?php
240
241
- do_action( 'yasr_add_content_bottom_topright_metabox', $post_id );
242
243
?>
244
238
239
<?php
240
241
+ do_action( 'yasr_add_content_bottom_topright_metabox', $post_id );
242
243
?>
244
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: Yet Another Stars Rating turn your WordPress into a complete review website.
6
- * Version: 1.3.7
7
* Author: Dario Curvino
8
* Author URI: https://yetanotherstarsrating.com/
9
* Text Domain: yet-another-stars-rating
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
31
32
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
33
34
- define('YASR_VERSION_NUM', '1.3.7');
35
36
//Plugin relative path
37
define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
@@ -53,6 +53,7 @@ define ("YASR_CSS_DIR", plugins_url() .'/'. YASR_RELATIVE_PATH . '/css/');
53
define ("YASR_IMG_DIR", plugins_url() .'/'. YASR_RELATIVE_PATH . '/img/');
54
55
56
/****** Getting options ******/
57
58
//Get general options
@@ -338,4 +339,35 @@ function yasr_update_version() {
338
}
339
340
341
?>
3
* Plugin Name: Yet Another Stars Rating
4
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
5
* Description: Yet Another Stars Rating turn your WordPress into a complete review website.
6
+ * Version: 1.3.8
7
* Author: Dario Curvino
8
* Author URI: https://yetanotherstarsrating.com/
9
* Text Domain: yet-another-stars-rating
31
32
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
33
34
+ define('YASR_VERSION_NUM', '1.3.8');
35
36
//Plugin relative path
37
define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
53
define ("YASR_IMG_DIR", plugins_url() .'/'. YASR_RELATIVE_PATH . '/img/');
54
55
56
+
57
/****** Getting options ******/
58
59
//Get general options
339
}
340
341
342
+ //this add a link under the plugin name, must be in the main plugin file
343
+ add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'yasr_add_links_below_plugin_name' );
344
+
345
+ function yasr_add_links_below_plugin_name ( $links ) {
346
+
347
+ $settings_link = '<a href="' . admin_url( 'options-general.php?page=yasr_settings_page' ) . '">General Settings</a>';
348
+
349
+ //array_unshit adds to the begin of array
350
+ array_unshift ($links, $settings_link);
351
+
352
+ return $links;
353
+
354
+ }
355
+
356
+ //this add a link under the plugin description
357
+ add_filter( 'plugin_row_meta', 'yasr_plugin_row_meta', 10, 2 );
358
+
359
+ function yasr_plugin_row_meta( $links, $file ) {
360
+
361
+ $plugin = plugin_basename(__FILE__);
362
+
363
+ // create link
364
+ if ( $file == $plugin ) {
365
+
366
+ $links[] = '<a href="https://yetanotherstarsrating.com/extensions/">Buy Yasr Extensions</a>';
367
+
368
+ }
369
+
370
+ return $links;
371
+ }
372
+
373
?>