Version Description
- This is a very important release. A lot of code has been cleaned up/rewritten. Images are not png anymore, but svg. Everthing is now fresher and even more lightweight then before. If you customized your stars set, check it again in the settings.
Download this release
Release Info
Developer | Dudo |
Plugin | Yasr – Yet Another Stars Rating |
Version | 1.8.0 |
Comparing to | |
See all releases |
Code changes from version 1.7.4 to 1.8.0
- css/yasr-admin.css +13 -150
- css/yasr.css +1 -203
- freemius/languages/freemius-it_IT.mo +0 -0
- freemius/languages/freemius-it_IT.po +11 -13
- img/Yasr-Stylish.png +0 -0
- img/create-ranking.png +0 -0
- img/dark-multi-set.png +0 -0
- img/delete.gif +0 -0
- img/star.png +0 -0
- img/stars24.png +0 -0
- img/stars32.png +0 -0
- img/stars_16_flat.png +0 -0
- img/stars_24_flat.png +0 -0
- img/stars_32_flat.png +0 -0
- img/stars_rater.png +0 -0
- img/stars_rater_yasr.png +0 -0
- img/yasr-pro-stars.png +0 -0
- img/yasr-stars-large.png +0 -0
- img/yasr-stars-medium.png +0 -0
- img/yasr-stars-small.png +0 -0
- img/yasr-stylish-stars.png +0 -0
- img/yasr-user-reviews.png +0 -0
- img/yasr_review.png +0 -0
- js/jquery.rateit.min.js +0 -5
- js/jquery.rateit.min.js.map +0 -1
- js/yasr-admin.js +134 -230
- js/yasr-front.js +40 -330
- languages/yet-another-stars-rating-it_IT.mo +0 -0
- languages/yet-another-stars-rating-it_IT.po +559 -541
- languages/yet-another-stars-rating.pot +941 -486
- lib/settings/yasr-settings-functions-misc.php +194 -0
- lib/settings/yasr-settings-functions-multiset.php +828 -0
- lib/settings/yasr-settings-functions-style.php +123 -0
- lib/settings/yasr-settings-functions.php +650 -0
- lib/yasr-admin-actions.php +9 -34
- lib/yasr-ajax-functions.php +19 -211
- lib/yasr-db-functions.php +108 -23
- lib/yasr-functions.php +45 -83
- lib/yasr-settings-functions.php +0 -1829
- lib/yasr-shortcode-functions.php +46 -144
- readme.txt +10 -6
- yasr-metabox-multiple-rating.php +32 -31
- yasr-metabox-top-right.php +3 -15
- yasr-settings-page.php +1 -1
- yet-another-stars-rating.php +9 -34
css/yasr-admin.css
CHANGED
@@ -44,156 +44,6 @@
|
|
44 |
}
|
45 |
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
/****** Rate it rules *****/
|
50 |
-
|
51 |
-
.rateit {
|
52 |
-
display: -moz-inline-box;
|
53 |
-
display: inline-block;
|
54 |
-
position: relative;
|
55 |
-
-webkit-user-select: none;
|
56 |
-
-khtml-user-select: none;
|
57 |
-
-moz-user-select: none;
|
58 |
-
-o-user-select: none;
|
59 |
-
-ms-user-select: none;
|
60 |
-
user-select: none;
|
61 |
-
-webkit-touch-callout: none;
|
62 |
-
}
|
63 |
-
|
64 |
-
.rateit .rateit-range
|
65 |
-
{
|
66 |
-
position: relative;
|
67 |
-
display: -moz-inline-box;
|
68 |
-
display: inline-block;
|
69 |
-
height: 16px;
|
70 |
-
outline: none;
|
71 |
-
}
|
72 |
-
|
73 |
-
.rateit .rateit-range * {
|
74 |
-
display:block;
|
75 |
-
}
|
76 |
-
|
77 |
-
/* for IE 6 */
|
78 |
-
* html .rateit, * html .rateit .rateit-range
|
79 |
-
{
|
80 |
-
display: inline;
|
81 |
-
}
|
82 |
-
|
83 |
-
/* for IE 7 */
|
84 |
-
* + html .rateit, * + html .rateit .rateit-range
|
85 |
-
{
|
86 |
-
display: inline;
|
87 |
-
}
|
88 |
-
|
89 |
-
.rateit .rateit-hover, .rateit .rateit-selected
|
90 |
-
{
|
91 |
-
position: absolute;
|
92 |
-
left: 0px;
|
93 |
-
}
|
94 |
-
|
95 |
-
.rateit .rateit-hover-rtl, .rateit .rateit-selected-rtl
|
96 |
-
{
|
97 |
-
left: auto;
|
98 |
-
right: 0px;
|
99 |
-
}
|
100 |
-
|
101 |
-
|
102 |
-
.rateit .rateit-hover-rtl
|
103 |
-
{
|
104 |
-
background-position: right -16px;
|
105 |
-
}
|
106 |
-
|
107 |
-
.rateit .rateit-selected-rtl
|
108 |
-
{
|
109 |
-
background-position: right -32px;
|
110 |
-
}
|
111 |
-
|
112 |
-
.rateit .rateit-preset
|
113 |
-
{
|
114 |
-
background: url('../img/star.png') left -48px;
|
115 |
-
}
|
116 |
-
|
117 |
-
.rateit .rateit-preset-rtl
|
118 |
-
{
|
119 |
-
background: url('../img/star.png') left -48px;
|
120 |
-
}
|
121 |
-
|
122 |
-
.rateit button.rateit-reset
|
123 |
-
{
|
124 |
-
background: url('../img/delete.gif') 0 0;
|
125 |
-
width: 16px;
|
126 |
-
height: 16px;
|
127 |
-
display: -moz-inline-box;
|
128 |
-
display: inline-block;
|
129 |
-
float: left;
|
130 |
-
outline: none;
|
131 |
-
border:none;
|
132 |
-
padding: 0;
|
133 |
-
}
|
134 |
-
|
135 |
-
.rateit button.rateit-reset:hover, .rateit button.rateit-reset:focus
|
136 |
-
{
|
137 |
-
background-position: 0 -16px;
|
138 |
-
}
|
139 |
-
|
140 |
-
.yasr_settings_fields_content {
|
141 |
-
background-color: #F7F7F7;
|
142 |
-
}
|
143 |
-
|
144 |
-
|
145 |
-
/* Creating set 24px image . */
|
146 |
-
|
147 |
-
div.medium .rateit-range
|
148 |
-
{
|
149 |
-
/*White*/
|
150 |
-
width: 24px;
|
151 |
-
height: 24px;
|
152 |
-
}
|
153 |
-
|
154 |
-
div.medium .rateit-hover
|
155 |
-
{
|
156 |
-
/*Red*/
|
157 |
-
width: 24px;
|
158 |
-
height: 24px;
|
159 |
-
display: none
|
160 |
-
|
161 |
-
}
|
162 |
-
|
163 |
-
div.medium .rateit-selected
|
164 |
-
{
|
165 |
-
/*Yellow*/
|
166 |
-
width: 24px;
|
167 |
-
height: 24px;
|
168 |
-
}
|
169 |
-
|
170 |
-
/* Creating set 32 */
|
171 |
-
|
172 |
-
div.bigstars .rateit-range
|
173 |
-
{
|
174 |
-
/*White*/
|
175 |
-
width: 32px;
|
176 |
-
height: 32px;
|
177 |
-
}
|
178 |
-
|
179 |
-
div.bigstars .rateit-hover
|
180 |
-
{
|
181 |
-
/*red*/
|
182 |
-
width: 32px;
|
183 |
-
height: 32px;
|
184 |
-
display: none
|
185 |
-
}
|
186 |
-
|
187 |
-
div.bigstars .rateit-selected
|
188 |
-
{
|
189 |
-
/*Gold*/
|
190 |
-
width: 32px;
|
191 |
-
height: 32px;
|
192 |
-
}
|
193 |
-
|
194 |
-
/*************** End rateit rules ***************/
|
195 |
-
|
196 |
-
|
197 |
/********** Edit post / page rules **********/
|
198 |
|
199 |
/*** Metabox top right ***/
|
@@ -231,6 +81,19 @@ div.bigstars .rateit-selected
|
|
231 |
display: block;
|
232 |
}
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
/**************** Settings page *******************/
|
235 |
|
236 |
/*** Top menu navigation ***/
|
44 |
}
|
45 |
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
/********** Edit post / page rules **********/
|
48 |
|
49 |
/*** Metabox top right ***/
|
81 |
display: block;
|
82 |
}
|
83 |
|
84 |
+
/**** Metabox multi ****/
|
85 |
+
#yasr-multi-set-admin-choose-text {
|
86 |
+
display:none;
|
87 |
+
margin-bottom: 15px;
|
88 |
+
margin-top: 10px;
|
89 |
+
}
|
90 |
+
|
91 |
+
#yasr-multi-set-admin-explain {
|
92 |
+
display: none;
|
93 |
+
margin-top: 20px;
|
94 |
+
margin-left: 20px;
|
95 |
+
}
|
96 |
+
|
97 |
/**************** Settings page *******************/
|
98 |
|
99 |
/*** Top menu navigation ***/
|
css/yasr.css
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
width: 0;
|
3 |
position: relative;
|
4 |
display:inline-block;
|
5 |
-
background-image: url(../img/star_2.svg);
|
6 |
background-position: 0 0;
|
7 |
background-repeat: repeat-x;
|
8 |
}
|
@@ -39,204 +38,9 @@
|
|
39 |
position: absolute;
|
40 |
height: 100%;
|
41 |
width: 100%;
|
42 |
-
background: url('../img/star_3.svg') ;
|
43 |
background-repeat: repeat-x;
|
44 |
}
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
/****** Rate it rules *****/
|
50 |
-
|
51 |
-
.rateit {
|
52 |
-
display: -moz-inline-box;
|
53 |
-
display: inline-block;
|
54 |
-
position: relative;
|
55 |
-
-webkit-user-select: none;
|
56 |
-
-khtml-user-select: none;
|
57 |
-
-moz-user-select: none;
|
58 |
-
-o-user-select: none;
|
59 |
-
-ms-user-select: none;
|
60 |
-
user-select: none;
|
61 |
-
-webkit-touch-callout: none;
|
62 |
-
}
|
63 |
-
|
64 |
-
|
65 |
-
/*.rateit .rateit-range * {
|
66 |
-
display:block;
|
67 |
-
}*/
|
68 |
-
|
69 |
-
/* for IE 6 */
|
70 |
-
* html .rateit, * html .rateit .rateit-range
|
71 |
-
{
|
72 |
-
display: inline;
|
73 |
-
}
|
74 |
-
|
75 |
-
/* for IE 7 */
|
76 |
-
* + html .rateit, * + html .rateit .rateit-range
|
77 |
-
{
|
78 |
-
display: inline;
|
79 |
-
}
|
80 |
-
|
81 |
-
.rateit .rateit-hover, .rateit .rateit-selected
|
82 |
-
{
|
83 |
-
position: absolute;
|
84 |
-
left: 0px;
|
85 |
-
}
|
86 |
-
|
87 |
-
.rateit .rateit-range
|
88 |
-
{
|
89 |
-
position: relative;
|
90 |
-
display: -moz-inline-box;
|
91 |
-
display: inline-block;
|
92 |
-
height: 16px;
|
93 |
-
outline: none;
|
94 |
-
vertical-align: -5px;
|
95 |
-
}
|
96 |
-
|
97 |
-
|
98 |
-
/* Creating set 24px image . */
|
99 |
-
|
100 |
-
div.medium .rateit-range
|
101 |
-
{
|
102 |
-
/*White*/
|
103 |
-
width: 24px;
|
104 |
-
height: 24px;
|
105 |
-
}
|
106 |
-
|
107 |
-
div.medium .rateit-hover
|
108 |
-
{
|
109 |
-
/*Red*/
|
110 |
-
width: 24px;
|
111 |
-
height: 24px;
|
112 |
-
display: none
|
113 |
-
|
114 |
-
}
|
115 |
-
|
116 |
-
div.medium .rateit-selected
|
117 |
-
{
|
118 |
-
/*Yellow*/
|
119 |
-
width: 24px;
|
120 |
-
height: 24px;
|
121 |
-
}
|
122 |
-
|
123 |
-
/* Creating set 32 */
|
124 |
-
|
125 |
-
div.bigstars .rateit-range
|
126 |
-
{
|
127 |
-
/*White*/
|
128 |
-
width: 32px;
|
129 |
-
height: 32px;
|
130 |
-
}
|
131 |
-
|
132 |
-
div.bigstars .rateit-hover
|
133 |
-
{
|
134 |
-
/*red*/
|
135 |
-
width: 32px;
|
136 |
-
height: 32px;
|
137 |
-
display: none
|
138 |
-
}
|
139 |
-
|
140 |
-
div.bigstars .rateit-selected
|
141 |
-
{
|
142 |
-
/*Gold*/
|
143 |
-
width: 32px;
|
144 |
-
height: 32px;
|
145 |
-
}
|
146 |
-
|
147 |
-
|
148 |
-
.rateit button.rateit-reset
|
149 |
-
{
|
150 |
-
background: url('../img/delete.gif') 0 0;
|
151 |
-
width: 16px;
|
152 |
-
height: 16px;
|
153 |
-
display: -moz-inline-box;
|
154 |
-
display: inline-block;
|
155 |
-
float: left;
|
156 |
-
outline: none;
|
157 |
-
border:none;
|
158 |
-
padding: 0;
|
159 |
-
}
|
160 |
-
|
161 |
-
.rateit button.rateit-reset:hover, .rateit button.rateit-reset:focus
|
162 |
-
{
|
163 |
-
background-position: 0 -16px;
|
164 |
-
}
|
165 |
-
|
166 |
-
|
167 |
-
/*** Rate it font ***/
|
168 |
-
|
169 |
-
.rateit-font {
|
170 |
-
font-size: 24px;
|
171 |
-
line-height: 1em;
|
172 |
-
}
|
173 |
-
|
174 |
-
.rateit-font .rateit-range {
|
175 |
-
background: none;
|
176 |
-
height: auto;
|
177 |
-
}
|
178 |
-
|
179 |
-
.rateit-font .rateit-empty {
|
180 |
-
color: #ccc;
|
181 |
-
}
|
182 |
-
|
183 |
-
.rateit-font .rateit-range > div {
|
184 |
-
background: none;
|
185 |
-
overflow: hidden;
|
186 |
-
cursor: default;
|
187 |
-
}
|
188 |
-
|
189 |
-
.rateit.rateit-font .rateit-reset {
|
190 |
-
font-size: inherit;
|
191 |
-
background: none;
|
192 |
-
width: 0.6em;
|
193 |
-
height: 0.6em;
|
194 |
-
margin-top: 0.2em;
|
195 |
-
background: gray;
|
196 |
-
border-radius: 50%;
|
197 |
-
position: relative;
|
198 |
-
}
|
199 |
-
|
200 |
-
.rateit.rateit-font .rateit-reset span {
|
201 |
-
display: block;
|
202 |
-
font-weight: bold;
|
203 |
-
color: white;
|
204 |
-
height: calc(50% - 0.045em);
|
205 |
-
top: 0;
|
206 |
-
position: absolute;
|
207 |
-
border-bottom: 0.09em solid white;
|
208 |
-
width: 72%;
|
209 |
-
margin-left: 14%;
|
210 |
-
}
|
211 |
-
|
212 |
-
|
213 |
-
.rateit.rateit-font .rateit-reset:hover, .rateit.rateit-font button.rateit-reset:focus {
|
214 |
-
background: #e6574b; /* Old browsers */
|
215 |
-
background: radial-gradient(ellipse at center, #e6574b 55%,#f6836b 77%,#f9d3cc 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
216 |
-
background-position: 0 0;
|
217 |
-
}
|
218 |
-
|
219 |
-
/*** RTL RULES, thank's to Arik Numlock ***/
|
220 |
-
|
221 |
-
.rateit .rateit-hover.rateit-hover-rtl, .rateit .rateit-selected.rateit-selected-rtl {
|
222 |
-
|
223 |
-
-moz-transform: scaleX(-1);
|
224 |
-
-o-transform: scaleX(-1);
|
225 |
-
|
226 |
-
-webkit-transform: scaleX(-1);
|
227 |
-
transform: scaleX(-1);
|
228 |
-
filter: FlipH;
|
229 |
-
-ms-filter: "FlipH";
|
230 |
-
right: 0;
|
231 |
-
left: auto;
|
232 |
-
|
233 |
-
}
|
234 |
-
|
235 |
-
/****** End rateit rules ******/
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
/****** NON ADMIN RULES ******/
|
241 |
|
242 |
.yasr_schema{
|
@@ -278,6 +82,7 @@ div.bigstars .rateit-selected
|
|
278 |
vertical-align: bottom !important;
|
279 |
text-decoration: none;
|
280 |
cursor: pointer;
|
|
|
281 |
}
|
282 |
|
283 |
.yasr-total-average-text-medium {
|
@@ -310,21 +115,15 @@ div.bigstars .rateit-selected
|
|
310 |
/*** Widgets ***/
|
311 |
|
312 |
.yasr-widget-recent-ratings-table {
|
313 |
-
|
314 |
border: none;
|
315 |
-
|
316 |
}
|
317 |
|
318 |
.yasr-widget-recent-ratings-td {
|
319 |
-
|
320 |
border: none;
|
321 |
-
|
322 |
}
|
323 |
|
324 |
.yasr-widget-recent-ratings-text {
|
325 |
-
|
326 |
font-weight: bold;
|
327 |
-
|
328 |
}
|
329 |
|
330 |
|
@@ -403,7 +202,6 @@ yasr_pro_comment_reviews_stats shortcode too***/
|
|
403 |
|
404 |
/*** Tooltip ***/
|
405 |
|
406 |
-
|
407 |
.yasr-w3-container:after,.yasr-w3-container:before{content:"";display:table;clear:both}
|
408 |
.yasr-w3-border-0{border:0!important}.yasr-w3-border{border:1px solid #ccc!important; background: linear-gradient(to bottom,#eee,#f6f6f6);}
|
409 |
.yasr-w3-border-top{border-top:1px solid #ccc!important}.yasr-w3-border-bottom{border-bottom:1px solid #ccc!important}
|
2 |
width: 0;
|
3 |
position: relative;
|
4 |
display:inline-block;
|
|
|
5 |
background-position: 0 0;
|
6 |
background-repeat: repeat-x;
|
7 |
}
|
38 |
position: absolute;
|
39 |
height: 100%;
|
40 |
width: 100%;
|
|
|
41 |
background-repeat: repeat-x;
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
/****** NON ADMIN RULES ******/
|
45 |
|
46 |
.yasr_schema{
|
82 |
vertical-align: bottom !important;
|
83 |
text-decoration: none;
|
84 |
cursor: pointer;
|
85 |
+
height: 25px;
|
86 |
}
|
87 |
|
88 |
.yasr-total-average-text-medium {
|
115 |
/*** Widgets ***/
|
116 |
|
117 |
.yasr-widget-recent-ratings-table {
|
|
|
118 |
border: none;
|
|
|
119 |
}
|
120 |
|
121 |
.yasr-widget-recent-ratings-td {
|
|
|
122 |
border: none;
|
|
|
123 |
}
|
124 |
|
125 |
.yasr-widget-recent-ratings-text {
|
|
|
126 |
font-weight: bold;
|
|
|
127 |
}
|
128 |
|
129 |
|
202 |
|
203 |
/*** Tooltip ***/
|
204 |
|
|
|
205 |
.yasr-w3-container:after,.yasr-w3-container:before{content:"";display:table;clear:both}
|
206 |
.yasr-w3-border-0{border:0!important}.yasr-w3-border{border:1px solid #ccc!important; background: linear-gradient(to bottom,#eee,#f6f6f6);}
|
207 |
.yasr-w3-border-top{border-top:1px solid #ccc!important}.yasr-w3-border-bottom{border-bottom:1px solid #ccc!important}
|
freemius/languages/freemius-it_IT.mo
CHANGED
Binary file
|
freemius/languages/freemius-it_IT.po
CHANGED
@@ -10,7 +10,7 @@ msgstr ""
|
|
10 |
"Project-Id-Version: WordPress SDK\n"
|
11 |
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
12 |
"POT-Creation-Date: \n"
|
13 |
-
"PO-Revision-Date: 2018-
|
14 |
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
15 |
"Language: it_IT\n"
|
16 |
"Language-Team: Italian (Italy) (http://www.transifex.com/freemius/wordpress-sdk/language/it_IT/)\n"
|
@@ -20,9 +20,10 @@ msgstr ""
|
|
20 |
"MIME-Version: 1.0\n"
|
21 |
"X-Poedit-Basepath: ..\n"
|
22 |
"X-Poedit-KeywordsList: get_text_inline;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;get_text_x_inline:1,2c;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
|
|
|
|
|
23 |
"X-Poedit-SearchPath-0: .\n"
|
24 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
25 |
-
"X-Poedit-SourceCharset: UTF-8\n"
|
26 |
|
27 |
#: includes/class-freemius.php:1602
|
28 |
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
@@ -180,7 +181,7 @@ msgstr "Errore API inaspettato. Contatta l'autore di %s con il seguente errore."
|
|
180 |
|
181 |
#: includes/class-freemius.php:5006
|
182 |
msgid "Premium %s version was successfully activated."
|
183 |
-
msgstr "La versione
|
184 |
|
185 |
#: includes/class-freemius.php5018, includes/class-freemius.php:6862
|
186 |
msgctxt ""
|
@@ -251,8 +252,7 @@ msgstr "L'aggiornamento di %s è stato completato con successo."
|
|
251 |
|
252 |
#: includes/class-freemius.php8705, includes/class-fs-plugin-updater.php882,
|
253 |
#: includes/class-fs-plugin-updater.php1077,
|
254 |
-
#: includes/class-fs-plugin-updater.php1084,
|
255 |
-
#: templates/auto-installation.php:32
|
256 |
msgid "Add-On"
|
257 |
msgstr "Add-on"
|
258 |
|
@@ -285,12 +285,12 @@ msgstr "Account in attesa di attivazione."
|
|
285 |
#: includes/class-freemius.php11653,
|
286 |
#: templates/forms/premium-versions-upgrade-handler.php:47
|
287 |
msgid "Buy a license now"
|
288 |
-
msgstr "
|
289 |
|
290 |
#: includes/class-freemius.php11665,
|
291 |
#: templates/forms/premium-versions-upgrade-handler.php:46
|
292 |
msgid "Renew your license now"
|
293 |
-
msgstr "
|
294 |
|
295 |
#: includes/class-freemius.php:11669
|
296 |
msgid "%s to access version %s security & feature updates, and support."
|
@@ -980,14 +980,12 @@ msgstr "Licenze illimitate"
|
|
980 |
msgid "Up to %s Sites"
|
981 |
msgstr "Fino a %s siti"
|
982 |
|
983 |
-
#: includes/fs-plugin-info-dialog.php792,
|
984 |
-
#: templates/plugin-info/features.php:82
|
985 |
msgctxt "as monthly period"
|
986 |
msgid "mo"
|
987 |
msgstr "mese"
|
988 |
|
989 |
-
#: includes/fs-plugin-info-dialog.php799,
|
990 |
-
#: templates/plugin-info/features.php:80
|
991 |
msgctxt "as annual period"
|
992 |
msgid "year"
|
993 |
msgstr "anno"
|
@@ -1912,8 +1910,8 @@ msgstr "Nome della compagnia"
|
|
1912 |
msgid "Tax / VAT ID"
|
1913 |
msgstr "Numero Partita Iva o VAT"
|
1914 |
|
1915 |
-
#: templates/account/billing.php48, templates/account/billing.
|
1916 |
-
#: templates/account/billing.
|
1917 |
msgid "Address Line %d"
|
1918 |
msgstr "Riga indirizzo %d"
|
1919 |
|
10 |
"Project-Id-Version: WordPress SDK\n"
|
11 |
"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
|
12 |
"POT-Creation-Date: \n"
|
13 |
+
"PO-Revision-Date: 2018-12-23 14:32+0100\n"
|
14 |
"Last-Translator: Vova Feldman <vova@freemius.com>\n"
|
15 |
"Language: it_IT\n"
|
16 |
"Language-Team: Italian (Italy) (http://www.transifex.com/freemius/wordpress-sdk/language/it_IT/)\n"
|
20 |
"MIME-Version: 1.0\n"
|
21 |
"X-Poedit-Basepath: ..\n"
|
22 |
"X-Poedit-KeywordsList: get_text_inline;fs_text_inline;fs_echo_inline;fs_esc_js_inline;fs_esc_attr_inline;fs_esc_attr_echo_inline;fs_esc_html_inline;fs_esc_html_echo_inline;get_text_x_inline:1,2c;fs_text_x_inline:1,2c;fs_echo_x_inline:1,2c;fs_esc_attr_x_inline:1,2c;fs_esc_js_x_inline:1,2c;fs_esc_js_echo_x_inline:1,2c;fs_esc_html_x_inline:1,2c;fs_esc_html_echo_x_inline:1,2c\n"
|
23 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
24 |
+
"X-Generator: Poedit 2.0.6\n"
|
25 |
"X-Poedit-SearchPath-0: .\n"
|
26 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
|
|
27 |
|
28 |
#: includes/class-freemius.php:1602
|
29 |
msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
|
181 |
|
182 |
#: includes/class-freemius.php:5006
|
183 |
msgid "Premium %s version was successfully activated."
|
184 |
+
msgstr "La versione %s Permium è stata attivata con successo."
|
185 |
|
186 |
#: includes/class-freemius.php5018, includes/class-freemius.php:6862
|
187 |
msgctxt ""
|
252 |
|
253 |
#: includes/class-freemius.php8705, includes/class-fs-plugin-updater.php882,
|
254 |
#: includes/class-fs-plugin-updater.php1077,
|
255 |
+
#: includes/class-fs-plugin-updater.php1084, templates/auto-installation.php:32
|
|
|
256 |
msgid "Add-On"
|
257 |
msgstr "Add-on"
|
258 |
|
285 |
#: includes/class-freemius.php11653,
|
286 |
#: templates/forms/premium-versions-upgrade-handler.php:47
|
287 |
msgid "Buy a license now"
|
288 |
+
msgstr "Compra una licenza ora"
|
289 |
|
290 |
#: includes/class-freemius.php11665,
|
291 |
#: templates/forms/premium-versions-upgrade-handler.php:46
|
292 |
msgid "Renew your license now"
|
293 |
+
msgstr "Rinnova la tua licenza ora"
|
294 |
|
295 |
#: includes/class-freemius.php:11669
|
296 |
msgid "%s to access version %s security & feature updates, and support."
|
980 |
msgid "Up to %s Sites"
|
981 |
msgstr "Fino a %s siti"
|
982 |
|
983 |
+
#: includes/fs-plugin-info-dialog.php792, templates/plugin-info/features.php:82
|
|
|
984 |
msgctxt "as monthly period"
|
985 |
msgid "mo"
|
986 |
msgstr "mese"
|
987 |
|
988 |
+
#: includes/fs-plugin-info-dialog.php799, templates/plugin-info/features.php:80
|
|
|
989 |
msgctxt "as annual period"
|
990 |
msgid "year"
|
991 |
msgstr "anno"
|
1910 |
msgid "Tax / VAT ID"
|
1911 |
msgstr "Numero Partita Iva o VAT"
|
1912 |
|
1913 |
+
#: templates/account/billing.php48, templates/account/billing.php49,
|
1914 |
+
#: templates/account/billing.php:49
|
1915 |
msgid "Address Line %d"
|
1916 |
msgstr "Riga indirizzo %d"
|
1917 |
|
img/Yasr-Stylish.png
CHANGED
Binary file
|
img/create-ranking.png
CHANGED
Binary file
|
img/dark-multi-set.png
CHANGED
Binary file
|
img/delete.gif
DELETED
Binary file
|
img/star.png
DELETED
Binary file
|
img/stars24.png
DELETED
Binary file
|
img/stars32.png
DELETED
Binary file
|
img/stars_16_flat.png
DELETED
Binary file
|
img/stars_24_flat.png
DELETED
Binary file
|
img/stars_32_flat.png
DELETED
Binary file
|
img/stars_rater.png
ADDED
Binary file
|
img/stars_rater_yasr.png
ADDED
Binary file
|
img/yasr-pro-stars.png
ADDED
Binary file
|
img/yasr-stars-large.png
CHANGED
Binary file
|
img/yasr-stars-medium.png
CHANGED
Binary file
|
img/yasr-stars-small.png
CHANGED
Binary file
|
img/yasr-stylish-stars.png
DELETED
Binary file
|
img/yasr-user-reviews.png
CHANGED
Binary file
|
img/yasr_review.png
CHANGED
Binary file
|
js/jquery.rateit.min.js
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
/*! RateIt | v1.1.0 / 10/20/2016
|
2 |
-
https://github.com/gjunge/rateit.js | Twitter: @gjunge
|
3 |
-
*/
|
4 |
-
!function(e){function t(e){var t=e.originalEvent.changedTouches,a=t[0],i="";switch(e.type){case"touchmove":i="mousemove";break;case"touchend":i="mouseup";break;default:return}var r=document.createEvent("MouseEvent");r.initMouseEvent(i,!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(r),e.preventDefault()}e.rateit={aria:{resetLabel:"reset rating",ratingLabel:"rating"}},e.fn.rateit=function(a,i){var r=1,n={},s="init",d=function(e){return e.charAt(0).toUpperCase()+e.substr(1)};if(0===this.length)return this;var l=e.type(a);if("object"==l||void 0===a||null===a)n=e.extend({},e.fn.rateit.defaults,a);else{if("string"==l&&"reset"!==a&&void 0===i)return this.data("rateit"+d(a));"string"==l&&(s="setvalue")}return this.each(function(){var l=e(this),o=function(e,t){if(null!=t){var a="aria-value"+("value"==e?"now":e),i=l.find(".rateit-range");void 0!=i.attr(a)&&i.attr(a,t)}return arguments[0]="rateit"+d(e),l.data.apply(l,arguments)};if("reset"==a){var u=o("init");for(var v in u)l.data(v,u[v]);if(o("backingfld")){var m=e(o("backingfld"));"SELECT"==m[0].nodeName&&"index"===m[0].getAttribute("data-rateit-valuesrc")?m.prop("selectedIndex",o("value")):m.val(o("value")),m.trigger("change"),m[0].min&&(m[0].min=o("min")),m[0].max&&(m[0].max=o("max")),m[0].step&&(m[0].step=o("step"))}l.trigger("reset")}l.hasClass("rateit")||l.addClass("rateit");var h="rtl"!=l.css("direction");if("setvalue"==s){if(!o("init"))throw"Can't set value before init";if("readonly"!=a||1!=i||o("readonly")||(l.find(".rateit-range").unbind(),o("wired",!1)),"value"==a&&(i=null==i?o("min"):Math.max(o("min"),Math.min(o("max"),i))),o("backingfld")){var m=e(o("backingfld"));"SELECT"==m[0].nodeName&&"index"===m[0].getAttribute("data-rateit-valuesrc")?"value"==a&&m.prop("selectedIndex",i):"value"==a&&m.val(i),"min"==a&&m[0].min&&(m[0].min=i),"max"==a&&m[0].max&&(m[0].max=i),"step"==a&&m[0].step&&(m[0].step=i)}o(a,i)}if(!o("init")){if(o("mode",o("mode")||n.mode),o("icon",o("icon")||n.icon),o("min",isNaN(o("min"))?n.min:o("min")),o("max",isNaN(o("max"))?n.max:o("max")),o("step",o("step")||n.step),o("readonly",void 0!==o("readonly")?o("readonly"):n.readonly),o("resetable",void 0!==o("resetable")?o("resetable"):n.resetable),o("backingfld",o("backingfld")||n.backingfld),o("starwidth",o("starwidth")||n.starwidth),o("starheight",o("starheight")||n.starheight),o("value",Math.max(o("min"),Math.min(o("max"),isNaN(o("value"))?isNaN(n.value)?n.min:n.value:o("value")))),o("ispreset",void 0!==o("ispreset")?o("ispreset"):n.ispreset),o("backingfld")){var m=e(o("backingfld")).hide();if((m.attr("disabled")||m.attr("readonly"))&&o("readonly",!0),"INPUT"==m[0].nodeName&&("range"!=m[0].type&&"text"!=m[0].type||(o("min",parseInt(m.attr("min"))||o("min")),o("max",parseInt(m.attr("max"))||o("max")),o("step",parseInt(m.attr("step"))||o("step")))),"SELECT"==m[0].nodeName&&m[0].options.length>1){"index"===m[0].getAttribute("data-rateit-valuesrc")?(o("min",isNaN(o("min"))?Number(m[0].options[0].index):o("min")),o("max",Number(m[0].options[m[0].length-1].index)),o("step",Number(m[0].options[1].index)-Number(m[0].options[0].index))):(o("min",isNaN(o("min"))?Number(m[0].options[0].value):o("min")),o("max",Number(m[0].options[m[0].length-1].value)),o("step",Number(m[0].options[1].value)-Number(m[0].options[0].value)));var c=m.find("option[selected]");1==c.length&&("index"===m[0].getAttribute("data-rateit-valuesrc")?o("value",c[0].index):o("value",c.val()))}else o("value",m.val())}var g="DIV"==l[0].nodeName?"div":"span";r++;var f='<button id="rateit-reset-{{index}}" type="button" data-role="none" class="rateit-reset" aria-label="'+e.rateit.aria.resetLabel+'" aria-controls="rateit-range-{{index}}"><span></span></button><{{element}} id="rateit-range-{{index}}" class="rateit-range" tabindex="0" role="slider" aria-label="'+e.rateit.aria.ratingLabel+'" aria-owns="rateit-reset-{{index}}" aria-valuemin="'+o("min")+'" aria-valuemax="'+o("max")+'" aria-valuenow="'+o("value")+'"><{{element}} class="rateit-empty"></{{element}}><{{element}} class="rateit-selected"></{{element}}><{{element}} class="rateit-hover"></{{element}}></{{element}}>';l.append(f.replace(/{{index}}/gi,r).replace(/{{element}}/gi,g)),h||(l.find(".rateit-reset").css("float","right"),l.find(".rateit-selected").addClass("rateit-selected-rtl"),l.find(".rateit-hover").addClass("rateit-hover-rtl")),"font"==o("mode")?l.addClass("rateit-font").removeClass("rateit-bg"):l.addClass("rateit-bg").removeClass("rateit-font"),o("init",JSON.parse(JSON.stringify(l.data())))}var p="font"==o("mode");p||l.find(".rateit-selected, .rateit-hover").height(o("starheight"));var b=l.find(".rateit-range");if(p){for(var x=o("icon"),w=o("max")-o("min"),N="",y=0;y<w;y++)N+=x;b.find("> *").text(N),o("starwidth",b.width()/(o("max")-o("min")))}else b.width(o("starwidth")*(o("max")-o("min"))).height(o("starheight"));var C="rateit-preset"+(h?"":"-rtl");if(o("ispreset")?l.find(".rateit-selected").addClass(C):l.find(".rateit-selected").removeClass(C),null!=o("value")){var k=(o("value")-o("min"))*o("starwidth");l.find(".rateit-selected").width(k)}var E=l.find(".rateit-reset");E.data("wired")!==!0&&E.bind("click",function(t){t.preventDefault(),E.blur();var a=e.Event("beforereset");return l.trigger(a),!a.isDefaultPrevented()&&(l.rateit("value",null),void l.trigger("reset"))}).data("wired",!0);var M=function(t,a){var i=a.changedTouches?a.changedTouches[0].pageX:a.pageX,r=i-e(t).offset().left;return h||(r=b.width()-r),r>b.width()&&(r=b.width()),r<0&&(r=0),k=Math.ceil(r/o("starwidth")*(1/o("step")))},I=function(e){var t=e*o("starwidth")*o("step"),a=b.find(".rateit-hover");if(a.data("width")!=t){b.find(".rateit-selected").hide(),a.width(t).show().data("width",t);var i=[e*o("step")+o("min")];l.trigger("hover",i).trigger("over",i)}},L=function(t){var a=e.Event("beforerated");return l.trigger(a,[t]),!a.isDefaultPrevented()&&(o("value",t),o("backingfld")&&("SELECT"==m[0].nodeName&&"index"===m[0].getAttribute("data-rateit-valuesrc")?e(o("backingfld")).prop("selectedIndex",t).trigger("change"):e(o("backingfld")).val(t).trigger("change")),o("ispreset")&&(b.find(".rateit-selected").removeClass(C),o("ispreset",!1)),b.find(".rateit-hover").hide(),b.find(".rateit-selected").width(t*o("starwidth")-o("min")*o("starwidth")).show(),l.trigger("hover",[null]).trigger("over",[null]).trigger("rated",[t]),!0)};o("readonly")?E.hide():(o("resetable")||E.hide(),o("wired")||(b.bind("touchmove touchend",t),b.mousemove(function(e){var t=M(this,e);I(t)}),b.mouseleave(function(e){b.find(".rateit-hover").hide().width(0).data("width",""),l.trigger("hover",[null]).trigger("over",[null]),b.find(".rateit-selected").show()}),b.mouseup(function(e){var t=M(this,e),a=t*o("step")+o("min");L(a),b.blur()}),b.keyup(function(e){38!=e.which&&e.which!=(h?39:37)||L(Math.min(o("value")+o("step"),o("max"))),40!=e.which&&e.which!=(h?37:39)||L(Math.max(o("value")-o("step"),o("min")))}),o("wired",!0)),o("resetable")&&E.show()),b.attr("aria-readonly",o("readonly"))})},e.fn.rateit.defaults={min:0,max:5,step:.5,mode:"bg",icon:"★",starwidth:16,starheight:16,readonly:!1,resetable:!0,ispreset:!1},e(function(){e("div.rateit, span.rateit").rateit()})}(jQuery);
|
5 |
-
//# sourceMappingURL=jquery.rateit.min.js.map
|
|
|
|
|
|
|
|
|
|
js/jquery.rateit.min.js.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["jquery.rateit.js"],"names":["$","touchHandler","event","touches","originalEvent","changedTouches","first","type","simulatedEvent","document","createEvent","initMouseEvent","window","screenX","screenY","clientX","clientY","target","dispatchEvent","preventDefault","rateit","aria","resetLabel","ratingLabel","fn","p1","p2","index","options","mode","capitaliseFirstLetter","string","charAt","toUpperCase","substr","this","length","tp1","undefined","extend","defaults","data","each","item","itemdata","key","value","ariakey","range","find","attr","arguments","apply","setup","prop","fld","nodeName","getAttribute","val","trigger","min","max","step","hasClass","addClass","ltr","css","unbind","Math","icon","isNaN","readonly","resetable","backingfld","starwidth","starheight","ispreset","hide","parseInt","Number","selectedOption","element","html","append","replace","removeClass","JSON","parse","stringify","isfont","height","stars","txt","i","text","width","presetclass","score","resetbtn","bind","e","blur","Event","isDefaultPrevented","calcRawScore","pageX","offsetx","offset","left","ceil","setHover","w","h","show","setSelection","mousemove","mouseleave","mouseup","keyup","which","jQuery"],"mappings":";;;CAGA,SAAWA,GA6XP,QAASC,GAAaC,GAElB,GAAIC,GAAUD,EAAME,cAAcC,eAC1BC,EAAQH,EAAQ,GAChBI,EAAO,EACf,QAAQL,EAAMK,MACV,IAAK,YAAaA,EAAO,WAAa,MACtC,KAAK,WAAYA,EAAO,SAAW,MACnC,SAAS,OAGb,GAAIC,GAAiBC,SAASC,YAAY,aAC1CF,GAAeG,eAAeJ,GAAM,GAAM,EAAMK,OAAQ,EAClCN,EAAMO,QAASP,EAAMQ,QACrBR,EAAMS,QAAST,EAAMU,SAAS,GAC9B,GAAO,GAAO,EAAO,EAAW,MAEtDV,EAAMW,OAAOC,cAAcV,GAC3BN,EAAMiB,iBA9YVnB,EAAEoB,QACEC,MACIC,WAAY,eACZC,YAAa,WAIrBvB,EAAEwB,GAAGJ,OAAS,SAAUK,EAAIC,GAExB,GAAIC,GAAQ,EACRC,KAAkBC,EAAO,OACzBC,EAAwB,SAAUC,GAClC,MAAOA,GAAOC,OAAO,GAAGC,cAAgBF,EAAOG,OAAO,GAG1D,IAAoB,IAAhBC,KAAKC,OAAgB,MAAOD,KAGhC,IAAIE,GAAMrC,EAAEO,KAAKkB,EACjB,IAAW,UAAPY,GAA0BC,SAAPb,GAA2B,OAAPA,EACvCG,EAAU5B,EAAEuC,UAAWvC,EAAEwB,GAAGJ,OAAOoB,SAAUf,OAE5C,CAAA,GAAW,UAAPY,GAA0B,UAAPZ,GAAyBa,SAAPZ,EAC1C,MAAOS,MAAKM,KAAK,SAAWX,EAAsBL,GAEtC,WAAPY,IACLR,EAAO,YAGX,MAAOM,MAAKO,KAAK,WACb,GAAIC,GAAO3C,EAAEmC,MAITS,EAAW,SAAUC,EAAKC,GAE1B,GAAa,MAATA,EAAe,CAEf,GAAIC,GAAU,cAAwB,SAAPF,EAAkB,MAAQA,GACrDG,EAAQL,EAAKM,KAAK,gBACKX,SAAvBU,EAAME,KAAKH,IACXC,EAAME,KAAKH,EAASD,GAM5B,MADAK,WAAU,GAAK,SAAWrB,EAAsBe,GACzCF,EAAKF,KAAKW,MAAMT,EAAMQ,WAIjC,IAAU,SAAN1B,EAAe,CACf,GAAI4B,GAAQT,EAAS,OACrB,KAAK,GAAIU,KAAQD,GACbV,EAAKF,KAAKa,EAAMD,EAAMC,GAG1B,IAAIV,EAAS,cAAe,CACxB,GAAIW,GAAMvD,EAAE4C,EAAS,cAEE,WAAnBW,EAAI,GAAGC,UAAwE,UAAhDD,EAAI,GAAGE,aAAa,wBACnDF,EAAID,KAAK,gBAAiBV,EAAS,UAGnCW,EAAIG,IAAId,EAAS,UAErBW,EAAII,QAAQ,UACRJ,EAAI,GAAGK,MAAOL,EAAI,GAAGK,IAAMhB,EAAS,QACpCW,EAAI,GAAGM,MAAON,EAAI,GAAGM,IAAMjB,EAAS,QACpCW,EAAI,GAAGO,OAAQP,EAAI,GAAGO,KAAOlB,EAAS,SAE9CD,EAAKgB,QAAQ,SAIZhB,EAAKoB,SAAS,WAAapB,EAAKqB,SAAS,SAE9C,IAAIC,GAA+B,OAAzBtB,EAAKuB,IAAI,YAGnB,IAAY,YAARrC,EAAoB,CACpB,IAAKe,EAAS,QAAW,KAAM,6BAY/B,IARU,YAANnB,GAA0B,GAANC,GAAekB,EAAS,cAC5CD,EAAKM,KAAK,iBAAiBkB,SAC3BvB,EAAS,SAAS,IAGZ,SAANnB,IACAC,EAAY,MAANA,EAAckB,EAAS,OAASwB,KAAKP,IAAIjB,EAAS,OAAQwB,KAAKR,IAAIhB,EAAS,OAAQlB,KAE1FkB,EAAS,cAAe,CAIxB,GAAIW,GAAMvD,EAAE4C,EAAS,cAEE,WAAnBW,EAAI,GAAGC,UAAwE,UAAhDD,EAAI,GAAGE,aAAa,wBACzC,SAANhC,GAAiB8B,EAAID,KAAK,gBAAiB5B,GAGrC,SAAND,GAAiB8B,EAAIG,IAAIhC,GAEvB,OAAND,GAAe8B,EAAI,GAAGK,MAAOL,EAAI,GAAGK,IAAMlC,GACpC,OAAND,GAAe8B,EAAI,GAAGM,MAAON,EAAI,GAAGM,IAAMnC,GACpC,QAAND,GAAgB8B,EAAI,GAAGO,OAAQP,EAAI,GAAGO,KAAOpC,GAGrDkB,EAASnB,EAAIC,GAKjB,IAAKkB,EAAS,QAAS,CAiBnB,GAdAA,EAAS,OAAQA,EAAS,SAAWhB,EAAQC,MAC7Ce,EAAS,OAAQA,EAAS,SAAWhB,EAAQyC,MAC7CzB,EAAS,MAAO0B,MAAM1B,EAAS,QAAUhB,EAAQgC,IAAMhB,EAAS,QAChEA,EAAS,MAAO0B,MAAM1B,EAAS,QAAUhB,EAAQiC,IAAMjB,EAAS,QAChEA,EAAS,OAAQA,EAAS,SAAWhB,EAAQkC,MAC7ClB,EAAS,WAAqCN,SAAzBM,EAAS,YAA4BA,EAAS,YAAchB,EAAQ2C,UACzF3B,EAAS,YAAuCN,SAA1BM,EAAS,aAA6BA,EAAS,aAAehB,EAAQ4C,WAC5F5B,EAAS,aAAcA,EAAS,eAAiBhB,EAAQ6C,YACzD7B,EAAS,YAAaA,EAAS,cAAgBhB,EAAQ8C,WACvD9B,EAAS,aAAcA,EAAS,eAAiBhB,EAAQ+C,YACzD/B,EAAS,QAASwB,KAAKP,IAAIjB,EAAS,OAAQwB,KAAKR,IAAIhB,EAAS,OAAU0B,MAAM1B,EAAS,UAAkC0B,MAAM1C,EAAQkB,OAAyBlB,EAAQgC,IAAxBhC,EAAQkB,MAArDF,EAAS,YAC5GA,EAAS,WAAqCN,SAAzBM,EAAS,YAA4BA,EAAS,YAAchB,EAAQgD,UAGrFhC,EAAS,cAAe,CAExB,GAAIW,GAAMvD,EAAE4C,EAAS,eAAeiC,MAcpC,KAZItB,EAAIL,KAAK,aAAeK,EAAIL,KAAK,cACjCN,EAAS,YAAY,GAGF,SAAnBW,EAAI,GAAGC,WACY,SAAfD,EAAI,GAAGhD,MAAkC,QAAfgD,EAAI,GAAGhD,OAEjCqC,EAAS,MAAOkC,SAASvB,EAAIL,KAAK,SAAWN,EAAS,QACtDA,EAAS,MAAOkC,SAASvB,EAAIL,KAAK,SAAWN,EAAS,QACtDA,EAAS,OAAQkC,SAASvB,EAAIL,KAAK,UAAYN,EAAS,WAGzC,UAAnBW,EAAI,GAAGC,UAAwBD,EAAI,GAAG3B,QAAQQ,OAAS,EAAG,CAEN,UAAhDmB,EAAI,GAAGE,aAAa,yBACpBb,EAAS,MAAS0B,MAAM1B,EAAS,QAA4BmC,OAAOxB,EAAI,GAAG3B,QAAQ,GAAGD,OAA3CiB,EAAS,QACpDA,EAAS,MAAOmC,OAAOxB,EAAI,GAAG3B,QAAQ2B,EAAI,GAAGnB,OAAS,GAAGT,QACzDiB,EAAS,OAAQmC,OAAOxB,EAAI,GAAG3B,QAAQ,GAAGD,OAASoD,OAAOxB,EAAI,GAAG3B,QAAQ,GAAGD,UAG5EiB,EAAS,MAAS0B,MAAM1B,EAAS,QAA4BmC,OAAOxB,EAAI,GAAG3B,QAAQ,GAAGkB,OAA3CF,EAAS,QACpDA,EAAS,MAAOmC,OAAOxB,EAAI,GAAG3B,QAAQ2B,EAAI,GAAGnB,OAAS,GAAGU,QACzDF,EAAS,OAAQmC,OAAOxB,EAAI,GAAG3B,QAAQ,GAAGkB,OAASiC,OAAOxB,EAAI,GAAG3B,QAAQ,GAAGkB,QAGhF,IAAIkC,GAAiBzB,EAAIN,KAAK,mBACD,IAAzB+B,EAAe5C,SAEqC,UAAhDmB,EAAI,GAAGE,aAAa,wBACpBb,EAAS,QAASoC,EAAe,GAAGrD,OAGpCiB,EAAS,QAASoC,EAAetB,YAOzCd,GAAS,QAASW,EAAIG,OAS9B,GAAIuB,GAA8B,OAApBtC,EAAK,GAAGa,SAAoB,MAAQ,MAClD7B,IAEA,IAAIuD,GAAO,uGAAyGlF,EAAEoB,OAAOC,KAAKC,WAAa,uKAAyKtB,EAAEoB,OAAOC,KAAKE,YAAc,uDAAyDqB,EAAS,OAAS,oBAAsBA,EAAS,OAAS,oBAAsBA,EAAS,SAAW,qKACjfD,GAAKwC,OAAOD,EAAKE,QAAQ,cAAezD,GAAOyD,QAAQ,gBAAiBH,IAGnEhB,IACDtB,EAAKM,KAAK,iBAAiBiB,IAAI,QAAS,SACxCvB,EAAKM,KAAK,oBAAoBe,SAAS,uBACvCrB,EAAKM,KAAK,iBAAiBe,SAAS,qBAGhB,QAApBpB,EAAS,QACTD,EAAKqB,SAAS,eAAeqB,YAAY,aAGzC1C,EAAKqB,SAAS,aAAaqB,YAAY,eAG3CzC,EAAS,OAAQ0C,KAAKC,MAAMD,KAAKE,UAAU7C,EAAKF,UAGpD,GAAIgD,GAA6B,QAApB7C,EAAS,OAMjB6C,IACD9C,EAAKM,KAAK,mCAAmCyC,OAAO9C,EAAS,cAIjE,IAAII,GAAQL,EAAKM,KAAK,gBACtB,IAAIwC,EAAQ,CAMR,IAAI,GAJApB,GAAOzB,EAAS,QAChB+C,EAAQ/C,EAAS,OAASA,EAAS,OAEnCgD,EAAM,GACFC,EAAI,EAAGA,EAAGF,EAAOE,IACrBD,GAAOvB,CAGXrB,GAAMC,KAAK,OAAO6C,KAAKF,GAGvBhD,EAAS,YAAaI,EAAM+C,SAAWnD,EAAS,OAASA,EAAS,aAIlEI,GAAM+C,MAAMnD,EAAS,cAAgBA,EAAS,OAASA,EAAS,SAAS8C,OAAO9C,EAAS,cAK7F,IAAIoD,GAAc,iBAAmB,EAAQ,GAAK,OASlD,IARIpD,EAAS,YACTD,EAAKM,KAAK,oBAAoBe,SAASgC,GAGvCrD,EAAKM,KAAK,oBAAoBoC,YAAYW,GAIrB,MAArBpD,EAAS,SAAkB,CAC3B,GAAIqD,IAASrD,EAAS,SAAWA,EAAS,QAAUA,EAAS,YAC7DD,GAAKM,KAAK,oBAAoB8C,MAAME,GAIxC,GAAIC,GAAWvD,EAAKM,KAAK,gBACrBiD,GAASzD,KAAK,YAAa,GAC3ByD,EAASC,KAAK,QAAS,SAAUC,GAC7BA,EAAEjF,iBAEF+E,EAASG,MAET,IAAInG,GAAQF,EAAEsG,MAAM,cAEpB,OADA3D,GAAKgB,QAAQzD,IACTA,EAAMqG,uBAIV5D,EAAKvB,OAAO,QAAS,UACrBuB,GAAKgB,QAAQ,YACdlB,KAAK,SAAS,EAKrB,IAAI+D,GAAe,SAAUvB,EAAS/E,GAClC,GAAIuG,GAASvG,EAAoB,eAAIA,EAAMG,eAAe,GAAGoG,MAAQvG,EAAMuG,MAEvEC,EAAUD,EAAQzG,EAAEiF,GAAS0B,SAASC,IAK1C,OAJK3C,KAAOyC,EAAU1D,EAAM+C,QAAUW,GAClCA,EAAU1D,EAAM+C,UAAWW,EAAU1D,EAAM+C,SAC3CW,EAAU,IAAKA,EAAU,GAEtBT,EAAQ7B,KAAKyC,KAAKH,EAAU9D,EAAS,cAAgB,EAAIA,EAAS,WAIzEkE,EAAW,SAAUb,GACrB,GAAIc,GAAId,EAAQrD,EAAS,aAAeA,EAAS,QAC7CoE,EAAIhE,EAAMC,KAAK,gBACnB,IAAI+D,EAAEvE,KAAK,UAAYsE,EAAG,CACtB/D,EAAMC,KAAK,oBAAoB4B,OAC/BmC,EAAEjB,MAAMgB,GAAGE,OAAOxE,KAAK,QAASsE,EAChC,IAAItE,IAASwD,EAAQrD,EAAS,QAAWA,EAAS,OAClDD,GAAKgB,QAAQ,QAASlB,GAAMkB,QAAQ,OAAQlB,KAIhDyE,EAAe,SAAUpE,GACzB,GAAI5C,GAAQF,EAAEsG,MAAM,cAEpB,OADA3D,GAAKgB,QAAQzD,GAAQ4C,KACjB5C,EAAMqG,uBAIV3D,EAAS,QAASE,GACdF,EAAS,gBAEc,UAAnBW,EAAI,GAAGC,UAAwE,UAAhDD,EAAI,GAAGE,aAAa,wBACnDzD,EAAE4C,EAAS,eAAeU,KAAK,gBAAiBR,GAAOa,QAAQ,UAG/D3D,EAAE4C,EAAS,eAAec,IAAIZ,GAAOa,QAAQ,WAGjDf,EAAS,cACTI,EAAMC,KAAK,oBAAoBoC,YAAYW,GAC3CpD,EAAS,YAAY,IAEzBI,EAAMC,KAAK,iBAAiB4B,OAC5B7B,EAAMC,KAAK,oBAAoB8C,MAAMjD,EAAQF,EAAS,aAAgBA,EAAS,OAASA,EAAS,cAAeqE,OAChHtE,EAAKgB,QAAQ,SAAU,OAAOA,QAAQ,QAAS,OAAOA,QAAQ,SAAUb,KACjE,GAGNF,GAAS,YA8CVsD,EAASrB,QA1CJjC,EAAS,cACVsD,EAASrB,OAIRjC,EAAS,WACVI,EAAMmD,KAAK,qBAAsBlG,GACjC+C,EAAMmE,UAAU,SAAUf,GACtB,GAAIH,GAAQO,EAAarE,KAAMiE,EAC/BU,GAASb,KAGbjD,EAAMoE,WAAW,SAAUhB,GACvBpD,EAAMC,KAAK,iBAAiB4B,OAAOkB,MAAM,GAAGtD,KAAK,QAAS,IAC1DE,EAAKgB,QAAQ,SAAU,OAAOA,QAAQ,QAAS,OAC/CX,EAAMC,KAAK,oBAAoBgE,SAGnCjE,EAAMqE,QAAQ,SAAUjB,GACpB,GAAIH,GAAQO,EAAarE,KAAMiE,GAC3BtD,EAASmD,EAAQrD,EAAS,QAAWA,EAAS,MAClDsE,GAAapE,GACbE,EAAMqD,SAIVrD,EAAMsE,MAAM,SAAUlB,GACH,IAAXA,EAAEmB,OAAenB,EAAEmB,QAAUtD,EAAM,GAAK,KACxCiD,EAAa9C,KAAKR,IAAIhB,EAAS,SAAWA,EAAS,QAASA,EAAS,SAE1D,IAAXwD,EAAEmB,OAAenB,EAAEmB,QAAUtD,EAAM,GAAK,KACxCiD,EAAa9C,KAAKP,IAAIjB,EAAS,SAAWA,EAAS,QAASA,EAAS,WAI7EA,EAAS,SAAS,IAElBA,EAAS,cACTsD,EAASe,QAOjBjE,EAAME,KAAK,gBAAiBN,EAAS,gBA2B7C5C,EAAEwB,GAAGJ,OAAOoB,UAAaoB,IAAK,EAAGC,IAAK,EAAGC,KAAM,GAAKjC,KAAM,KAAMwC,KAAM,IAAKK,UAAW,GAAIC,WAAY,GAAIJ,UAAU,EAAOC,WAAW,EAAMI,UAAU,GAGtJ5E,EAAE,WAAcA,EAAE,2BAA2BoB,YAE9CoG","file":"jquery.rateit.min.js","sourcesContent":["/*! RateIt | v1.1.0 / 10/20/2016\r\n https://github.com/gjunge/rateit.js | Twitter: @gjunge\r\n*/\r\n(function ($) {\r\n $.rateit = {\r\n aria: {\r\n resetLabel: 'reset rating',\r\n ratingLabel: 'rating'\r\n }\r\n };\r\n\r\n $.fn.rateit = function (p1, p2) {\r\n //quick way out.\r\n var index = 1;\r\n var options = {}; var mode = 'init';\r\n var capitaliseFirstLetter = function (string) {\r\n return string.charAt(0).toUpperCase() + string.substr(1);\r\n };\r\n\r\n if (this.length === 0) { return this; }\r\n\r\n\r\n var tp1 = $.type(p1);\r\n if (tp1 == 'object' || p1 === undefined || p1 === null) {\r\n options = $.extend({}, $.fn.rateit.defaults, p1); //wants to init new rateit plugin(s).\r\n }\r\n else if (tp1 == 'string' && p1 !== 'reset' && p2 === undefined) {\r\n return this.data('rateit' + capitaliseFirstLetter(p1)); //wants to get a value.\r\n }\r\n else if (tp1 == 'string') {\r\n mode = 'setvalue';\r\n }\r\n\r\n return this.each(function () {\r\n var item = $(this);\r\n\r\n\r\n //shorten all the item.data('rateit-XXX'), will save space in closure compiler, will be like item.data('XXX') will become x('XXX')\r\n var itemdata = function (key, value) {\r\n\r\n if (value != null) {\r\n //update aria values\r\n var ariakey = 'aria-value' + ((key == 'value') ? 'now' : key);\r\n var range = item.find('.rateit-range');\r\n if (range.attr(ariakey) != undefined) {\r\n range.attr(ariakey, value);\r\n }\r\n\r\n }\r\n\r\n arguments[0] = 'rateit' + capitaliseFirstLetter(key);\r\n return item.data.apply(item, arguments); ////Fix for WI: 523\r\n };\r\n\r\n //handle programmatic reset\r\n if (p1 == 'reset') {\r\n var setup = itemdata('init'); //get initial value\r\n for (var prop in setup) {\r\n item.data(prop, setup[prop]);\r\n }\r\n\r\n if (itemdata('backingfld')) { //reset also backingfield\r\n var fld = $(itemdata('backingfld'));\r\n // If backing field is a select box with valuesrc option set to \"index\", reset its selectedIndex property; otherwise, reset its value.\r\n if (fld[0].nodeName == 'SELECT' && fld[0].getAttribute('data-rateit-valuesrc') === 'index') {\r\n fld.prop('selectedIndex', itemdata('value'));\r\n }\r\n else {\r\n fld.val(itemdata('value'));\r\n }\r\n fld.trigger('change');\r\n if (fld[0].min) { fld[0].min = itemdata('min'); }\r\n if (fld[0].max) { fld[0].max = itemdata('max'); }\r\n if (fld[0].step) { fld[0].step = itemdata('step'); }\r\n }\r\n item.trigger('reset');\r\n }\r\n\r\n //add the rate it class.\r\n if (!item.hasClass('rateit')) { item.addClass('rateit'); }\r\n\r\n var ltr = item.css('direction') != 'rtl';\r\n\r\n // set value mode\r\n if (mode == 'setvalue') {\r\n if (!itemdata('init')) { throw 'Can\\'t set value before init'; }\r\n\r\n\r\n //if readonly now and it wasn't readonly, remove the eventhandlers.\r\n if (p1 == 'readonly' && p2 == true && !itemdata('readonly')) {\r\n item.find('.rateit-range').unbind();\r\n itemdata('wired', false);\r\n }\r\n //when we receive a null value, reset the score to its min value.\r\n if (p1 == 'value') {\r\n p2 = (p2 == null) ? itemdata('min') : Math.max(itemdata('min'), Math.min(itemdata('max'), p2));\r\n }\r\n if (itemdata('backingfld')) {\r\n //if we have a backing field, check which fields we should update. \r\n //In case of input[type=range], although we did read its attributes even in browsers that don't support it (using fld.attr())\r\n //we only update it in browser that support it (&& fld[0].min only works in supporting browsers), not only does it save us from checking if it is range input type, it also is unnecessary.\r\n var fld = $(itemdata('backingfld'));\r\n // If backing field is a select box with valuesrc option set to \"index\", update its selectedIndex property; otherwise, update its value.\r\n if (fld[0].nodeName == 'SELECT' && fld[0].getAttribute('data-rateit-valuesrc') === 'index') {\r\n if (p1 == 'value') { fld.prop('selectedIndex', p2); }\r\n }\r\n else {\r\n if (p1 == 'value') { fld.val(p2); }\r\n }\r\n if (p1 == 'min' && fld[0].min) { fld[0].min = p2; }\r\n if (p1 == 'max' && fld[0].max) { fld[0].max = p2;}\r\n if (p1 == 'step' && fld[0].step) { fld[0].step = p2; }\r\n }\r\n\r\n itemdata(p1, p2);\r\n }\r\n\r\n\r\n //init rateit plugin\r\n if (!itemdata('init')) {\r\n\r\n //get our values, either from the data-* html5 attribute or from the options.\r\n itemdata('mode', itemdata('mode') || options.mode)\r\n itemdata('icon', itemdata('icon') || options.icon)\r\n itemdata('min', isNaN(itemdata('min')) ? options.min : itemdata('min'));\r\n itemdata('max', isNaN(itemdata('max')) ? options.max : itemdata('max'));\r\n itemdata('step', itemdata('step') || options.step);\r\n itemdata('readonly', itemdata('readonly') !== undefined ? itemdata('readonly') : options.readonly);\r\n itemdata('resetable', itemdata('resetable') !== undefined ? itemdata('resetable') : options.resetable);\r\n itemdata('backingfld', itemdata('backingfld') || options.backingfld);\r\n itemdata('starwidth', itemdata('starwidth') || options.starwidth);\r\n itemdata('starheight', itemdata('starheight') || options.starheight);\r\n itemdata('value', Math.max(itemdata('min'), Math.min(itemdata('max'), (!isNaN(itemdata('value')) ? itemdata('value') : (!isNaN(options.value) ? options.value : options.min)))));\r\n itemdata('ispreset', itemdata('ispreset') !== undefined ? itemdata('ispreset') : options.ispreset);\r\n //are we LTR or RTL?\r\n\r\n if (itemdata('backingfld')) {\r\n //if we have a backing field, hide it, override defaults if range or select.\r\n var fld = $(itemdata('backingfld')).hide();\r\n\r\n if (fld.attr('disabled') || fld.attr('readonly')) {\r\n itemdata('readonly', true); //http://rateit.codeplex.com/discussions/362055 , if a backing field is disabled or readonly at instantiation, make rateit readonly.\r\n }\r\n\r\n if (fld[0].nodeName == 'INPUT') {\r\n if (fld[0].type == 'range' || fld[0].type == 'text') { //in browsers not support the range type, it defaults to text\r\n\r\n itemdata('min', parseInt(fld.attr('min')) || itemdata('min')); //if we would have done fld[0].min it wouldn't have worked in browsers not supporting the range type.\r\n itemdata('max', parseInt(fld.attr('max')) || itemdata('max'));\r\n itemdata('step', parseInt(fld.attr('step')) || itemdata('step'));\r\n }\r\n }\r\n if (fld[0].nodeName == 'SELECT' && fld[0].options.length > 1) {\r\n // If backing field is a select box with valuesrc option set to \"index\", use the indexes of its options; otherwise, use the values.\r\n if (fld[0].getAttribute('data-rateit-valuesrc') === 'index') {\r\n itemdata('min', (!isNaN(itemdata('min')) ? itemdata('min') : Number(fld[0].options[0].index)));\r\n itemdata('max', Number(fld[0].options[fld[0].length - 1].index));\r\n itemdata('step', Number(fld[0].options[1].index) - Number(fld[0].options[0].index));\r\n }\r\n else {\r\n itemdata('min', (!isNaN(itemdata('min')) ? itemdata('min') : Number(fld[0].options[0].value)));\r\n itemdata('max', Number(fld[0].options[fld[0].length - 1].value));\r\n itemdata('step', Number(fld[0].options[1].value) - Number(fld[0].options[0].value));\r\n }\r\n //see if we have a option that as explicity been selected\r\n var selectedOption = fld.find('option[selected]');\r\n if (selectedOption.length == 1) {\r\n // If backing field is a select box with valuesrc option set to \"index\", use the index of selected option; otherwise, use the value.\r\n if (fld[0].getAttribute('data-rateit-valuesrc') === 'index') {\r\n itemdata('value', selectedOption[0].index);\r\n }\r\n else {\r\n itemdata('value', selectedOption.val());\r\n }\r\n }\r\n }\r\n else {\r\n //if it is not a select box, we can get's it's value using the val function. \r\n //If it is a selectbox, we always get a value (the first one of the list), even if it was not explicity set.\r\n itemdata('value', fld.val());\r\n }\r\n\r\n \r\n }\r\n\r\n \r\n\r\n //Create the necessary tags. For ARIA purposes we need to give the items an ID. So we use an internal index to create unique ids\r\n var element = item[0].nodeName == 'DIV' ? 'div' : 'span';\r\n index++;\r\n\r\n var html = '<button id=\"rateit-reset-{{index}}\" type=\"button\" data-role=\"none\" class=\"rateit-reset\" aria-label=\"' + $.rateit.aria.resetLabel + '\" aria-controls=\"rateit-range-{{index}}\"><span></span></button><{{element}} id=\"rateit-range-{{index}}\" class=\"rateit-range\" tabindex=\"0\" role=\"slider\" aria-label=\"' + $.rateit.aria.ratingLabel + '\" aria-owns=\"rateit-reset-{{index}}\" aria-valuemin=\"' + itemdata('min') + '\" aria-valuemax=\"' + itemdata('max') + '\" aria-valuenow=\"' + itemdata('value') + '\"><{{element}} class=\"rateit-empty\"></{{element}}><{{element}} class=\"rateit-selected\"></{{element}}><{{element}} class=\"rateit-hover\"></{{element}}></{{element}}>';\r\n item.append(html.replace(/{{index}}/gi, index).replace(/{{element}}/gi, element));\r\n\r\n //if we are in RTL mode, we have to change the float of the \"reset button\"\r\n if (!ltr) {\r\n item.find('.rateit-reset').css('float', 'right');\r\n item.find('.rateit-selected').addClass('rateit-selected-rtl');\r\n item.find('.rateit-hover').addClass('rateit-hover-rtl');\r\n }\r\n\r\n if (itemdata('mode') == 'font') {\r\n item.addClass('rateit-font').removeClass('rateit-bg');\r\n }\r\n else {\r\n item.addClass('rateit-bg').removeClass('rateit-font');\r\n }\r\n\r\n itemdata('init', JSON.parse(JSON.stringify(item.data()))); //cheap way to create a clone\r\n }\r\n\r\n var isfont = itemdata('mode') == 'font';\r\n\r\n \r\n\r\n\r\n //resize the height of all elements, \r\n if (!isfont) {\r\n item.find('.rateit-selected, .rateit-hover').height(itemdata('starheight'));\r\n }\r\n\r\n\r\n var range = item.find('.rateit-range');\r\n if (isfont) {\r\n //fill the ranges with the icons\r\n var icon = itemdata('icon');\r\n var stars = itemdata('max') - itemdata('min');\r\n\r\n var txt = '';\r\n for(var i = 0; i< stars; i++){\r\n txt += icon;\r\n }\r\n \r\n range.find('> *').text(txt);\r\n \r\n\r\n itemdata('starwidth', range.width() / (itemdata('max') - itemdata('min')))\r\n }\r\n else {\r\n //set the range element to fit all the stars.\r\n range.width(itemdata('starwidth') * (itemdata('max') - itemdata('min'))).height(itemdata('starheight'));\r\n }\r\n\r\n\r\n //add/remove the preset class\r\n var presetclass = 'rateit-preset' + ((ltr) ? '' : '-rtl');\r\n if (itemdata('ispreset')) {\r\n item.find('.rateit-selected').addClass(presetclass);\r\n }\r\n else {\r\n item.find('.rateit-selected').removeClass(presetclass);\r\n }\r\n\r\n //set the value if we have it.\r\n if (itemdata('value') != null) {\r\n var score = (itemdata('value') - itemdata('min')) * itemdata('starwidth');\r\n item.find('.rateit-selected').width(score);\r\n }\r\n\r\n //setup the reset button\r\n var resetbtn = item.find('.rateit-reset');\r\n if (resetbtn.data('wired') !== true) {\r\n resetbtn.bind('click', function (e) {\r\n e.preventDefault();\r\n\r\n resetbtn.blur();\r\n\r\n var event = $.Event('beforereset');\r\n item.trigger(event);\r\n if (event.isDefaultPrevented()) {\r\n return false;\r\n }\r\n\r\n item.rateit('value', null);\r\n item.trigger('reset');\r\n }).data('wired', true);\r\n\r\n }\r\n\r\n //this function calculates the score based on the current position of the mouse.\r\n var calcRawScore = function (element, event) {\r\n var pageX = (event.changedTouches) ? event.changedTouches[0].pageX : event.pageX;\r\n\r\n var offsetx = pageX - $(element).offset().left;\r\n if (!ltr) { offsetx = range.width() - offsetx };\r\n if (offsetx > range.width()) { offsetx = range.width(); }\r\n if (offsetx < 0) { offsetx = 0; }\r\n\r\n return score = Math.ceil(offsetx / itemdata('starwidth') * (1 / itemdata('step')));\r\n };\r\n\r\n //sets the hover element based on the score.\r\n var setHover = function (score) {\r\n var w = score * itemdata('starwidth') * itemdata('step');\r\n var h = range.find('.rateit-hover');\r\n if (h.data('width') != w) {\r\n range.find('.rateit-selected').hide();\r\n h.width(w).show().data('width', w);\r\n var data = [(score * itemdata('step')) + itemdata('min')];\r\n item.trigger('hover', data).trigger('over', data);\r\n }\r\n };\r\n\r\n var setSelection = function (value) {\r\n var event = $.Event('beforerated');\r\n item.trigger(event, [value]);\r\n if (event.isDefaultPrevented()) {\r\n return false;\r\n }\r\n\r\n itemdata('value', value);\r\n if (itemdata('backingfld')) {\r\n // If backing field is a select box with valuesrc option set to \"index\", update its selectedIndex property; otherwise, update its value.\r\n if (fld[0].nodeName == 'SELECT' && fld[0].getAttribute('data-rateit-valuesrc') === 'index') {\r\n $(itemdata('backingfld')).prop('selectedIndex', value).trigger('change');\r\n }\r\n else {\r\n $(itemdata('backingfld')).val(value).trigger('change');\r\n }\r\n }\r\n if (itemdata('ispreset')) { //if it was a preset value, unset that.\r\n range.find('.rateit-selected').removeClass(presetclass);\r\n itemdata('ispreset', false);\r\n }\r\n range.find('.rateit-hover').hide();\r\n range.find('.rateit-selected').width(value * itemdata('starwidth') - (itemdata('min') * itemdata('starwidth'))).show();\r\n item.trigger('hover', [null]).trigger('over', [null]).trigger('rated', [value]);\r\n return true;\r\n };\r\n\r\n if (!itemdata('readonly')) {\r\n //if we are not read only, add all the events\r\n\r\n //if we have a reset button, set the event handler.\r\n if (!itemdata('resetable')) {\r\n resetbtn.hide();\r\n }\r\n\r\n //when the mouse goes over the range element, we set the \"hover\" stars.\r\n if (!itemdata('wired')) {\r\n range.bind('touchmove touchend', touchHandler); //bind touch events\r\n range.mousemove(function (e) {\r\n var score = calcRawScore(this, e);\r\n setHover(score);\r\n });\r\n //when the mouse leaves the range, we have to hide the hover stars, and show the current value.\r\n range.mouseleave(function (e) {\r\n range.find('.rateit-hover').hide().width(0).data('width', '');\r\n item.trigger('hover', [null]).trigger('over', [null]);\r\n range.find('.rateit-selected').show();\r\n });\r\n //when we click on the range, we have to set the value, hide the hover.\r\n range.mouseup(function (e) {\r\n var score = calcRawScore(this, e);\r\n var value = (score * itemdata('step')) + itemdata('min');\r\n setSelection(value);\r\n range.blur();\r\n });\r\n\r\n //support key nav\r\n range.keyup(function (e) {\r\n if (e.which == 38 || e.which == (ltr ? 39 : 37)) {\r\n setSelection(Math.min(itemdata('value') + itemdata('step'), itemdata('max')));\r\n }\r\n if (e.which == 40 || e.which == (ltr ? 37 : 39)) {\r\n setSelection(Math.max(itemdata('value') - itemdata('step'), itemdata('min')));\r\n }\r\n });\r\n\r\n itemdata('wired', true);\r\n }\r\n if (itemdata('resetable')) {\r\n resetbtn.show();\r\n }\r\n }\r\n else {\r\n resetbtn.hide();\r\n }\r\n\r\n range.attr('aria-readonly', itemdata('readonly'));\r\n });\r\n };\r\n\r\n //touch converter http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript/\r\n function touchHandler(event) {\r\n\r\n var touches = event.originalEvent.changedTouches,\r\n first = touches[0],\r\n type = \"\";\r\n switch (event.type) {\r\n case \"touchmove\": type = \"mousemove\"; break;\r\n case \"touchend\": type = \"mouseup\"; break;\r\n default: return;\r\n }\r\n\r\n var simulatedEvent = document.createEvent(\"MouseEvent\");\r\n simulatedEvent.initMouseEvent(type, true, true, window, 1,\r\n first.screenX, first.screenY,\r\n first.clientX, first.clientY, false,\r\n false, false, false, 0/*left*/, null);\r\n\r\n first.target.dispatchEvent(simulatedEvent);\r\n event.preventDefault();\r\n };\r\n\r\n //some default values.\r\n $.fn.rateit.defaults = { min: 0, max: 5, step: 0.5, mode: 'bg', icon: '★', starwidth: 16, starheight: 16, readonly: false, resetable: true, ispreset: false };\r\n\r\n //invoke it on all .rateit elements. This could be removed if not wanted.\r\n $(function () { $('div.rateit, span.rateit').rateit(); });\r\n\r\n})(jQuery);"]}
|
|
js/yasr-admin.js
CHANGED
@@ -16,17 +16,24 @@ You should have received a copy of the GNU General Public License
|
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>
|
17 |
*/
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
/****** Yasr Metabox overall rating ******/
|
20 |
|
21 |
-
function yasrDisplayTopRightMetabox(defaultbox, postid, nonceOverall, nonceSnippet, overallRating
|
22 |
|
23 |
-
if (defaultbox
|
24 |
|
25 |
-
yasrPrintEventSendOverallWithStars(postid, nonceOverall, overallRating
|
26 |
|
27 |
} //end if if (defaultbox == 'stars' )
|
28 |
|
29 |
-
else if (defaultbox
|
30 |
|
31 |
yasrPrintEventSendOverallWithNumbers(postid, nonceOverall);
|
32 |
|
@@ -36,94 +43,44 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
36 |
|
37 |
} //End function yasr_display_metabox
|
38 |
|
39 |
-
|
40 |
//This is for the stars
|
41 |
-
function yasrPrintEventSendOverallWithStars(postid, nonce, overallRating
|
42 |
-
|
43 |
-
if (jqueryDisabled == 'yes') {
|
44 |
-
|
45 |
-
//Convert string to number
|
46 |
-
overallRating = parseFloat(overallRating);
|
47 |
-
|
48 |
-
raterJs({
|
49 |
-
starSize: 32,
|
50 |
-
step: 0.1,
|
51 |
-
showToolTip: false,
|
52 |
-
rating: overallRating,
|
53 |
-
readOnly: false,
|
54 |
-
element: document.querySelector("#yasr-rater-overall"),
|
55 |
-
rateCallback: function rateCallback(rating, done) {
|
56 |
|
57 |
-
|
|
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
-
var data = {
|
64 |
-
action: 'yasr_send_overall_rating',
|
65 |
-
nonce: nonce,
|
66 |
-
rating: rating,
|
67 |
-
post_id: postid
|
68 |
-
};
|
69 |
-
|
70 |
-
//Send value to the Server
|
71 |
-
jQuery.post(ajaxurl, data, function(response) {
|
72 |
-
jQuery('#loader-overall-rating').hide();
|
73 |
-
jQuery('#yasr_rateit_overall_value').text(response);
|
74 |
-
}) ;
|
75 |
-
|
76 |
-
done();
|
77 |
-
}
|
78 |
-
});
|
79 |
-
|
80 |
-
}
|
81 |
-
|
82 |
-
else {
|
83 |
-
|
84 |
-
/** This is for jquery rateit **/
|
85 |
-
jQuery('#yasr_rateit_overall').on('rated', function () {
|
86 |
jQuery('#loader-overall-rating').show();
|
87 |
-
var el = jQuery(this);
|
88 |
-
var value = el.rateit('value');
|
89 |
-
var value = value.toFixed(1); //
|
90 |
-
|
91 |
-
var data = {
|
92 |
-
action: 'yasr_send_overall_rating',
|
93 |
-
nonce: nonce,
|
94 |
-
rating: value,
|
95 |
-
post_id: postid
|
96 |
-
};
|
97 |
-
|
98 |
-
//Send value to the Server
|
99 |
-
jQuery.post(ajaxurl, data, function (response) {
|
100 |
-
jQuery('#loader-overall-rating').hide();
|
101 |
-
jQuery('#yasr_rateit_overall_value').text(response);
|
102 |
-
});
|
103 |
-
|
104 |
-
});
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
var value = '-1';
|
110 |
|
111 |
var data = {
|
112 |
action: 'yasr_send_overall_rating',
|
113 |
nonce: nonce,
|
114 |
-
rating:
|
115 |
post_id: postid
|
116 |
};
|
117 |
|
118 |
//Send value to the Server
|
119 |
-
jQuery.post(ajaxurl, data, function
|
120 |
jQuery('#loader-overall-rating').hide();
|
121 |
jQuery('#yasr_rateit_overall_value').text(response);
|
122 |
-
});
|
123 |
|
124 |
-
|
|
|
|
|
125 |
|
126 |
-
}
|
127 |
|
128 |
}
|
129 |
|
@@ -208,154 +165,147 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
208 |
|
209 |
/****** Yasr Metabox Multiple Rating ******/
|
210 |
|
211 |
-
|
212 |
|
213 |
-
|
214 |
|
215 |
-
|
216 |
|
217 |
-
|
218 |
|
219 |
-
|
220 |
-
var data_id = {
|
221 |
-
action: 'yasr_send_id_nameset',
|
222 |
-
set_id: jQuery('#select_set').val(),
|
223 |
-
post_id: postid
|
224 |
-
}
|
225 |
|
226 |
-
|
227 |
|
228 |
-
|
229 |
-
jQuery.post(ajaxurl, data_id, function(response) {
|
230 |
-
jQuery("#yasr-loader-select-multi-set").hide();
|
231 |
-
jQuery('#yasr_rateit_multi_rating').html(response);
|
232 |
-
jQuery('.rateit').rateit();
|
233 |
-
|
234 |
-
jQuery('.multi').on('rated', function() {
|
235 |
-
var el = jQuery(this);
|
236 |
-
var value = el.rateit('value');
|
237 |
-
var value = value.toFixed(1);
|
238 |
-
var idField = el.attr('id');
|
239 |
-
var setType = jQuery('#select_set').val();
|
240 |
-
|
241 |
-
jQuery("#yasr-loader-multi-set-field-"+idField).show();
|
242 |
-
|
243 |
-
var data = {
|
244 |
-
action: 'yasr_send_id_field_with_vote',
|
245 |
-
nonce: nonceMulti,
|
246 |
-
rating: value,
|
247 |
-
post_id: postid,
|
248 |
-
id_field: idField,
|
249 |
-
set_type: setType
|
250 |
-
};
|
251 |
-
|
252 |
-
//Send value to the Server
|
253 |
-
jQuery.post(ajaxurl, data, function() {
|
254 |
-
jQuery("#yasr-loader-multi-set-field-"+idField).hide();
|
255 |
-
});
|
256 |
-
});
|
257 |
|
|
|
|
|
258 |
|
259 |
-
|
260 |
-
var el = jQuery(this);
|
261 |
-
var value = '0';
|
262 |
-
var idField = el.attr('id');
|
263 |
-
var setType = jQuery('#select_set').val();
|
264 |
|
265 |
-
|
266 |
|
267 |
-
|
268 |
-
action: 'yasr_send_id_field_with_vote',
|
269 |
-
nonce: nonceMulti,
|
270 |
-
rating: value,
|
271 |
-
post_id: postid,
|
272 |
-
id_field: idField,
|
273 |
-
set_type: setType
|
274 |
-
};
|
275 |
|
276 |
-
|
277 |
-
jQuery.post(ajaxurl, data, function() {
|
278 |
-
jQuery("#yasr-loader-multi-set-field-"+idField).hide();
|
279 |
-
});
|
280 |
-
});
|
281 |
|
282 |
-
|
283 |
|
284 |
-
|
|
|
285 |
|
286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
|
288 |
}
|
289 |
|
290 |
-
|
|
|
291 |
|
292 |
-
|
|
|
293 |
|
294 |
-
|
295 |
-
|
296 |
-
set_id: setId,
|
297 |
-
post_id: postid
|
298 |
-
}
|
299 |
|
300 |
-
|
301 |
-
|
302 |
-
jQuery('#yasr_rateit_multi_rating').html(response);
|
303 |
-
jQuery('.rateit').rateit();
|
304 |
|
305 |
-
|
306 |
-
var el = jQuery(this);
|
307 |
-
var value = el.rateit('value');
|
308 |
-
var value = value.toFixed(1);
|
309 |
-
var idField = el.attr('id');
|
310 |
|
311 |
-
|
312 |
|
313 |
-
|
314 |
-
action: 'yasr_send_id_field_with_vote',
|
315 |
-
nonce: nonceMulti,
|
316 |
-
rating: value,
|
317 |
-
post_id: postid,
|
318 |
-
id_field: idField,
|
319 |
-
set_type: setId
|
320 |
-
};
|
321 |
|
322 |
-
|
323 |
-
|
324 |
-
jQuery("#yasr-loader-multi-set-field-"+idField).hide();
|
325 |
-
});
|
326 |
|
327 |
-
|
|
|
|
|
|
|
|
|
328 |
|
329 |
-
|
330 |
-
|
331 |
-
var value = '0';
|
332 |
-
var idField = el.attr('id');
|
333 |
-
var setType = setId
|
334 |
|
335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
|
337 |
var data = {
|
338 |
action: 'yasr_send_id_field_with_vote',
|
339 |
nonce: nonceMulti,
|
340 |
-
rating:
|
341 |
post_id: postid,
|
342 |
id_field: idField,
|
343 |
-
set_type:
|
344 |
};
|
345 |
|
346 |
-
|
347 |
-
jQuery.post(ajaxurl, data, function() {
|
348 |
-
|
349 |
});
|
350 |
|
351 |
-
|
|
|
|
|
352 |
|
353 |
});
|
354 |
|
355 |
-
}
|
356 |
|
|
|
357 |
|
358 |
-
|
359 |
|
360 |
/****** End Yasr Metabox Multple Rating ******/
|
361 |
|
@@ -366,7 +316,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
366 |
|
367 |
//-------------------General Settings Code---------------------
|
368 |
|
369 |
-
if (activeTab
|
370 |
|
371 |
if (autoInsertEnabled == 0) {
|
372 |
jQuery('.yasr-auto-insert-options-class').prop('disabled', true);
|
@@ -459,57 +409,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
459 |
|
460 |
});*/
|
461 |
|
462 |
-
|
463 |
-
|
464 |
-
//Second div code
|
465 |
-
|
466 |
-
//On click show proceed button
|
467 |
-
jQuery('#import-gdstar').on('click', function() {
|
468 |
-
jQuery('#yasr-import-gdstar-div').toggle();
|
469 |
-
});
|
470 |
-
|
471 |
-
//On click begin step1
|
472 |
-
jQuery('#import-button').on('click', function() {
|
473 |
-
|
474 |
-
jQuery('#yasr-loader-importer').show();
|
475 |
-
|
476 |
-
var data = {
|
477 |
-
action : 'yasr_import_step1'
|
478 |
-
};
|
479 |
-
|
480 |
-
jQuery.post(ajaxurl, data, function(response) {
|
481 |
-
jQuery('#yasr-loader-importer').hide();
|
482 |
-
jQuery('#result-import').html(response);
|
483 |
-
});
|
484 |
-
|
485 |
-
}); //End step1
|
486 |
-
|
487 |
-
jQuery('#result-import').on('click', '.yasr-result-step-1', function() {
|
488 |
-
//Now we are going to prepare another ajax call to check if multiple set exists
|
489 |
-
|
490 |
-
jQuery('#yasr-loader-importer2').show();
|
491 |
-
|
492 |
-
var data = {
|
493 |
-
action: 'yasr_import_multi_set'
|
494 |
-
};
|
495 |
-
|
496 |
-
jQuery.post(ajaxurl, data, function(response) {
|
497 |
-
jQuery('#yasr-loader-importer2').hide();
|
498 |
-
jQuery('#result-import').append(response);
|
499 |
-
});
|
500 |
-
|
501 |
-
}); //End second ajax call */
|
502 |
-
|
503 |
-
//Reload page after importing is done
|
504 |
-
jQuery('#result-import').on('click', '.yasr-result-step-2', function() {
|
505 |
-
location.reload(true);
|
506 |
-
});
|
507 |
-
|
508 |
} //End if general settings
|
509 |
|
510 |
//--------------Multi Sets Page ------------------
|
511 |
|
512 |
-
if (activeTab
|
513 |
|
514 |
jQuery('#yasr-multi-set-doc-link').on('click', function() {
|
515 |
jQuery('#yasr-multi-set-doc-box').toggle("slow");
|
@@ -598,7 +502,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
598 |
} //end if active_tab=='manage_multi'
|
599 |
|
600 |
|
601 |
-
if (activeTab
|
602 |
|
603 |
jQuery('#yasr-color-scheme-preview-link').on('click', function () {
|
604 |
jQuery('#yasr-color-scheme-preview').toggle('slow');
|
@@ -878,7 +782,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
878 |
|
879 |
} //End if
|
880 |
|
881 |
-
else if (nMultiSet==1) {
|
882 |
|
883 |
//Add shortcode for single set (if only 1 are found)
|
884 |
jQuery('#yasr-single-set').on("click", function(){
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>
|
17 |
*/
|
18 |
|
19 |
+
|
20 |
+
/*** Constant used by yasr
|
21 |
+
|
22 |
+
yasrCommonDataAdmin (loaderHtml)
|
23 |
+
|
24 |
+
***/
|
25 |
+
|
26 |
/****** Yasr Metabox overall rating ******/
|
27 |
|
28 |
+
function yasrDisplayTopRightMetabox(defaultbox, postid, nonceOverall, nonceSnippet, overallRating) {
|
29 |
|
30 |
+
if (defaultbox === 'stars' ) {
|
31 |
|
32 |
+
yasrPrintEventSendOverallWithStars(postid, nonceOverall, overallRating);
|
33 |
|
34 |
} //end if if (defaultbox == 'stars' )
|
35 |
|
36 |
+
else if (defaultbox === 'numbers') {
|
37 |
|
38 |
yasrPrintEventSendOverallWithNumbers(postid, nonceOverall);
|
39 |
|
43 |
|
44 |
} //End function yasr_display_metabox
|
45 |
|
|
|
46 |
//This is for the stars
|
47 |
+
function yasrPrintEventSendOverallWithStars(postid, nonce, overallRating) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
+
//Convert string to number
|
50 |
+
overallRating = parseFloat(overallRating);
|
51 |
|
52 |
+
raterJs({
|
53 |
+
starSize: 32,
|
54 |
+
step: 0.1,
|
55 |
+
showToolTip: false,
|
56 |
+
rating: overallRating,
|
57 |
+
readOnly: false,
|
58 |
+
element: document.getElementById("yasr-rater-overall"),
|
59 |
+
rateCallback: function rateCallback(rating, done) {
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
jQuery('#loader-overall-rating').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
+
var rating = rating.toFixed(1);
|
64 |
+
var rating = parseFloat(rating);
|
65 |
+
this.setRating(rating);
|
|
|
66 |
|
67 |
var data = {
|
68 |
action: 'yasr_send_overall_rating',
|
69 |
nonce: nonce,
|
70 |
+
rating: rating,
|
71 |
post_id: postid
|
72 |
};
|
73 |
|
74 |
//Send value to the Server
|
75 |
+
jQuery.post(ajaxurl, data, function(response) {
|
76 |
jQuery('#loader-overall-rating').hide();
|
77 |
jQuery('#yasr_rateit_overall_value').text(response);
|
78 |
+
}) ;
|
79 |
|
80 |
+
done();
|
81 |
+
}
|
82 |
+
});
|
83 |
|
|
|
84 |
|
85 |
}
|
86 |
|
165 |
|
166 |
/****** Yasr Metabox Multiple Rating ******/
|
167 |
|
168 |
+
function yasrAdminMultiSet(nMultiSet, postid, setId, nonceMulti){
|
169 |
|
170 |
+
nMultiSet = parseInt(nMultiSet);
|
171 |
|
172 |
+
if (nMultiSet === 1) {
|
173 |
|
174 |
+
yasrPrintAdminMultiSet(setId, postid, nonceMulti);
|
175 |
|
176 |
+
}
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
+
else {
|
179 |
|
180 |
+
jQuery('#yasr-button-select-set').on("click", function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
+
//get the multi data
|
183 |
+
var setId = jQuery('#select_set').val();
|
184 |
|
185 |
+
jQuery("#yasr-loader-select-multi-set").show();
|
|
|
|
|
|
|
|
|
186 |
|
187 |
+
yasrPrintAdminMultiSet(setId, postid, nonceMulti);
|
188 |
|
189 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
|
191 |
+
}
|
|
|
|
|
|
|
|
|
192 |
|
193 |
+
}
|
194 |
|
195 |
+
//print the table
|
196 |
+
function yasrPrintAdminMultiSet (setId, postid, nonceMulti) {
|
197 |
|
198 |
+
var data_id = {
|
199 |
+
action: 'yasr_send_id_nameset',
|
200 |
+
set_id: setId,
|
201 |
+
post_id: postid
|
202 |
+
};
|
203 |
+
|
204 |
+
jQuery.post(ajaxurl, data_id, function(response) {
|
205 |
+
|
206 |
+
//Hide the loader near the select
|
207 |
+
document.getElementById('yasr-loader-select-multi-set').style.display='none';
|
208 |
+
|
209 |
+
var yasrMultiSetValue = JSON.parse(response);
|
210 |
+
|
211 |
+
var content = '';
|
212 |
+
|
213 |
+
for (var i = 0; i < yasrMultiSetValue.length; i++) {
|
214 |
+
|
215 |
+
var valueName = yasrMultiSetValue[i]['value_name'];
|
216 |
+
var valueRating = yasrMultiSetValue[i]['value_rating'];
|
217 |
+
var valueID = yasrMultiSetValue[i]['value_id'];
|
218 |
+
|
219 |
+
content += '<tr>';
|
220 |
+
content += '<td>' + valueName + '</td>';
|
221 |
+
content += '<td><div class="yasr-multiset-admin" id="yasr-multiset-admin-' + valueID + '" data-rating="' + valueRating + '" data-multi-idfield="'+valueID+'"></div>';
|
222 |
+
content += '<span id="yasr-loader-multi-set-field-' + valueID + '" style="display: none">';
|
223 |
+
content += '<img src="'+yasrCommonDataAdmin.loaderHtml+'"></span>';
|
224 |
+
content += '</span>';
|
225 |
+
content += '</td>';
|
226 |
+
content += '</tr>';
|
227 |
+
|
228 |
+
var table = document.getElementById('yasr-table-multi-set-admin');
|
229 |
+
|
230 |
+
table.innerHTML = content;
|
231 |
|
232 |
}
|
233 |
|
234 |
+
//Show the text "Choose a vote"
|
235 |
+
document.getElementById('yasr-multi-set-admin-choose-text').style.display='block';
|
236 |
|
237 |
+
//Set rater for divs
|
238 |
+
yasrSetRaterAdminMulti (postid, setId, nonceMulti);
|
239 |
|
240 |
+
//Show shortcode
|
241 |
+
document.getElementById('yasr-multi-set-admin-explain').style.display='block';
|
|
|
|
|
|
|
242 |
|
243 |
+
document.getElementById('yasr-multi-set-admin-explain-with-id-readonly').innerHTML = '<strong>[yasr_multiset setid='+setId+']</strong>';
|
244 |
+
document.getElementById('yasr-multi-set-admin-explain-with-id-visitor').innerHTML = '<strong>[yasr_visitor_multiset setid='+setId+']</strong>';
|
|
|
|
|
245 |
|
246 |
+
});
|
|
|
|
|
|
|
|
|
247 |
|
248 |
+
return false; // prevent default click action from happening!
|
249 |
|
250 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
|
252 |
+
//Rater for multiset
|
253 |
+
function yasrSetRaterAdminMulti (postid, setId, nonceMulti) {
|
|
|
|
|
254 |
|
255 |
+
var yasrMultiSetAdmin = document.getElementsByClassName('yasr-multiset-admin');
|
256 |
+
|
257 |
+
for (var i=0; i<yasrMultiSetAdmin.length; i++) {
|
258 |
+
|
259 |
+
(function(i) {
|
260 |
|
261 |
+
var htmlId = yasrMultiSetAdmin.item(i).id;
|
262 |
+
var idField = yasrMultiSetAdmin.item(i).getAttribute('data-multi-idfield');
|
|
|
|
|
|
|
263 |
|
264 |
+
var elem = document.getElementById(htmlId);
|
265 |
+
|
266 |
+
raterJs({
|
267 |
+
starSize: 32,
|
268 |
+
step: 0.5,
|
269 |
+
showToolTip: false,
|
270 |
+
readOnly: false,
|
271 |
+
element: elem,
|
272 |
+
|
273 |
+
rateCallback: function rateCallback(rating, done) {
|
274 |
+
|
275 |
+
rating = rating.toFixed(1);
|
276 |
+
//Be sure is a number and not a string
|
277 |
+
rating = parseFloat(rating);
|
278 |
+
this.setRating(rating) //Set the rating
|
279 |
+
|
280 |
+
document.getElementById("yasr-loader-multi-set-field-" + idField).style.display = '';
|
281 |
+
|
282 |
+
jQuery("#yasr-loader-multi-set-field-" + idField).show();
|
283 |
|
284 |
var data = {
|
285 |
action: 'yasr_send_id_field_with_vote',
|
286 |
nonce: nonceMulti,
|
287 |
+
rating: rating,
|
288 |
post_id: postid,
|
289 |
id_field: idField,
|
290 |
+
set_type: setId
|
291 |
};
|
292 |
|
293 |
+
//Send value to the Server
|
294 |
+
jQuery.post(ajaxurl, data, function () {
|
295 |
+
document.getElementById("yasr-loader-multi-set-field-" + idField).style.display = 'none';
|
296 |
});
|
297 |
|
298 |
+
done();
|
299 |
+
|
300 |
+
}
|
301 |
|
302 |
});
|
303 |
|
304 |
+
})(i);
|
305 |
|
306 |
+
} //End for
|
307 |
|
308 |
+
}//End function
|
309 |
|
310 |
/****** End Yasr Metabox Multple Rating ******/
|
311 |
|
316 |
|
317 |
//-------------------General Settings Code---------------------
|
318 |
|
319 |
+
if (activeTab === 'general_settings') {
|
320 |
|
321 |
if (autoInsertEnabled == 0) {
|
322 |
jQuery('.yasr-auto-insert-options-class').prop('disabled', true);
|
409 |
|
410 |
});*/
|
411 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
} //End if general settings
|
413 |
|
414 |
//--------------Multi Sets Page ------------------
|
415 |
|
416 |
+
if (activeTab === 'manage_multi') {
|
417 |
|
418 |
jQuery('#yasr-multi-set-doc-link').on('click', function() {
|
419 |
jQuery('#yasr-multi-set-doc-box').toggle("slow");
|
502 |
} //end if active_tab=='manage_multi'
|
503 |
|
504 |
|
505 |
+
if (activeTab === 'style_options') {
|
506 |
|
507 |
jQuery('#yasr-color-scheme-preview-link').on('click', function () {
|
508 |
jQuery('#yasr-color-scheme-preview').toggle('slow');
|
782 |
|
783 |
} //End if
|
784 |
|
785 |
+
else if (nMultiSet == 1) {
|
786 |
|
787 |
//Add shortcode for single set (if only 1 are found)
|
788 |
jQuery('#yasr-single-set').on("click", function(){
|
js/yasr-front.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
|
2 |
/*** Constant used by yasr
|
3 |
|
4 |
-
yasrCommonData (postid, ajaxurl, loggedUser, visitorStatsEnabled, loaderHtml, tooltipValues
|
5 |
|
6 |
yasrMultiSetData (setType, nonce)
|
7 |
|
@@ -12,48 +12,36 @@ yasrMultiSetData (setType, nonce)
|
|
12 |
/****** Do this actions on document load ******/
|
13 |
document.addEventListener('DOMContentLoaded', function(event) {
|
14 |
|
15 |
-
//
|
|
|
|
|
|
|
16 |
|
17 |
-
|
|
|
18 |
|
19 |
-
|
20 |
-
var yasrRaterInDom = document.getElementsByClassName('yasr-rater-stars');
|
21 |
-
//If so, call the function to set the rating
|
22 |
-
if (yasrRaterInDom.length > 0) {
|
23 |
-
|
24 |
-
//load this on everypageload
|
25 |
-
yasrSetRatingOnLoad(yasrRaterInDom);
|
26 |
-
|
27 |
-
}
|
28 |
-
|
29 |
-
//check if shortcode yasr_visitor_votes is used
|
30 |
-
var yasrRaterVVInDom = document.getElementsByClassName('yasr-rater-stars-visitor-votes');
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
}
|
35 |
|
36 |
-
|
|
|
|
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
41 |
|
42 |
-
|
43 |
|
44 |
}
|
45 |
|
46 |
-
//if is defined yasrVisitorsVotesData means that the shortcode is used
|
47 |
-
if (typeof yasrVisitorsVotesData !== 'undefined') {
|
48 |
-
|
49 |
-
yasrVisitorsVotes ();
|
50 |
-
|
51 |
-
}
|
52 |
|
53 |
//Check to draw tooltips
|
54 |
-
if (yasrRaterVVInDom
|
55 |
|
56 |
-
if (yasrCommonData.visitorStatsEnabled
|
57 |
|
58 |
var yasrStatsInDom = document.getElementsByClassName('yasr-dashicons-visitor-stats');
|
59 |
|
@@ -65,10 +53,6 @@ document.addEventListener('DOMContentLoaded', function(event) {
|
|
65 |
|
66 |
}
|
67 |
|
68 |
-
if (typeof yasrMultiSetData !== 'undefined') {
|
69 |
-
yasrVisitorsMultiSet ();
|
70 |
-
}
|
71 |
-
|
72 |
if (typeof yasrMostHighestRanking !== 'undefined') {
|
73 |
|
74 |
//By default, hide the highest rated chart
|
@@ -79,113 +63,6 @@ document.addEventListener('DOMContentLoaded', function(event) {
|
|
79 |
});
|
80 |
|
81 |
|
82 |
-
|
83 |
-
/***** Functions for rateit shortcode *****/
|
84 |
-
|
85 |
-
/*** Yasr visitor Votes ***/
|
86 |
-
|
87 |
-
function yasrVisitorsVotes () {
|
88 |
-
|
89 |
-
jQuery('.rateit').bind('over', function (event, value) { jQuery(this).attr('title', yasrCommonData.tooltipValues[value-1]); });
|
90 |
-
|
91 |
-
//on vote...
|
92 |
-
jQuery('.yasr_visitor_votes_stars_div').on('rated', function() {
|
93 |
-
|
94 |
-
var el = jQuery(this);
|
95 |
-
var value = el.rateit('value');
|
96 |
-
var value = value.toFixed(1); //
|
97 |
-
|
98 |
-
var postid = jQuery( this ).data('postid');
|
99 |
-
var classSize = jQuery( this ).attr('class');
|
100 |
-
|
101 |
-
var voteIfUserAlredyRated = jQuery('#yasr-user-vote-'+postid).data('yasr-already-voted');
|
102 |
-
|
103 |
-
if (value < 1) {
|
104 |
-
jQuery('#yasr_visitor_votes_' + postid).html('You can\'t vote 0');
|
105 |
-
}
|
106 |
-
|
107 |
-
else {
|
108 |
-
|
109 |
-
jQuery('#yasr_visitor_votes_' + postid).html(yasrCommonData.loaderHtml);
|
110 |
-
|
111 |
-
var data = {
|
112 |
-
action: 'yasr_send_visitor_rating',
|
113 |
-
rating: value,
|
114 |
-
post_id: postid,
|
115 |
-
size: classSize,
|
116 |
-
nonce_visitor: yasrVisitorsVotesData.nonceVisitor
|
117 |
-
};
|
118 |
-
|
119 |
-
//Send value to the Server
|
120 |
-
jQuery.post(yasrCommonData.ajaxurl, data, function(response) {
|
121 |
-
//response
|
122 |
-
jQuery('#yasr_visitor_votes_' + postid).html(response);
|
123 |
-
jQuery('.rateit').rateit();
|
124 |
-
|
125 |
-
}) ;
|
126 |
-
|
127 |
-
} //End else value <1
|
128 |
-
|
129 |
-
});//End function insert/update vote
|
130 |
-
|
131 |
-
|
132 |
-
}
|
133 |
-
/*** End Yasr Visitor Votes ***/
|
134 |
-
|
135 |
-
function yasrVisitorsMultiSet () {
|
136 |
-
|
137 |
-
//will have field id and vote
|
138 |
-
var ratingObject = "";
|
139 |
-
|
140 |
-
//an array with all the ratingonjects
|
141 |
-
var ratingArray = [];
|
142 |
-
|
143 |
-
var postId = yasrCommonData.postid;
|
144 |
-
var setType = yasrMultiSetData.setType;
|
145 |
-
var nonce = yasrMultiSetData.nonceVisitor;
|
146 |
-
|
147 |
-
jQuery('.yasr-visitor-multi-'+postId+'-'+setType).on('rated', function() {
|
148 |
-
var el = jQuery(this);
|
149 |
-
var value = el.rateit('value');
|
150 |
-
var value = value.toFixed(1);
|
151 |
-
var idField = el.attr('id');
|
152 |
-
|
153 |
-
ratingObject = {
|
154 |
-
field: idField,
|
155 |
-
rating: value
|
156 |
-
};
|
157 |
-
|
158 |
-
//creating rating array
|
159 |
-
ratingArray.push(ratingObject);
|
160 |
-
|
161 |
-
});
|
162 |
-
|
163 |
-
jQuery('#yasr-send-visitor-multiset-'+postId+'-'+setType).on('click', function() {
|
164 |
-
|
165 |
-
jQuery('#yasr-send-visitor-multiset-'+postId+'-'+setType).hide();
|
166 |
-
|
167 |
-
jQuery('#yasr-loader-multiset-visitor-'+postId+'-'+setType).show();
|
168 |
-
|
169 |
-
var data = {
|
170 |
-
|
171 |
-
action: 'yasr_visitor_multiset_field_vote',
|
172 |
-
nonce: nonce,
|
173 |
-
post_id: postId,
|
174 |
-
rating: ratingArray,
|
175 |
-
set_type: setType
|
176 |
-
|
177 |
-
};
|
178 |
-
|
179 |
-
//Send value to the Server
|
180 |
-
jQuery.post(yasrCommonData.ajaxurl, data, function(response) {
|
181 |
-
jQuery('#yasr-loader-multiset-visitor-'+postId+'-'+setType).text(response);
|
182 |
-
});
|
183 |
-
|
184 |
-
});
|
185 |
-
|
186 |
-
} //End function
|
187 |
-
|
188 |
-
|
189 |
//This work on top10 ranking chart, show the highest rated and hide most rated
|
190 |
function yasrShowHighest () {
|
191 |
|
@@ -258,64 +135,6 @@ function yasrDrawTipsProgress (yasrStatsInDom) {
|
|
258 |
|
259 |
});
|
260 |
|
261 |
-
/**** This code works but not with IE ****/
|
262 |
-
|
263 |
-
/*const state = {
|
264 |
-
isFetching: false,
|
265 |
-
canFetch: true
|
266 |
-
}
|
267 |
-
|
268 |
-
//Create a new request
|
269 |
-
var yasrVVAjaxCall = new Request(yasrCommonData.ajaxurl, {
|
270 |
-
method: 'post',
|
271 |
-
headers: new Headers({
|
272 |
-
"Content-Type": "application/x-www-form-urlencoded"
|
273 |
-
}),
|
274 |
-
body: dataToSend
|
275 |
-
});
|
276 |
-
|
277 |
-
tippy(this, {
|
278 |
-
content: initialContent,
|
279 |
-
theme: 'yasr',
|
280 |
-
|
281 |
-
|
282 |
-
onShow(tip) {
|
283 |
-
if (state.isFetching || !state.canFetch) return
|
284 |
-
|
285 |
-
state.isFetching = true
|
286 |
-
state.canFetch = false
|
287 |
-
|
288 |
-
if (htmlId !== htmlIdChecked) {
|
289 |
-
|
290 |
-
try {
|
291 |
-
fetch(yasrVVAjaxCall)
|
292 |
-
.then(checkResponse)
|
293 |
-
.then(function (response) {
|
294 |
-
//return the new average rating
|
295 |
-
return response.json();
|
296 |
-
})
|
297 |
-
|
298 |
-
.then(function (data) {
|
299 |
-
tip.setContent(data);
|
300 |
-
})
|
301 |
-
.catch(function (err) {
|
302 |
-
console.log('Error with ajax call', err);
|
303 |
-
});
|
304 |
-
}
|
305 |
-
catch (e) {
|
306 |
-
tip.setContent("Fetch failed. ${e}")
|
307 |
-
} finally {
|
308 |
-
state.isFetching = false
|
309 |
-
}
|
310 |
-
}
|
311 |
-
|
312 |
-
},
|
313 |
-
onHidden(tip) {
|
314 |
-
state.canFetch = true
|
315 |
-
htmlIdChecked = htmlId;
|
316 |
-
}
|
317 |
-
})*/
|
318 |
-
|
319 |
})(i);
|
320 |
|
321 |
}
|
@@ -327,15 +146,6 @@ function yasrDrawTipsProgress (yasrStatsInDom) {
|
|
327 |
/****** End tooltipfunction ******/
|
328 |
|
329 |
|
330 |
-
// this should give support for all plugin that add content with ajax
|
331 |
-
jQuery( document ).ajaxComplete(function() {
|
332 |
-
|
333 |
-
jQuery('.rateit').rateit();
|
334 |
-
|
335 |
-
});
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
/**** ****/
|
340 |
|
341 |
//this is the function that print the overall rating shortcode, get overall rating and starsize
|
@@ -394,7 +204,7 @@ function yasrVisitorVotesFront (yasrRaterVVInDom) {
|
|
394 |
rateCallback: function rateCallback(rating, done) {
|
395 |
|
396 |
//show the loader
|
397 |
-
document.getElementById('
|
398 |
|
399 |
//Just leave 1 number after the .
|
400 |
rating = rating.toFixed(1);
|
@@ -406,69 +216,22 @@ function yasrVisitorVotesFront (yasrRaterVVInDom) {
|
|
406 |
action: 'yasr_send_visitor_rating',
|
407 |
rating: rating,
|
408 |
post_id: postId,
|
409 |
-
size: starSize,
|
410 |
nonce_visitor: nonce
|
411 |
};
|
412 |
|
|
|
|
|
|
|
413 |
//Send value to the Server
|
414 |
jQuery.post(yasrCommonData.ajaxurl, data, function (response) {
|
415 |
//decode json
|
416 |
response = JSON.parse(response);
|
417 |
-
document.getElementById('
|
418 |
-
raterJs({
|
419 |
-
starSize: starSize,
|
420 |
-
step: 1,
|
421 |
-
showToolTip: false,
|
422 |
-
rating: rating,
|
423 |
-
readOnly: true,
|
424 |
-
element: document.getElementById(htmlId)
|
425 |
-
});
|
426 |
|
427 |
});
|
428 |
|
429 |
done();
|
430 |
|
431 |
-
/* This code is working, but doesn't support IE
|
432 |
-
|
433 |
-
//Convert in a string
|
434 |
-
var dataToSend = jsObject_to_URLEncoded(data);
|
435 |
-
|
436 |
-
//Create a new request
|
437 |
-
var yasrVVAjaxCall = new Request(yasrCommonData.ajaxurl, {
|
438 |
-
method: 'post',
|
439 |
-
headers: new Headers({
|
440 |
-
"Content-Type": "application/x-www-form-urlencoded"
|
441 |
-
}),
|
442 |
-
body: dataToSend
|
443 |
-
});
|
444 |
-
|
445 |
-
//Do the ajax call
|
446 |
-
fetch(yasrVVAjaxCall)
|
447 |
-
.then(checkResponse)
|
448 |
-
.then(function (response) {
|
449 |
-
//return the new average rating
|
450 |
-
return response.json();
|
451 |
-
})
|
452 |
-
|
453 |
-
.then(function (data) {
|
454 |
-
|
455 |
-
document.getElementById('yasr_visitor_votes_' + postId).innerHTML = data;
|
456 |
-
|
457 |
-
raterJs({
|
458 |
-
starSize: starSize,
|
459 |
-
step: 1,
|
460 |
-
showToolTip: false,
|
461 |
-
rating: rating,
|
462 |
-
readOnly: true,
|
463 |
-
element: document.getElementById(htmlId)
|
464 |
-
});
|
465 |
-
|
466 |
-
})
|
467 |
-
.then(done)
|
468 |
-
.catch(function (err) {
|
469 |
-
console.log('Error with ajax call', err);
|
470 |
-
});*/
|
471 |
-
|
472 |
}
|
473 |
|
474 |
});
|
@@ -479,9 +242,7 @@ function yasrVisitorVotesFront (yasrRaterVVInDom) {
|
|
479 |
|
480 |
}
|
481 |
|
482 |
-
|
483 |
-
|
484 |
-
var sendButton = [];
|
485 |
|
486 |
//will have field id and vote
|
487 |
var ratingObject = "";
|
@@ -494,15 +255,8 @@ function yasrVisitorVotesFront (yasrRaterVVInDom) {
|
|
494 |
|
495 |
(function (i) {
|
496 |
|
497 |
-
var postId = parseInt(yasrMultiSetVisitorInDom.item(i).getAttribute('data-rater-postid'));
|
498 |
var htmlId = yasrMultiSetVisitorInDom.item(i).id;
|
499 |
var readonly = yasrMultiSetVisitorInDom.item(i).getAttribute('data-rater-readonly');
|
500 |
-
var setId = parseInt(yasrMultiSetVisitorInDom.item(i).getAttribute('data-rater-setid'));
|
501 |
-
|
502 |
-
//create an array for the id of the send buttons
|
503 |
-
if (!sendButton.includes('yasr-send-visitor-multiset-' + postId + '-' + setId)) {
|
504 |
-
sendButton.push('yasr-send-visitor-multiset-' + postId + '-' + setId);
|
505 |
-
}
|
506 |
|
507 |
readonly = yasrReadonlyConvertion(readonly);
|
508 |
|
@@ -525,13 +279,7 @@ function yasrVisitorVotesFront (yasrRaterVVInDom) {
|
|
525 |
|
526 |
this.setRating(vote); //set the new rating
|
527 |
|
528 |
-
/*if (!ratingArray.includes(postId)) {
|
529 |
-
ratingArray.push([postId]);
|
530 |
-
}*/
|
531 |
-
|
532 |
-
/*
|
533 |
ratingObject = {
|
534 |
-
post_ID: postId,
|
535 |
field: setIdField,
|
536 |
rating: vote
|
537 |
};
|
@@ -539,8 +287,6 @@ function yasrVisitorVotesFront (yasrRaterVVInDom) {
|
|
539 |
//creating rating array
|
540 |
ratingArray.push(ratingObject);
|
541 |
|
542 |
-
console.log(ratingArray);
|
543 |
-
|
544 |
done();
|
545 |
|
546 |
}
|
@@ -551,64 +297,28 @@ function yasrVisitorVotesFront (yasrRaterVVInDom) {
|
|
551 |
|
552 |
}
|
553 |
|
554 |
-
|
555 |
-
|
556 |
-
(function (j) {
|
557 |
|
558 |
-
|
|
|
559 |
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
/*var data = {
|
568 |
-
|
569 |
-
action: 'yasr_visitor_multiset_field_vote',
|
570 |
-
nonce: nonce,
|
571 |
-
post_id: postId,
|
572 |
-
rating: ratingArray,
|
573 |
-
set_type: setType
|
574 |
-
|
575 |
-
};*/
|
576 |
-
|
577 |
-
/*
|
578 |
-
//Send value to the Server
|
579 |
-
jQuery.post(yasrCommonData.ajaxurl, data, function(response) {
|
580 |
-
jQuery('#yasr-loader-multiset-visitor-'+postId+'-'+setType).text(response);
|
581 |
-
});*/
|
582 |
-
|
583 |
-
/*});
|
584 |
|
585 |
-
|
|
|
|
|
|
|
586 |
|
587 |
-
}
|
588 |
|
589 |
-
} //End function
|
590 |
-
|
591 |
-
/***** Function to convert js object (literal object) to string used for ajax calls in vanilla js ****/
|
592 |
-
function jsObject_to_URLEncoded(element, key, list){
|
593 |
-
var list = list || [];
|
594 |
-
if(typeof(element)=='object'){
|
595 |
-
for (var idx in element)
|
596 |
-
jsObject_to_URLEncoded(element[idx],key?key+'['+idx+']':idx,list);
|
597 |
-
} else {
|
598 |
-
list.push(key+'='+encodeURIComponent(element));
|
599 |
-
}
|
600 |
-
return list.join('&');
|
601 |
-
}
|
602 |
-
|
603 |
-
|
604 |
-
/**** function to check ajax response *****/
|
605 |
-
function checkResponse(res) {
|
606 |
-
if (res.status >= 400 && res.status < 600) {
|
607 |
-
throw new Error("Failed with status ${res.status}");
|
608 |
-
}
|
609 |
|
610 |
-
return res;
|
611 |
-
}
|
612 |
|
613 |
function yasrReadonlyConvertion(readonly) {
|
614 |
|
1 |
|
2 |
/*** Constant used by yasr
|
3 |
|
4 |
+
yasrCommonData (postid, ajaxurl, loggedUser, visitorStatsEnabled, loaderHtml, tooltipValues')
|
5 |
|
6 |
yasrMultiSetData (setType, nonce)
|
7 |
|
12 |
/****** Do this actions on document load ******/
|
13 |
document.addEventListener('DOMContentLoaded', function(event) {
|
14 |
|
15 |
+
//At pageload, check if there is some shortcode with class yasr-rater-stars
|
16 |
+
var yasrRaterInDom = document.getElementsByClassName('yasr-rater-stars');
|
17 |
+
//If so, call the function to set the rating
|
18 |
+
if (yasrRaterInDom.length > 0) {
|
19 |
|
20 |
+
//load this on everypageload
|
21 |
+
yasrSetRatingOnLoad(yasrRaterInDom);
|
22 |
|
23 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
+
//check if shortcode yasr_visitor_votes is used
|
26 |
+
var yasrRaterVVInDom = document.getElementsByClassName('yasr-rater-stars-visitor-votes');
|
|
|
27 |
|
28 |
+
if (yasrRaterVVInDom.length > 0) {
|
29 |
+
yasrVisitorVotesFront(yasrRaterVVInDom);
|
30 |
+
}
|
31 |
|
32 |
+
var yasrMultiSetVisitorInDom = document.getElementsByClassName('yasr-multiset-visitors-rater');
|
33 |
|
34 |
+
if (yasrMultiSetVisitorInDom.length > 0) {
|
35 |
|
36 |
+
yasrRaterVisitorsMultiSet(yasrMultiSetVisitorInDom)
|
37 |
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
//Check to draw tooltips
|
42 |
+
if (yasrRaterVVInDom) {
|
43 |
|
44 |
+
if (yasrCommonData.visitorStatsEnabled === 'yes') {
|
45 |
|
46 |
var yasrStatsInDom = document.getElementsByClassName('yasr-dashicons-visitor-stats');
|
47 |
|
53 |
|
54 |
}
|
55 |
|
|
|
|
|
|
|
|
|
56 |
if (typeof yasrMostHighestRanking !== 'undefined') {
|
57 |
|
58 |
//By default, hide the highest rated chart
|
63 |
});
|
64 |
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
//This work on top10 ranking chart, show the highest rated and hide most rated
|
67 |
function yasrShowHighest () {
|
68 |
|
135 |
|
136 |
});
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
})(i);
|
139 |
|
140 |
}
|
146 |
/****** End tooltipfunction ******/
|
147 |
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
/**** ****/
|
150 |
|
151 |
//this is the function that print the overall rating shortcode, get overall rating and starsize
|
204 |
rateCallback: function rateCallback(rating, done) {
|
205 |
|
206 |
//show the loader
|
207 |
+
document.getElementById('yasr-visitor-votes-container-after-stars-' + postId).innerHTML = yasrCommonData.loaderHtml;
|
208 |
|
209 |
//Just leave 1 number after the .
|
210 |
rating = rating.toFixed(1);
|
216 |
action: 'yasr_send_visitor_rating',
|
217 |
rating: rating,
|
218 |
post_id: postId,
|
|
|
219 |
nonce_visitor: nonce
|
220 |
};
|
221 |
|
222 |
+
this.setRating(rating);
|
223 |
+
this.disable();
|
224 |
+
|
225 |
//Send value to the Server
|
226 |
jQuery.post(yasrCommonData.ajaxurl, data, function (response) {
|
227 |
//decode json
|
228 |
response = JSON.parse(response);
|
229 |
+
document.getElementById('yasr-visitor-votes-container-after-stars-' + postId).innerHTML = response;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
});
|
232 |
|
233 |
done();
|
234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
}
|
236 |
|
237 |
});
|
242 |
|
243 |
}
|
244 |
|
245 |
+
function yasrRaterVisitorsMultiSet (yasrMultiSetVisitorInDom) {
|
|
|
|
|
246 |
|
247 |
//will have field id and vote
|
248 |
var ratingObject = "";
|
255 |
|
256 |
(function (i) {
|
257 |
|
|
|
258 |
var htmlId = yasrMultiSetVisitorInDom.item(i).id;
|
259 |
var readonly = yasrMultiSetVisitorInDom.item(i).getAttribute('data-rater-readonly');
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
|
261 |
readonly = yasrReadonlyConvertion(readonly);
|
262 |
|
279 |
|
280 |
this.setRating(vote); //set the new rating
|
281 |
|
|
|
|
|
|
|
|
|
|
|
282 |
ratingObject = {
|
|
|
283 |
field: setIdField,
|
284 |
rating: vote
|
285 |
};
|
287 |
//creating rating array
|
288 |
ratingArray.push(ratingObject);
|
289 |
|
|
|
|
|
290 |
done();
|
291 |
|
292 |
}
|
297 |
|
298 |
}
|
299 |
|
300 |
+
jQuery('#yasr-send-visitor-multiset-'+yasrCommonData.postid+'-'+yasrMultiSetData.setType).on('click', function() {
|
|
|
|
|
301 |
|
302 |
+
jQuery('#yasr-send-visitor-multiset-'+yasrCommonData.postid+'-'+yasrMultiSetData.setType).hide();
|
303 |
+
jQuery('#yasr-loader-multiset-visitor-'+yasrCommonData.postid+'-'+yasrMultiSetData.setType).show();
|
304 |
|
305 |
+
var data = {
|
306 |
+
action: 'yasr_visitor_multiset_field_vote',
|
307 |
+
nonce: yasrMultiSetData.nonceVisitor,
|
308 |
+
post_id: yasrCommonData.postid,
|
309 |
+
rating: ratingArray,
|
310 |
+
set_type: yasrMultiSetData.setType
|
311 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
|
313 |
+
//Send value to the Server
|
314 |
+
jQuery.post(yasrCommonData.ajaxurl, data, function(response) {
|
315 |
+
jQuery('#yasr-loader-multiset-visitor-'+yasrCommonData.postid+'-'+yasrMultiSetData.setType).text(response);
|
316 |
+
});
|
317 |
|
318 |
+
});
|
319 |
|
320 |
+
} //End function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
|
|
|
|
|
322 |
|
323 |
function yasrReadonlyConvertion(readonly) {
|
324 |
|
languages/yet-another-stars-rating-it_IT.mo
CHANGED
Binary file
|
languages/yet-another-stars-rating-it_IT.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Yasr Translation\n"
|
4 |
-
"POT-Creation-Date: 2018-
|
5 |
-
"PO-Revision-Date: 2018-
|
6 |
"Last-Translator: Dario <thedudoworld@gmail.com>\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: it_IT\n"
|
@@ -95,429 +95,397 @@ msgstr ""
|
|
95 |
msgid "Select All"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: lib/yasr-
|
99 |
-
msgid "
|
100 |
-
msgstr "
|
101 |
-
|
102 |
-
#: lib/yasr-admin-actions.php:98
|
103 |
-
msgid "Looking for more?"
|
104 |
-
msgstr "Ne vuoi altre?"
|
105 |
-
|
106 |
-
#: lib/yasr-admin-actions.php:100
|
107 |
-
#, php-format
|
108 |
-
msgid "Upgrade to %s"
|
109 |
-
msgstr "Passa a %s"
|
110 |
|
111 |
-
#: lib/yasr-
|
112 |
-
|
113 |
-
|
114 |
-
#: lib/yasr-functions.php:255 lib/yasr-functions.php:266
|
115 |
-
#: yasr-settings-page.php:24 yasr-stats-page.php:24
|
116 |
-
msgid "You do not have sufficient permissions to access this page."
|
117 |
-
msgstr "Non hai permessi sufficienti per accedere a questa pagina."
|
118 |
|
119 |
-
#: lib/yasr-
|
120 |
-
msgid "
|
121 |
-
msgstr "
|
122 |
|
123 |
-
#: lib/yasr-
|
124 |
-
msgid "
|
125 |
-
msgstr "
|
126 |
|
127 |
-
#: lib/yasr-
|
128 |
-
msgid "
|
129 |
-
msgstr "
|
130 |
|
131 |
-
#: lib/yasr-
|
132 |
-
msgid "
|
133 |
-
msgstr "
|
134 |
|
135 |
-
#: lib/yasr-
|
136 |
-
msgid "
|
137 |
-
msgstr "
|
138 |
|
139 |
-
#: lib/yasr-
|
|
|
140 |
msgid ""
|
141 |
-
"
|
142 |
-
"shortcode"
|
143 |
msgstr ""
|
144 |
-
"
|
145 |
-
"questo shortcode"
|
146 |
-
|
147 |
-
#: lib/yasr-ajax-functions.php:274
|
148 |
-
msgid "Choose a vote for every element"
|
149 |
-
msgstr "Scegli un voto per ogni elemento"
|
150 |
-
|
151 |
-
#: lib/yasr-ajax-functions.php:450
|
152 |
-
msgid "Main"
|
153 |
-
msgstr "Principale"
|
154 |
-
|
155 |
-
#: lib/yasr-ajax-functions.php:451
|
156 |
-
msgid "Charts"
|
157 |
-
msgstr "Classifiche"
|
158 |
-
|
159 |
-
#: lib/yasr-ajax-functions.php:454
|
160 |
-
msgid "Read the doc"
|
161 |
-
msgstr "Leggi la documentazione"
|
162 |
-
|
163 |
-
#: lib/yasr-ajax-functions.php:463
|
164 |
-
msgid "Overall Rating / Review"
|
165 |
-
msgstr "Voto Complessivo"
|
166 |
-
|
167 |
-
#: lib/yasr-ajax-functions.php:465
|
168 |
-
msgid "Insert Overall Rating"
|
169 |
-
msgstr "Inserisci Voto Complessivo"
|
170 |
-
|
171 |
-
#: lib/yasr-ajax-functions.php:466
|
172 |
-
msgid "Insert Overall Rating / Review for this post"
|
173 |
-
msgstr "Inserisci Voto Complessivo / Recensione per questo post"
|
174 |
-
|
175 |
-
#: lib/yasr-ajax-functions.php:469 lib/yasr-ajax-functions.php:487
|
176 |
-
msgid "Choose Size"
|
177 |
-
msgstr "Scegli la grandezza"
|
178 |
-
|
179 |
-
#: lib/yasr-ajax-functions.php:471 lib/yasr-ajax-functions.php:489
|
180 |
-
#: lib/yasr-settings-functions.php:169
|
181 |
-
msgid "Small"
|
182 |
-
msgstr "Piccolo"
|
183 |
-
|
184 |
-
#: lib/yasr-ajax-functions.php:472 lib/yasr-ajax-functions.php:490
|
185 |
-
#: lib/yasr-settings-functions.php:174
|
186 |
-
msgid "Medium"
|
187 |
-
msgstr "Medio"
|
188 |
-
|
189 |
-
#: lib/yasr-ajax-functions.php:473 lib/yasr-ajax-functions.php:491
|
190 |
-
#: lib/yasr-settings-functions.php:179
|
191 |
-
msgid "Large"
|
192 |
-
msgstr "Grande"
|
193 |
|
194 |
-
#: lib/
|
195 |
-
msgid "
|
196 |
-
msgstr "
|
197 |
|
198 |
-
#: lib/yasr-
|
199 |
-
msgid "
|
200 |
-
msgstr "
|
201 |
|
202 |
-
#: lib/yasr-
|
203 |
-
msgid "
|
204 |
-
msgstr "
|
205 |
|
206 |
-
#: lib/yasr-
|
207 |
-
msgid "
|
208 |
-
msgstr "
|
209 |
|
210 |
-
#: lib/yasr-
|
211 |
-
msgid "
|
212 |
-
msgstr "
|
213 |
|
214 |
-
#: lib/yasr-
|
215 |
-
msgid "
|
216 |
-
msgstr "
|
217 |
|
218 |
-
#: lib/yasr-
|
|
|
219 |
msgid ""
|
220 |
-
"
|
221 |
-
"
|
|
|
222 |
msgstr ""
|
223 |
-
"
|
224 |
-
"
|
225 |
-
|
226 |
-
#: lib/yasr-ajax-functions.php:516 lib/yasr-ajax-functions.php:539
|
227 |
-
msgid "Hide Average?"
|
228 |
-
msgstr "Nascondere la media?"
|
229 |
-
|
230 |
-
#: lib/yasr-ajax-functions.php:520
|
231 |
-
msgid "Insert Multi Set"
|
232 |
-
msgstr "Inserisci Set Multiplo"
|
233 |
-
|
234 |
-
#: lib/yasr-ajax-functions.php:530
|
235 |
-
msgid "Insert Multiset:"
|
236 |
-
msgstr "Inserisci Set Multiplo:"
|
237 |
-
|
238 |
-
#: lib/yasr-ajax-functions.php:544
|
239 |
-
msgid "Insert Multiple Set"
|
240 |
-
msgstr "Inserisci Set Multiplo"
|
241 |
-
|
242 |
-
#: lib/yasr-ajax-functions.php:560
|
243 |
-
msgid "Ranking reviews"
|
244 |
-
msgstr "Classifica recensioni"
|
245 |
-
|
246 |
-
#: lib/yasr-ajax-functions.php:561
|
247 |
-
msgid "Insert Ranking reviews"
|
248 |
-
msgstr "Inserisci classifica recensioni"
|
249 |
|
250 |
-
#: lib/yasr-
|
251 |
-
msgid "
|
252 |
-
msgstr "
|
253 |
|
254 |
-
#: lib/yasr-
|
255 |
-
msgid "
|
256 |
-
|
|
|
|
|
257 |
|
258 |
-
#: lib/yasr-
|
259 |
-
msgid "
|
260 |
-
msgstr "
|
261 |
|
262 |
-
#: lib/yasr-
|
263 |
-
msgid "
|
264 |
-
|
|
|
|
|
|
|
|
|
265 |
|
266 |
-
#: lib/yasr-
|
267 |
-
msgid "
|
268 |
-
msgstr "
|
269 |
|
270 |
-
#: lib/yasr-
|
271 |
-
msgid "
|
272 |
-
msgstr "
|
273 |
|
274 |
-
#: lib/yasr-
|
275 |
-
msgid "
|
276 |
-
msgstr "
|
277 |
|
278 |
-
#: lib/yasr-
|
279 |
-
msgid "
|
280 |
-
msgstr "
|
281 |
|
282 |
-
#: lib/yasr-
|
283 |
-
|
284 |
-
|
|
|
285 |
|
286 |
-
#: lib/yasr-
|
287 |
-
msgid "
|
288 |
-
msgstr "
|
289 |
|
290 |
-
#: lib/yasr-
|
291 |
-
|
292 |
-
|
|
|
293 |
|
294 |
-
#: lib/yasr-
|
295 |
-
#: lib/yasr-
|
296 |
-
msgid "
|
297 |
-
msgstr "
|
298 |
|
299 |
-
#: lib/yasr-
|
300 |
-
|
301 |
-
msgid "
|
302 |
-
msgstr "
|
303 |
|
304 |
-
#: lib/yasr-
|
305 |
-
#: lib/yasr-
|
306 |
-
msgid "
|
307 |
-
msgstr "
|
308 |
|
309 |
-
#: lib/yasr-
|
310 |
-
#: lib/yasr-
|
311 |
-
msgid "
|
312 |
-
|
|
|
|
|
|
|
|
|
313 |
|
314 |
-
#: lib/yasr-
|
315 |
-
|
316 |
-
msgid "You
|
317 |
-
msgstr "
|
318 |
|
319 |
-
#: lib/yasr-
|
320 |
-
|
321 |
-
|
|
|
322 |
|
323 |
-
#: lib/yasr-
|
324 |
-
#: lib/yasr-
|
325 |
-
msgid "
|
326 |
-
msgstr "
|
327 |
|
328 |
-
#: lib/yasr-
|
329 |
-
msgid "
|
330 |
-
msgstr "
|
331 |
|
332 |
-
#: lib/yasr-
|
333 |
-
|
334 |
-
|
|
|
335 |
|
336 |
-
#: lib/yasr-
|
337 |
-
msgid "
|
338 |
-
msgstr "
|
|
|
|
|
339 |
|
340 |
-
#: lib/yasr-
|
341 |
-
msgid "
|
342 |
-
msgstr "
|
|
|
|
|
343 |
|
344 |
-
#: lib/yasr-
|
345 |
-
msgid "
|
346 |
msgstr ""
|
|
|
|
|
347 |
|
348 |
-
#: lib/yasr-
|
349 |
-
msgid "
|
350 |
-
|
|
|
|
|
|
|
351 |
|
352 |
-
#: lib/yasr-
|
353 |
-
msgid "
|
354 |
-
|
|
|
|
|
|
|
355 |
|
356 |
-
#: lib/yasr-
|
357 |
-
msgid "
|
358 |
-
|
|
|
|
|
|
|
|
|
359 |
|
360 |
-
#: lib/yasr-
|
361 |
-
|
362 |
-
|
363 |
-
msgstr "Voto %d from %s on "
|
364 |
|
365 |
-
#: lib/yasr-
|
366 |
-
msgid "
|
367 |
-
msgstr ""
|
368 |
|
369 |
-
#: lib/
|
370 |
-
|
371 |
-
|
372 |
-
msgstr "Caricamento, attendere prego"
|
373 |
|
374 |
-
#: lib/yasr-functions.php:
|
375 |
-
msgid "
|
376 |
-
msgstr "
|
377 |
|
378 |
-
#: lib/yasr-functions.php:
|
379 |
-
msgid "
|
380 |
-
msgstr "
|
381 |
|
382 |
-
#: lib/yasr-functions.php:
|
383 |
-
msgid "
|
384 |
-
msgstr "
|
385 |
|
386 |
-
#: lib/yasr-functions.php:
|
387 |
-
msgid "
|
388 |
-
msgstr "
|
389 |
|
390 |
-
#: lib/yasr-functions.php:
|
391 |
-
msgid "
|
392 |
-
msgstr "
|
393 |
|
394 |
-
#: lib/yasr-functions.php:
|
395 |
-
msgid "
|
396 |
-
|
|
|
|
|
|
|
|
|
397 |
|
398 |
-
#: lib/yasr-functions.php:
|
399 |
-
msgid "
|
400 |
-
msgstr "
|
401 |
|
402 |
-
#: lib/yasr-settings-functions.php:29
|
403 |
msgid "General Settings"
|
404 |
msgstr "Impostazioni generali"
|
405 |
|
406 |
-
#: lib/yasr-settings-functions.php:30
|
407 |
msgid "Multi Sets"
|
408 |
msgstr "Set Multipli"
|
409 |
|
410 |
-
#: lib/yasr-settings-functions.php:31
|
411 |
msgid "Aspect & Styles"
|
412 |
msgstr "Aspetto & Stili"
|
413 |
|
414 |
-
#: lib/yasr-settings-functions.php:
|
415 |
msgid "General settings"
|
416 |
msgstr "Impostazioni Generali"
|
417 |
|
418 |
-
#: lib/yasr-settings-functions.php:
|
419 |
msgid "Auto insert options"
|
420 |
msgstr "Opzioni inserimento automatico"
|
421 |
|
422 |
-
#: lib/yasr-settings-functions.php:
|
423 |
msgid "Show \"Overall Rating\" in Archive Page?"
|
424 |
msgstr "Mostrare il \"Voto Complessivo\" nella Pagine Archivio?"
|
425 |
|
426 |
-
#: lib/yasr-settings-functions.php:
|
427 |
msgid "Show \"Visitor Votes\" in Archive Page?"
|
428 |
msgstr "Mostare il \"Voto Utenti\" nelle Pagine Archivio?"
|
429 |
|
430 |
-
#: lib/yasr-settings-functions.php:
|
431 |
msgid "Insert custom text to show before / after stars"
|
432 |
msgstr "Inserisci testo personalizzato da mostrare prima / dopo le stelle"
|
433 |
|
434 |
-
#: lib/yasr-settings-functions.php:
|
435 |
msgid "Do you want show stats for visitors votes?"
|
436 |
msgstr "Vuoi mostrare le statistiche per i voti utenti?"
|
437 |
|
438 |
-
#: lib/yasr-settings-functions.php:
|
439 |
msgid "Allow only logged in user to vote?"
|
440 |
msgstr "Permettere la votazione ai soli utenti loggati?"
|
441 |
|
442 |
-
#: lib/yasr-settings-functions.php:
|
443 |
msgid "Do you want to save ip address?"
|
444 |
msgstr "Vuoi salvare l'indirizzo IP?"
|
445 |
|
446 |
-
#: lib/yasr-settings-functions.php:
|
447 |
msgid "Rich snippet options"
|
448 |
msgstr "Opzioni Rich Snippet"
|
449 |
|
450 |
-
#: lib/yasr-settings-functions.php:
|
451 |
msgid "How do you want to rate \"Overall Rating\"?"
|
452 |
msgstr "Cosa vuoi usare per inserire il \"Voto Complessivo\"?"
|
453 |
|
454 |
-
#: lib/yasr-settings-functions.php:
|
455 |
-
msgid "Do you want disable jQuery?"
|
456 |
-
msgstr "Vuoi disabilitare jQuery?"
|
457 |
-
|
458 |
-
#: lib/yasr-settings-functions.php:115
|
459 |
msgid "Use Auto Insert?"
|
460 |
msgstr "Usare l'inserimento automatico?"
|
461 |
|
462 |
-
#: lib/yasr-settings-functions.php:
|
463 |
msgid "What?"
|
464 |
msgstr "Cosa?"
|
465 |
|
466 |
-
#: lib/yasr-settings-functions.php:
|
467 |
msgid "Overall Rating / Author Rating"
|
468 |
msgstr "Voto Complessivo / Voto Autore"
|
469 |
|
470 |
-
#: lib/yasr-settings-functions.php:
|
|
|
|
|
|
|
|
|
471 |
msgid "Both"
|
472 |
msgstr "Entrambi"
|
473 |
|
474 |
-
#: lib/yasr-settings-functions.php:
|
475 |
msgid "Where?"
|
476 |
msgstr "Dove?"
|
477 |
|
478 |
-
#: lib/yasr-settings-functions.php:
|
479 |
msgid "Before the post"
|
480 |
msgstr "Prima del contenuto"
|
481 |
|
482 |
-
#: lib/yasr-settings-functions.php:
|
483 |
msgid "After the post"
|
484 |
msgstr "Dopo il contenuto"
|
485 |
|
486 |
-
#: lib/yasr-settings-functions.php:
|
487 |
msgid "Size"
|
488 |
msgstr "Grandezza"
|
489 |
|
490 |
-
#: lib/yasr-settings-functions.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
msgid "Exclude Pages?"
|
492 |
msgstr "Escludere pagine?"
|
493 |
|
494 |
-
#: lib/
|
|
|
495 |
msgid "Yes"
|
496 |
msgstr "Si"
|
497 |
|
498 |
-
#: lib/
|
|
|
499 |
msgid "No"
|
500 |
msgstr "No"
|
501 |
|
502 |
-
#: lib/yasr-settings-functions.php:
|
503 |
msgid "Use only in custom post types?"
|
504 |
msgstr "Usare solo nei custom post type?"
|
505 |
|
506 |
-
#: lib/yasr-settings-functions.php:
|
507 |
msgid "You see this because you use custom post types."
|
508 |
msgstr "Vedi questo perché usi i custom post type."
|
509 |
|
510 |
-
#: lib/yasr-settings-functions.php:
|
511 |
msgid "If you want to use auto insert only in custom post types, choose Yes"
|
512 |
msgstr ""
|
513 |
"Se vuoi usare l'inserimento automatico solo nei custom post type, spunta Si"
|
514 |
|
515 |
-
#: lib/
|
|
|
516 |
#: yasr-settings-page.php:89
|
517 |
msgid "Save Settings"
|
518 |
msgstr "Salva Impostazioni"
|
519 |
|
520 |
-
#: lib/yasr-settings-functions.php:
|
521 |
msgid ""
|
522 |
"If you enable this, \"Overall Rating\" will be showed not only in the single "
|
523 |
"article or page, but also in pages like Home Page, category pages or "
|
@@ -527,7 +495,7 @@ msgstr ""
|
|
527 |
"articolo o nella singola pagina, ma anche in pagine come l' Home Page, "
|
528 |
"categorie o archivi."
|
529 |
|
530 |
-
#: lib/yasr-settings-functions.php:
|
531 |
msgid ""
|
532 |
"If you enable this, \"Visitor Votes\" will be showed not only in the single "
|
533 |
"article or page, but also in pages like Home Page, category pages or "
|
@@ -537,28 +505,28 @@ msgstr ""
|
|
537 |
"articolo o nella singola pagina, ma anche in pagine come l' Home Page, "
|
538 |
"categorie o archivi."
|
539 |
|
540 |
-
#: lib/yasr-settings-functions.php:
|
541 |
msgid "Custom text to display before Overall Rating"
|
542 |
msgstr "Testo personalizzato da visualizzare prima del Voto Complessivo"
|
543 |
|
544 |
-
#: lib/yasr-settings-functions.php:
|
545 |
msgid "Custom text to display BEFORE Visitor Rating"
|
546 |
msgstr "Testo personalizzato da visualizzare PRIMA del Voto Utenti"
|
547 |
|
548 |
-
#: lib/yasr-settings-functions.php:
|
549 |
msgid "Custom text to display AFTER Visitor Rating"
|
550 |
msgstr "Testo personalizzato da visualizzare dopo del Voto Utenti"
|
551 |
|
552 |
-
#: lib/yasr-settings-functions.php:
|
553 |
msgid "Custom text to display when a non logged user has already rated"
|
554 |
msgstr ""
|
555 |
"Testo personalizzato da mostrare quanto un utente non loggato ha già votato"
|
556 |
|
557 |
-
#: lib/yasr-settings-functions.php:
|
558 |
msgid "Help"
|
559 |
msgstr "Aiuto"
|
560 |
|
561 |
-
#: lib/yasr-settings-functions.php:
|
562 |
msgid ""
|
563 |
"In the first field you can use %overall_rating% pattern to show the overall "
|
564 |
"rating."
|
@@ -566,7 +534,7 @@ msgstr ""
|
|
566 |
"Nel primo campo puoi usare la variabile %overall_rating% per mostrare il "
|
567 |
"voto complessivo."
|
568 |
|
569 |
-
#: lib/yasr-settings-functions.php:
|
570 |
msgid ""
|
571 |
"In the Second and Third fields you can use %total_count% pattern to show the "
|
572 |
"total count, and %average% pattern to show the average"
|
@@ -574,15 +542,15 @@ msgstr ""
|
|
574 |
"Nel secondo e terzo campo puoi usare la variabile %total_count% per mostrare "
|
575 |
"il numero dei voti, e %average% per mostare la media"
|
576 |
|
577 |
-
#: lib/yasr-settings-functions.php:
|
578 |
msgid "Allow only logged-in users"
|
579 |
msgstr "Permetti solo agli utenti loggati"
|
580 |
|
581 |
-
#: lib/yasr-settings-functions.php:
|
582 |
msgid "Allow everybody (logged in and anonymous)"
|
583 |
msgstr "Permetti a tutti (loggati ed anonimi)"
|
584 |
|
585 |
-
#: lib/yasr-settings-functions.php:
|
586 |
#, php-format
|
587 |
msgid ""
|
588 |
"Please note that to comply with the %s EU law, you must warn your users that "
|
@@ -591,23 +559,23 @@ msgstr ""
|
|
591 |
"Attenzione: per essere in regola con la legge europea %s, devi avvisare i "
|
592 |
"tuoi utenti che stai salvando il loro indirizzo ip"
|
593 |
|
594 |
-
#: lib/yasr-settings-functions.php:
|
595 |
msgid "Which rich snippet do you want to use?"
|
596 |
msgstr "Quale rich snippets vuoi usare?"
|
597 |
|
598 |
-
#: lib/yasr-settings-functions.php:
|
599 |
msgid "Review Rating"
|
600 |
msgstr "Voto Recensione"
|
601 |
|
602 |
-
#: lib/yasr-settings-functions.php:
|
603 |
msgid "Aggregate Rating"
|
604 |
msgstr "Media Voto Utenti"
|
605 |
|
606 |
-
#: lib/yasr-settings-functions.php:
|
607 |
msgid "What is this?"
|
608 |
msgstr "Cos'è questo?"
|
609 |
|
610 |
-
#: lib/yasr-settings-functions.php:
|
611 |
msgid ""
|
612 |
"If you select \"Review Rating\", your site will be indexed from search "
|
613 |
"engines like this: "
|
@@ -615,34 +583,34 @@ msgstr ""
|
|
615 |
"Se hai scelto \"Voto Recensione\", il sito verrà indicizzato dai motori di "
|
616 |
"ricerca così: "
|
617 |
|
618 |
-
#: lib/yasr-settings-functions.php:
|
619 |
msgid ""
|
620 |
"If, instead, you choose \"Aggregate Rating\", your site will be indexed like "
|
621 |
"this"
|
622 |
msgstr ""
|
623 |
"Se, invece, hai scelto \"Media Voto Utenti\", il sito verrà indicizzato così"
|
624 |
|
625 |
-
#: lib/yasr-settings-functions.php:
|
626 |
msgid "Select default item type for all post or pages"
|
627 |
msgstr "Seleziona l'item type di default per tutti i post e le pagine"
|
628 |
|
629 |
-
#: lib/yasr-settings-functions.php:
|
630 |
msgid "Product"
|
631 |
msgstr "Prodotto"
|
632 |
|
633 |
-
#: lib/yasr-settings-functions.php:
|
634 |
msgid "Place"
|
635 |
msgstr "Posto"
|
636 |
|
637 |
-
#: lib/yasr-settings-functions.php:
|
638 |
msgid "Recipe"
|
639 |
msgstr "Ricetta"
|
640 |
|
641 |
-
#: lib/yasr-settings-functions.php:
|
642 |
msgid "BlogPosting"
|
643 |
msgstr "BlogPosting"
|
644 |
|
645 |
-
#: lib/yasr-settings-functions.php:
|
646 |
msgid ""
|
647 |
"If you need to use BlogPosting as item type, even for just one post or page, "
|
648 |
"please fill these forms"
|
@@ -650,352 +618,360 @@ msgstr ""
|
|
650 |
"Se devi usare BlogPosting come tipologia, anche solo per un post o una "
|
651 |
"pagina, riempi questi form"
|
652 |
|
653 |
-
#: lib/yasr-settings-functions.php:
|
654 |
msgid "Publisher name (e.g. Google)"
|
655 |
msgstr "Nome editore (es: Google)"
|
656 |
|
657 |
-
#: lib/yasr-settings-functions.php:
|
658 |
msgid "Logo Url (if empty siteicon will be used instead)"
|
659 |
msgstr "Url del logo (se vuoto verrà usata la siteicon)"
|
660 |
|
661 |
-
#: lib/yasr-settings-functions.php:
|
662 |
msgid "You can always change it in the single post or page."
|
663 |
msgstr "Puoi sempre cambiarlo nei singoli post o pagine."
|
664 |
|
665 |
-
#: lib/yasr-settings-functions.php:
|
666 |
msgid ""
|
667 |
"This will affect only the post/page where you didn't change manually the "
|
668 |
"itemtype yet."
|
669 |
msgstr ""
|
670 |
"Funzionerà solo sui post/pagine dove non hai cambiato l'itemtype manualmente."
|
671 |
|
672 |
-
#: lib/yasr-settings-functions.php:
|
673 |
msgid "Stars"
|
674 |
msgstr "Stelle"
|
675 |
|
676 |
-
#: lib/yasr-settings-functions.php:
|
677 |
msgid "Numbers"
|
678 |
msgstr "Numeri"
|
679 |
|
680 |
-
#: lib/yasr-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
681 |
#, php-format
|
682 |
-
msgid ""
|
683 |
-
"
|
684 |
-
"\t Please note this feature is still in beta. %s\n"
|
685 |
-
"\t For now, this work only with all shortcodes except "
|
686 |
-
"yasr_visitor_multiset. %s\n"
|
687 |
-
"\t For Pro users, you will not able to change star set colors %s\n"
|
688 |
-
"\t Please report any bug %s"
|
689 |
-
msgstr ""
|
690 |
|
691 |
-
#: lib/yasr-
|
692 |
-
|
693 |
-
|
|
|
|
|
|
|
|
|
694 |
|
695 |
-
#: lib/yasr-
|
696 |
-
msgid ""
|
697 |
-
|
698 |
-
"override this in the single multi set by using the parameter \"show_average\""
|
699 |
-
msgstr ""
|
700 |
|
701 |
-
#: lib/yasr-
|
702 |
-
msgid "
|
703 |
-
msgstr "
|
704 |
|
705 |
-
#: lib/yasr-
|
706 |
-
msgid ""
|
707 |
-
"
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
712 |
|
713 |
-
#: lib/yasr-
|
714 |
-
msgid "
|
715 |
-
msgstr "
|
716 |
|
717 |
-
#: lib/yasr-
|
718 |
-
msgid "
|
719 |
-
msgstr "
|
720 |
|
721 |
-
#: lib/yasr-
|
722 |
-
msgid "
|
723 |
-
msgstr "
|
724 |
|
725 |
-
#: lib/yasr-
|
726 |
-
msgid "
|
727 |
-
msgstr "
|
728 |
|
729 |
-
#: lib/yasr-
|
730 |
-
msgid "
|
731 |
-
msgstr "
|
732 |
|
733 |
-
#: lib/yasr-
|
734 |
-
msgid "
|
735 |
-
|
|
|
|
|
|
|
|
|
736 |
|
737 |
-
#: lib/yasr-
|
738 |
-
|
739 |
-
|
740 |
-
msgstr "Seleziona"
|
741 |
|
742 |
-
#: lib/yasr-
|
743 |
-
msgid "
|
744 |
-
msgstr "
|
745 |
|
746 |
-
#: lib/yasr-
|
747 |
-
msgid "
|
748 |
-
msgstr "
|
749 |
|
750 |
-
#: lib/yasr-
|
751 |
-
msgid "
|
752 |
-
msgstr "
|
753 |
|
754 |
-
#: lib/yasr-
|
755 |
-
msgid ""
|
756 |
-
"
|
757 |
-
"This operation CAN'T BE undone."
|
758 |
-
msgstr ""
|
759 |
-
"Se rimuovi qualcosa rimuoverai anche i voti per quel set o campo. Questa "
|
760 |
-
"operazione NON PUÒ ESSERE ANNULLATA."
|
761 |
|
762 |
-
#: lib/yasr-
|
763 |
-
msgid "
|
764 |
-
msgstr "
|
765 |
|
766 |
-
#: lib/yasr-
|
767 |
-
msgid "
|
768 |
-
msgstr "
|
769 |
|
770 |
-
#: lib/yasr-
|
771 |
-
msgid "
|
772 |
-
msgstr "
|
773 |
|
774 |
-
#: lib/yasr-
|
775 |
-
msgid "
|
776 |
-
msgstr "
|
777 |
|
778 |
-
#: lib/yasr-
|
779 |
-
msgid "
|
780 |
-
msgstr "
|
781 |
|
782 |
-
#: lib/yasr-
|
783 |
-
msgid "
|
784 |
-
msgstr ""
|
785 |
-
"Qualcosa è andato storto cercando di inserire un elemento. Per favore "
|
786 |
-
"segnalalo"
|
787 |
|
788 |
-
#: lib/yasr-
|
789 |
-
msgid "
|
790 |
-
msgstr ""
|
791 |
-
"Qualcosa è andato storto cercando di inserire il nome del Set Multiplo. Per "
|
792 |
-
"favore segnalalo"
|
793 |
|
794 |
-
#: lib/yasr-
|
795 |
-
msgid "
|
796 |
-
msgstr ""
|
797 |
-
"Qualcosa è andato storto cercando di cancellare un Set Multiplo. Per favore "
|
798 |
-
"segnalalo"
|
799 |
|
800 |
-
#: lib/yasr-
|
801 |
-
msgid ""
|
802 |
-
"
|
803 |
-
msgstr ""
|
804 |
-
"Qualcosa è andato storto cercando di eliminare un elemento del Set Multiplo. "
|
805 |
-
"Per favore segnalalo"
|
806 |
|
807 |
-
#: lib/yasr-
|
808 |
-
msgid ""
|
809 |
-
"
|
810 |
-
msgstr ""
|
811 |
-
"Qualcosa è andato storto cercando di aggiornare un elemento del Set "
|
812 |
-
"Multiplo. Per favore segnalalo"
|
813 |
|
814 |
-
#: lib/yasr-
|
815 |
-
msgid ""
|
816 |
-
"
|
817 |
-
"report it"
|
818 |
-
msgstr ""
|
819 |
-
"Qualcosa è andato storto cercando di inserire il campo nel form di modifica. "
|
820 |
-
"Per favore segnalalo"
|
821 |
|
822 |
-
#: lib/yasr-
|
823 |
-
msgid "
|
824 |
-
msgstr "
|
825 |
|
826 |
-
#: lib/yasr-
|
827 |
-
|
828 |
-
|
|
|
829 |
|
830 |
-
#: lib/yasr-
|
831 |
-
|
832 |
-
|
|
|
833 |
|
834 |
-
#: lib/yasr-
|
835 |
-
|
836 |
-
|
|
|
837 |
|
838 |
-
#: lib/yasr-
|
839 |
-
|
840 |
-
|
|
|
841 |
|
842 |
-
#: lib/yasr-
|
843 |
-
|
844 |
-
|
|
|
845 |
|
846 |
-
#: lib/yasr-
|
847 |
-
msgid "
|
848 |
-
msgstr "
|
849 |
|
850 |
-
#: lib/yasr-
|
851 |
-
|
852 |
-
|
|
|
853 |
|
854 |
-
#: lib/yasr-
|
855 |
-
msgid ""
|
856 |
-
|
857 |
-
"default ones."
|
858 |
-
msgstr ""
|
859 |
-
"Usa l'area di testo sottostante per scrivere le tue regole CSS che "
|
860 |
-
"sovrascriveranno quelle di default."
|
861 |
|
862 |
-
#: lib/yasr-
|
863 |
-
msgid "
|
864 |
-
msgstr "
|
865 |
|
866 |
-
#: lib/yasr-
|
867 |
-
msgid "
|
868 |
-
msgstr ""
|
869 |
|
870 |
-
#: lib/yasr-
|
871 |
-
msgid "
|
872 |
-
msgstr ""
|
873 |
|
874 |
-
#: lib/yasr-
|
875 |
-
msgid "
|
876 |
msgstr ""
|
877 |
|
878 |
-
#: lib/yasr-
|
879 |
-
msgid "
|
880 |
-
msgstr ""
|
881 |
|
882 |
-
#: lib/yasr-
|
883 |
-
msgid "
|
884 |
-
msgstr ""
|
885 |
|
886 |
-
#: lib/yasr-
|
887 |
-
msgid "
|
888 |
msgstr ""
|
889 |
|
890 |
-
#: lib/yasr-
|
891 |
-
msgid "
|
892 |
-
msgstr "
|
893 |
|
894 |
-
#: lib/yasr-
|
895 |
#, php-format
|
896 |
-
msgid ""
|
897 |
-
"
|
|
|
|
|
|
|
898 |
msgstr ""
|
899 |
-
"Ciao, sembra che hai ottenuto %s voti sul tuo sito grazie a YASR! Ottimo!"
|
900 |
|
901 |
-
#: lib/yasr-
|
902 |
-
msgid "
|
903 |
-
msgstr "
|
904 |
|
905 |
-
#: lib/yasr-
|
906 |
-
msgid "
|
907 |
-
msgstr "
|
908 |
|
909 |
-
#: lib/yasr-
|
910 |
-
msgid "
|
911 |
-
msgstr "
|
912 |
|
913 |
-
#: lib/yasr-
|
914 |
-
msgid "
|
915 |
-
msgstr "
|
916 |
|
917 |
-
#: lib/yasr-
|
918 |
-
msgid "
|
919 |
-
msgstr "
|
920 |
|
921 |
-
#: lib/yasr-
|
922 |
-
msgid "
|
923 |
-
msgstr "Non
|
924 |
|
925 |
-
#: lib/yasr-
|
926 |
-
|
927 |
-
|
928 |
-
"Thank you for using <a href=\"%s\" target=\"_blank\">Yet Another Stars "
|
929 |
-
"Rating</a>. Please <a href=\"%s\" target=\"_blank\">rate it</a> 5 stars on "
|
930 |
-
"<a href=\"%s\" target=\"_blank\">WordPress.org</a>"
|
931 |
-
msgstr ""
|
932 |
-
"Grazie per usare <a href=\"%s\" target=\"_blank\">Yet Another Stars Rating</"
|
933 |
-
"a>. Per favore, <a href=\"%s\" target=\"_blank\">dagli</a> 5 stelle su <a "
|
934 |
-
"href=\"%s\" target=\"_blank\">WordPress.org</a>"
|
935 |
|
936 |
-
#: lib/yasr-shortcode-functions.php:
|
937 |
msgid "You've already voted this article with"
|
938 |
msgstr "Hai già votato questo articolo con"
|
939 |
|
940 |
-
#: lib/yasr-shortcode-functions.php:
|
941 |
#, fuzzy
|
942 |
msgid "You must sign in to vote"
|
943 |
msgstr "Devi fare il login per votare"
|
944 |
|
945 |
-
#: lib/yasr-shortcode-functions.php:
|
|
|
|
|
|
|
|
|
946 |
msgid "Average: "
|
947 |
msgstr "Media Voto: "
|
948 |
|
949 |
-
#: lib/yasr-shortcode-functions.php:
|
950 |
-
#: lib/yasr-shortcode-functions.php:
|
951 |
msgid "Average"
|
952 |
msgstr "Media"
|
953 |
|
954 |
-
#: lib/yasr-shortcode-functions.php:
|
955 |
msgid "Submit!"
|
956 |
msgstr "Invia!"
|
957 |
|
958 |
-
#: lib/yasr-shortcode-functions.php:
|
959 |
msgid "Thank you for voting! "
|
960 |
msgstr "Grazie per aver votato! "
|
961 |
|
962 |
-
#: lib/yasr-shortcode-functions.php:
|
963 |
msgid "Rating"
|
964 |
msgstr "Voto"
|
965 |
|
966 |
-
#: lib/yasr-shortcode-functions.php:
|
967 |
msgid "You don't have any votes stored"
|
968 |
msgstr "Non hai alcun voto salvato"
|
969 |
|
970 |
-
#: lib/yasr-shortcode-functions.php:
|
971 |
msgid "Post / Page"
|
972 |
msgstr "Post / Pagina"
|
973 |
|
974 |
-
#: lib/yasr-shortcode-functions.php:
|
975 |
msgid "Order By"
|
976 |
msgstr "Ordina per"
|
977 |
|
978 |
-
#: lib/yasr-shortcode-functions.php:
|
979 |
msgid "Most Rated"
|
980 |
msgstr "Più Votati"
|
981 |
|
982 |
-
#: lib/yasr-shortcode-functions.php:
|
983 |
msgid "Highest Rated"
|
984 |
msgstr "Voto più alto"
|
985 |
|
986 |
-
#: lib/yasr-shortcode-functions.php:
|
987 |
-
msgid "Total:"
|
988 |
-
msgstr "Voti:"
|
989 |
-
|
990 |
-
#: lib/yasr-shortcode-functions.php:875
|
991 |
msgid "You've not enough data"
|
992 |
msgstr "Non hai abbastanza dati"
|
993 |
|
994 |
-
#: lib/yasr-shortcode-functions.php:
|
995 |
msgid "You've not enought data"
|
996 |
msgstr "Non hai abbastanza dati"
|
997 |
|
998 |
-
#: lib/yasr-shortcode-functions.php:
|
999 |
msgid ""
|
1000 |
"Problem while retrieving the top 5 most active reviewers. Did you publish "
|
1001 |
"any review?"
|
@@ -1003,7 +979,7 @@ msgstr ""
|
|
1003 |
"C'è stato un problema nell'ottenere la classifica dei 5 recensori più "
|
1004 |
"attivi. Hai pubblicato qualche recensione?"
|
1005 |
|
1006 |
-
#: lib/yasr-shortcode-functions.php:
|
1007 |
msgid ""
|
1008 |
"Problem while retrieving the top 10 active users chart. Are you sure you "
|
1009 |
"have votes to show?"
|
@@ -1011,12 +987,12 @@ msgstr ""
|
|
1011 |
"C'è stato un problema nell'ottenere la classifica dei 10 utenti più attivi. "
|
1012 |
"Sei sicuro di avere voti da mostrare?"
|
1013 |
|
1014 |
-
#: lib/yasr-shortcode-functions.php:
|
1015 |
#, php-format
|
1016 |
msgid " based on %d votes"
|
1017 |
msgstr ""
|
1018 |
|
1019 |
-
#: lib/yasr-shortcode-functions.php:
|
1020 |
msgid "No results, try a different setid"
|
1021 |
msgstr ""
|
1022 |
|
@@ -1077,27 +1053,51 @@ msgstr ""
|
|
1077 |
msgid "Recent Ratings"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: yasr-metabox-multiple-rating.php:
|
1081 |
msgid "Choose wich set you want to use"
|
1082 |
msgstr "Scegli che set vuoi usare"
|
1083 |
|
1084 |
-
#: yasr-metabox-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1085 |
msgid "Rate this article / item"
|
1086 |
msgstr "Vota questo articolo / oggetto"
|
1087 |
|
1088 |
-
#: yasr-metabox-top-right.php:
|
|
|
|
|
|
|
|
|
1089 |
msgid "Save Vote"
|
1090 |
msgstr "Salva Voto"
|
1091 |
|
1092 |
-
#: yasr-metabox-top-right.php:
|
1093 |
msgid "Disable auto insert for this post or page?"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: yasr-metabox-top-right.php:
|
1097 |
msgid "This review is about a..."
|
1098 |
msgstr "Questa recensione è..."
|
1099 |
|
1100 |
-
#: yasr-metabox-top-right.php:
|
1101 |
msgid ""
|
1102 |
"Remember to insert this shortcode <strong>[yasr_overall_rating]</strong> "
|
1103 |
"where you want to display this rating"
|
@@ -1157,10 +1157,28 @@ msgstr "Chiudi questo messaggio"
|
|
1157 |
msgid "Save"
|
1158 |
msgstr "Salva"
|
1159 |
|
1160 |
-
#: yet-another-stars-rating.php:
|
1161 |
msgid "Buy Yasr Pro"
|
1162 |
msgstr ""
|
1163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1164 |
#~ msgid "Import Gd Star Rating"
|
1165 |
#~ msgstr "Importa Gd Star Rating"
|
1166 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Yasr Translation\n"
|
4 |
+
"POT-Creation-Date: 2018-12-26 14:56+0100\n"
|
5 |
+
"PO-Revision-Date: 2018-12-26 14:56+0100\n"
|
6 |
"Last-Translator: Dario <thedudoworld@gmail.com>\n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: it_IT\n"
|
95 |
msgid "Select All"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: lib/settings/yasr-settings-functions-misc.php:47
|
99 |
+
msgid "Upgrade to YASR Pro"
|
100 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
+
#: lib/settings/yasr-settings-functions-misc.php:52
|
103 |
+
msgid " User Reviews"
|
104 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
105 |
|
106 |
+
#: lib/settings/yasr-settings-functions-misc.php:53
|
107 |
+
msgid " Custom Rankings"
|
108 |
+
msgstr ""
|
109 |
|
110 |
+
#: lib/settings/yasr-settings-functions-misc.php:54
|
111 |
+
msgid " 20 + ready to use themes"
|
112 |
+
msgstr ""
|
113 |
|
114 |
+
#: lib/settings/yasr-settings-functions-misc.php:55
|
115 |
+
msgid " Upload your own theme"
|
116 |
+
msgstr ""
|
117 |
|
118 |
+
#: lib/settings/yasr-settings-functions-misc.php:56
|
119 |
+
msgid " Dedicate support"
|
120 |
+
msgstr ""
|
121 |
|
122 |
+
#: lib/settings/yasr-settings-functions-misc.php:86
|
123 |
+
msgid "Keep in touch!"
|
124 |
+
msgstr "Teniamoci in contatto!"
|
125 |
|
126 |
+
#: lib/settings/yasr-settings-functions-misc.php:125
|
127 |
+
#, php-format
|
128 |
msgid ""
|
129 |
+
"Hey, seems like you reached %s votes on your site throught YASR! That's cool!"
|
|
|
130 |
msgstr ""
|
131 |
+
"Ciao, sembra che hai ottenuto %s voti sul tuo sito grazie a YASR! Ottimo!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
+
#: lib/settings/yasr-settings-functions-misc.php:127
|
134 |
+
msgid "Can I ask a favor?"
|
135 |
+
msgstr "Ti posso chiedere un favore?"
|
136 |
|
137 |
+
#: lib/settings/yasr-settings-functions-misc.php:129
|
138 |
+
msgid "Can you please rate YASR 5 stars on"
|
139 |
+
msgstr "Puoi dare 5 stelle a YASR su"
|
140 |
|
141 |
+
#: lib/settings/yasr-settings-functions-misc.php:131
|
142 |
+
msgid " It will require just 1 min but it's a HUGE help for me. Thank you."
|
143 |
+
msgstr " Richiederà solo 1 minuto ma è un ENORME aiuto per me. Grazie."
|
144 |
|
145 |
+
#: lib/settings/yasr-settings-functions-misc.php:137
|
146 |
+
msgid "Ok, I'm glad to help!"
|
147 |
+
msgstr "Ok, sono contento di aiutare!"
|
148 |
|
149 |
+
#: lib/settings/yasr-settings-functions-misc.php:138
|
150 |
+
msgid "Remind me later!"
|
151 |
+
msgstr "Ricordamelo dopo!"
|
152 |
|
153 |
+
#: lib/settings/yasr-settings-functions-misc.php:139
|
154 |
+
msgid "Don't need to ask, I already did it!"
|
155 |
+
msgstr "Non c'è bisogno di chiederlo, l'ho già fatto!"
|
156 |
|
157 |
+
#: lib/settings/yasr-settings-functions-misc.php:172
|
158 |
+
#, php-format
|
159 |
msgid ""
|
160 |
+
"Thank you for using <a href=\"%s\" target=\"_blank\">Yet Another Stars "
|
161 |
+
"Rating</a>. Please <a href=\"%s\" target=\"_blank\">rate it</a> 5 stars on "
|
162 |
+
"<a href=\"%s\" target=\"_blank\">WordPress.org</a>"
|
163 |
msgstr ""
|
164 |
+
"Grazie per usare <a href=\"%s\" target=\"_blank\">Yet Another Stars Rating</"
|
165 |
+
"a>. Per favore, <a href=\"%s\" target=\"_blank\">dagli</a> 5 stelle su <a "
|
166 |
+
"href=\"%s\" target=\"_blank\">WordPress.org</a>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
+
#: lib/settings/yasr-settings-functions-multiset.php:49
|
169 |
+
msgid "Show average?"
|
170 |
+
msgstr "Mostrare la media?"
|
171 |
|
172 |
+
#: lib/settings/yasr-settings-functions-multiset.php:77
|
173 |
+
msgid ""
|
174 |
+
"If you select no, the \"Average\" row will not be displayed. You can "
|
175 |
+
"override this in the single multi set by using the parameter \"show_average\""
|
176 |
+
msgstr ""
|
177 |
|
178 |
+
#: lib/settings/yasr-settings-functions-multiset.php:106
|
179 |
+
msgid "Add New Multiple Set"
|
180 |
+
msgstr "Set Multipli"
|
181 |
|
182 |
+
#: lib/settings/yasr-settings-functions-multiset.php:107
|
183 |
+
msgid ""
|
184 |
+
"Name, Element#1 and Element#2 MUST be filled and must be long at least 3 "
|
185 |
+
"characters"
|
186 |
+
msgstr ""
|
187 |
+
"Nome, Elemento#1 e Elemento#2 DEVONO essere riempiti e devono essere lunghi "
|
188 |
+
"almeno 3 caratteri"
|
189 |
|
190 |
+
#: lib/settings/yasr-settings-functions-multiset.php:110
|
191 |
+
msgid "Name"
|
192 |
+
msgstr "Nome"
|
193 |
|
194 |
+
#: lib/settings/yasr-settings-functions-multiset.php:115
|
195 |
+
msgid "You can insert up to nine elements"
|
196 |
+
msgstr "Puoi inserire fino a nove elementi"
|
197 |
|
198 |
+
#: lib/settings/yasr-settings-functions-multiset.php:120
|
199 |
+
msgid "Element "
|
200 |
+
msgstr "Elemento "
|
201 |
|
202 |
+
#: lib/settings/yasr-settings-functions-multiset.php:130
|
203 |
+
msgid "Create New Set"
|
204 |
+
msgstr "Crea Nuovo Set"
|
205 |
|
206 |
+
#: lib/settings/yasr-settings-functions-multiset.php:150
|
207 |
+
#: lib/settings/yasr-settings-functions-multiset.php:183
|
208 |
+
msgid "Manage Multiple Set"
|
209 |
+
msgstr "Gestisci Set Multiplo"
|
210 |
|
211 |
+
#: lib/settings/yasr-settings-functions-multiset.php:152
|
212 |
+
msgid "Wich set do you want to edit or remove?"
|
213 |
+
msgstr "Quale set vuoi modificare o rimuovere?"
|
214 |
|
215 |
+
#: lib/settings/yasr-settings-functions-multiset.php:160
|
216 |
+
#: yasr-metabox-multiple-rating.php:48 yasr-metabox-top-right.php:212
|
217 |
+
msgid "Select"
|
218 |
+
msgstr "Seleziona"
|
219 |
|
220 |
+
#: lib/settings/yasr-settings-functions-multiset.php:193
|
221 |
+
#: lib/settings/yasr-settings-functions-multiset.php:310
|
222 |
+
msgid "Field name"
|
223 |
+
msgstr "Nome campo"
|
224 |
|
225 |
+
#: lib/settings/yasr-settings-functions-multiset.php:197
|
226 |
+
#: lib/settings/yasr-settings-functions-multiset.php:314
|
227 |
+
msgid "Remove"
|
228 |
+
msgstr "Rimuovi"
|
229 |
|
230 |
+
#: lib/settings/yasr-settings-functions-multiset.php:239
|
231 |
+
#: lib/settings/yasr-settings-functions-multiset.php:356
|
232 |
+
msgid "Remove whole set?"
|
233 |
+
msgstr "Rimuovere l'intero set?"
|
234 |
|
235 |
+
#: lib/settings/yasr-settings-functions-multiset.php:252
|
236 |
+
#: lib/settings/yasr-settings-functions-multiset.php:369
|
237 |
+
msgid ""
|
238 |
+
"If you remove something you will remove all the votes for that set or field. "
|
239 |
+
"This operation CAN'T BE undone."
|
240 |
+
msgstr ""
|
241 |
+
"Se rimuovi qualcosa rimuoverai anche i voti per quel set o campo. Questa "
|
242 |
+
"operazione NON PUÒ ESSERE ANNULLATA."
|
243 |
|
244 |
+
#: lib/settings/yasr-settings-functions-multiset.php:259
|
245 |
+
#: lib/settings/yasr-settings-functions-multiset.php:376
|
246 |
+
msgid "You can use up to 9 elements"
|
247 |
+
msgstr "Puoi usare fino a 9 elementi"
|
248 |
|
249 |
+
#: lib/settings/yasr-settings-functions-multiset.php:261
|
250 |
+
#: lib/settings/yasr-settings-functions-multiset.php:378
|
251 |
+
msgid "Add element"
|
252 |
+
msgstr "Aggiungi elemento"
|
253 |
|
254 |
+
#: lib/settings/yasr-settings-functions-multiset.php:263
|
255 |
+
#: lib/settings/yasr-settings-functions-multiset.php:380
|
256 |
+
msgid "Save changes"
|
257 |
+
msgstr "Salva modifiche"
|
258 |
|
259 |
+
#: lib/settings/yasr-settings-functions-multiset.php:273
|
260 |
+
msgid "No Multiple Set were found"
|
261 |
+
msgstr "Nessun Set Multiplo trovato"
|
262 |
|
263 |
+
#: lib/settings/yasr-settings-functions-multiset.php:519
|
264 |
+
#: lib/settings/yasr-settings-functions-multiset.php:817
|
265 |
+
msgid "Settings Saved"
|
266 |
+
msgstr "Impostazioni Salvate"
|
267 |
|
268 |
+
#: lib/settings/yasr-settings-functions-multiset.php:524
|
269 |
+
msgid "Something goes wrong trying insert set field name. Please report it"
|
270 |
+
msgstr ""
|
271 |
+
"Qualcosa è andato storto cercando di inserire un elemento. Per favore "
|
272 |
+
"segnalalo"
|
273 |
|
274 |
+
#: lib/settings/yasr-settings-functions-multiset.php:530
|
275 |
+
msgid "Something goes wrong trying insert Multi Set name. Please report it"
|
276 |
+
msgstr ""
|
277 |
+
"Qualcosa è andato storto cercando di inserire il nome del Set Multiplo. Per "
|
278 |
+
"favore segnalalo"
|
279 |
|
280 |
+
#: lib/settings/yasr-settings-functions-multiset.php:603
|
281 |
+
msgid "Something goes wrong trying to delete a Multi Set . Please report it"
|
282 |
msgstr ""
|
283 |
+
"Qualcosa è andato storto cercando di cancellare un Set Multiplo. Per favore "
|
284 |
+
"segnalalo"
|
285 |
|
286 |
+
#: lib/settings/yasr-settings-functions-multiset.php:649
|
287 |
+
msgid ""
|
288 |
+
"Something goes wrong trying to delete a Multi Set's element. Please report it"
|
289 |
+
msgstr ""
|
290 |
+
"Qualcosa è andato storto cercando di eliminare un elemento del Set Multiplo. "
|
291 |
+
"Per favore segnalalo"
|
292 |
|
293 |
+
#: lib/settings/yasr-settings-functions-multiset.php:713
|
294 |
+
msgid ""
|
295 |
+
"Something goes wrong trying to update a Multi Set's element. Please report it"
|
296 |
+
msgstr ""
|
297 |
+
"Qualcosa è andato storto cercando di aggiornare un elemento del Set "
|
298 |
+
"Multiplo. Per favore segnalalo"
|
299 |
|
300 |
+
#: lib/settings/yasr-settings-functions-multiset.php:802
|
301 |
+
msgid ""
|
302 |
+
"Something goes wrong trying to insert set field name in edit form. Please "
|
303 |
+
"report it"
|
304 |
+
msgstr ""
|
305 |
+
"Qualcosa è andato storto cercando di inserire il campo nel form di modifica. "
|
306 |
+
"Per favore segnalalo"
|
307 |
|
308 |
+
#: lib/settings/yasr-settings-functions-style.php:46
|
309 |
+
msgid "Style Options"
|
310 |
+
msgstr "Opzioni Stili"
|
|
|
311 |
|
312 |
+
#: lib/settings/yasr-settings-functions-style.php:48
|
313 |
+
msgid "Which color scheme do you want to use?"
|
314 |
+
msgstr "Che schema di colori vuoi usare?"
|
315 |
|
316 |
+
#: lib/settings/yasr-settings-functions-style.php:49
|
317 |
+
msgid "Custom CSS Styles"
|
318 |
+
msgstr "Stili CSS Personalizzati"
|
|
|
319 |
|
320 |
+
#: lib/settings/yasr-settings-functions-style.php:66
|
321 |
+
msgid "Light"
|
322 |
+
msgstr "Chiaro"
|
323 |
|
324 |
+
#: lib/settings/yasr-settings-functions-style.php:71
|
325 |
+
msgid "Dark"
|
326 |
+
msgstr "Scuro"
|
327 |
|
328 |
+
#: lib/settings/yasr-settings-functions-style.php:76
|
329 |
+
msgid "Preview"
|
330 |
+
msgstr "Anteprima"
|
331 |
|
332 |
+
#: lib/settings/yasr-settings-functions-style.php:81
|
333 |
+
msgid "Light theme"
|
334 |
+
msgstr "Tema chiaro"
|
335 |
|
336 |
+
#: lib/settings/yasr-settings-functions-style.php:86
|
337 |
+
msgid "Dark theme"
|
338 |
+
msgstr "Tema scuro"
|
339 |
|
340 |
+
#: lib/settings/yasr-settings-functions-style.php:98
|
341 |
+
msgid ""
|
342 |
+
"Please use text area below to write your own CSS styles to override the "
|
343 |
+
"default ones."
|
344 |
+
msgstr ""
|
345 |
+
"Usa l'area di testo sottostante per scrivere le tue regole CSS che "
|
346 |
+
"sovrascriveranno quelle di default."
|
347 |
|
348 |
+
#: lib/settings/yasr-settings-functions-style.php:100
|
349 |
+
msgid "Leave it blank if you don't know what you're doing."
|
350 |
+
msgstr "Lascialo vuoto se non stai cosa stai facendo."
|
351 |
|
352 |
+
#: lib/settings/yasr-settings-functions.php:29
|
353 |
msgid "General Settings"
|
354 |
msgstr "Impostazioni generali"
|
355 |
|
356 |
+
#: lib/settings/yasr-settings-functions.php:30
|
357 |
msgid "Multi Sets"
|
358 |
msgstr "Set Multipli"
|
359 |
|
360 |
+
#: lib/settings/yasr-settings-functions.php:31
|
361 |
msgid "Aspect & Styles"
|
362 |
msgstr "Aspetto & Stili"
|
363 |
|
364 |
+
#: lib/settings/yasr-settings-functions.php:83
|
365 |
msgid "General settings"
|
366 |
msgstr "Impostazioni Generali"
|
367 |
|
368 |
+
#: lib/settings/yasr-settings-functions.php:84
|
369 |
msgid "Auto insert options"
|
370 |
msgstr "Opzioni inserimento automatico"
|
371 |
|
372 |
+
#: lib/settings/yasr-settings-functions.php:85
|
373 |
msgid "Show \"Overall Rating\" in Archive Page?"
|
374 |
msgstr "Mostrare il \"Voto Complessivo\" nella Pagine Archivio?"
|
375 |
|
376 |
+
#: lib/settings/yasr-settings-functions.php:86
|
377 |
msgid "Show \"Visitor Votes\" in Archive Page?"
|
378 |
msgstr "Mostare il \"Voto Utenti\" nelle Pagine Archivio?"
|
379 |
|
380 |
+
#: lib/settings/yasr-settings-functions.php:87
|
381 |
msgid "Insert custom text to show before / after stars"
|
382 |
msgstr "Inserisci testo personalizzato da mostrare prima / dopo le stelle"
|
383 |
|
384 |
+
#: lib/settings/yasr-settings-functions.php:88
|
385 |
msgid "Do you want show stats for visitors votes?"
|
386 |
msgstr "Vuoi mostrare le statistiche per i voti utenti?"
|
387 |
|
388 |
+
#: lib/settings/yasr-settings-functions.php:89
|
389 |
msgid "Allow only logged in user to vote?"
|
390 |
msgstr "Permettere la votazione ai soli utenti loggati?"
|
391 |
|
392 |
+
#: lib/settings/yasr-settings-functions.php:90
|
393 |
msgid "Do you want to save ip address?"
|
394 |
msgstr "Vuoi salvare l'indirizzo IP?"
|
395 |
|
396 |
+
#: lib/settings/yasr-settings-functions.php:91
|
397 |
msgid "Rich snippet options"
|
398 |
msgstr "Opzioni Rich Snippet"
|
399 |
|
400 |
+
#: lib/settings/yasr-settings-functions.php:92
|
401 |
msgid "How do you want to rate \"Overall Rating\"?"
|
402 |
msgstr "Cosa vuoi usare per inserire il \"Voto Complessivo\"?"
|
403 |
|
404 |
+
#: lib/settings/yasr-settings-functions.php:104
|
|
|
|
|
|
|
|
|
405 |
msgid "Use Auto Insert?"
|
406 |
msgstr "Usare l'inserimento automatico?"
|
407 |
|
408 |
+
#: lib/settings/yasr-settings-functions.php:117
|
409 |
msgid "What?"
|
410 |
msgstr "Cosa?"
|
411 |
|
412 |
+
#: lib/settings/yasr-settings-functions.php:122
|
413 |
msgid "Overall Rating / Author Rating"
|
414 |
msgstr "Voto Complessivo / Voto Autore"
|
415 |
|
416 |
+
#: lib/settings/yasr-settings-functions.php:126 lib/yasr-ajax-functions.php:344
|
417 |
+
msgid "Visitor Votes"
|
418 |
+
msgstr "Voto Utenti"
|
419 |
+
|
420 |
+
#: lib/settings/yasr-settings-functions.php:130
|
421 |
msgid "Both"
|
422 |
msgstr "Entrambi"
|
423 |
|
424 |
+
#: lib/settings/yasr-settings-functions.php:136
|
425 |
msgid "Where?"
|
426 |
msgstr "Dove?"
|
427 |
|
428 |
+
#: lib/settings/yasr-settings-functions.php:141
|
429 |
msgid "Before the post"
|
430 |
msgstr "Prima del contenuto"
|
431 |
|
432 |
+
#: lib/settings/yasr-settings-functions.php:145
|
433 |
msgid "After the post"
|
434 |
msgstr "Dopo il contenuto"
|
435 |
|
436 |
+
#: lib/settings/yasr-settings-functions.php:152
|
437 |
msgid "Size"
|
438 |
msgstr "Grandezza"
|
439 |
|
440 |
+
#: lib/settings/yasr-settings-functions.php:158 lib/yasr-ajax-functions.php:334
|
441 |
+
#: lib/yasr-ajax-functions.php:352
|
442 |
+
msgid "Small"
|
443 |
+
msgstr "Piccolo"
|
444 |
+
|
445 |
+
#: lib/settings/yasr-settings-functions.php:163 lib/yasr-ajax-functions.php:335
|
446 |
+
#: lib/yasr-ajax-functions.php:353
|
447 |
+
msgid "Medium"
|
448 |
+
msgstr "Medio"
|
449 |
+
|
450 |
+
#: lib/settings/yasr-settings-functions.php:168 lib/yasr-ajax-functions.php:336
|
451 |
+
#: lib/yasr-ajax-functions.php:354
|
452 |
+
msgid "Large"
|
453 |
+
msgstr "Grande"
|
454 |
+
|
455 |
+
#: lib/settings/yasr-settings-functions.php:175
|
456 |
msgid "Exclude Pages?"
|
457 |
msgstr "Escludere pagine?"
|
458 |
|
459 |
+
#: lib/settings/yasr-settings-functions.php:179
|
460 |
+
#: lib/settings/yasr-settings-functions.php:199
|
461 |
msgid "Yes"
|
462 |
msgstr "Si"
|
463 |
|
464 |
+
#: lib/settings/yasr-settings-functions.php:184
|
465 |
+
#: lib/settings/yasr-settings-functions.php:204
|
466 |
msgid "No"
|
467 |
msgstr "No"
|
468 |
|
469 |
+
#: lib/settings/yasr-settings-functions.php:196
|
470 |
msgid "Use only in custom post types?"
|
471 |
msgstr "Usare solo nei custom post type?"
|
472 |
|
473 |
+
#: lib/settings/yasr-settings-functions.php:208
|
474 |
msgid "You see this because you use custom post types."
|
475 |
msgstr "Vedi questo perché usi i custom post type."
|
476 |
|
477 |
+
#: lib/settings/yasr-settings-functions.php:210
|
478 |
msgid "If you want to use auto insert only in custom post types, choose Yes"
|
479 |
msgstr ""
|
480 |
"Se vuoi usare l'inserimento automatico solo nei custom post type, spunta Si"
|
481 |
|
482 |
+
#: lib/settings/yasr-settings-functions.php:234
|
483 |
+
#: lib/settings/yasr-settings-functions.php:353 lib/yasr-admin-actions.php:94
|
484 |
#: yasr-settings-page.php:89
|
485 |
msgid "Save Settings"
|
486 |
msgstr "Salva Impostazioni"
|
487 |
|
488 |
+
#: lib/settings/yasr-settings-functions.php:254
|
489 |
msgid ""
|
490 |
"If you enable this, \"Overall Rating\" will be showed not only in the single "
|
491 |
"article or page, but also in pages like Home Page, category pages or "
|
495 |
"articolo o nella singola pagina, ma anche in pagine come l' Home Page, "
|
496 |
"categorie o archivi."
|
497 |
|
498 |
+
#: lib/settings/yasr-settings-functions.php:281
|
499 |
msgid ""
|
500 |
"If you enable this, \"Visitor Votes\" will be showed not only in the single "
|
501 |
"article or page, but also in pages like Home Page, category pages or "
|
505 |
"articolo o nella singola pagina, ma anche in pagine come l' Home Page, "
|
506 |
"categorie o archivi."
|
507 |
|
508 |
+
#: lib/settings/yasr-settings-functions.php:316
|
509 |
msgid "Custom text to display before Overall Rating"
|
510 |
msgstr "Testo personalizzato da visualizzare prima del Voto Complessivo"
|
511 |
|
512 |
+
#: lib/settings/yasr-settings-functions.php:321
|
513 |
msgid "Custom text to display BEFORE Visitor Rating"
|
514 |
msgstr "Testo personalizzato da visualizzare PRIMA del Voto Utenti"
|
515 |
|
516 |
+
#: lib/settings/yasr-settings-functions.php:327
|
517 |
msgid "Custom text to display AFTER Visitor Rating"
|
518 |
msgstr "Testo personalizzato da visualizzare dopo del Voto Utenti"
|
519 |
|
520 |
+
#: lib/settings/yasr-settings-functions.php:332
|
521 |
msgid "Custom text to display when a non logged user has already rated"
|
522 |
msgstr ""
|
523 |
"Testo personalizzato da mostrare quanto un utente non loggato ha già votato"
|
524 |
|
525 |
+
#: lib/settings/yasr-settings-functions.php:337
|
526 |
msgid "Help"
|
527 |
msgstr "Aiuto"
|
528 |
|
529 |
+
#: lib/settings/yasr-settings-functions.php:341
|
530 |
msgid ""
|
531 |
"In the first field you can use %overall_rating% pattern to show the overall "
|
532 |
"rating."
|
534 |
"Nel primo campo puoi usare la variabile %overall_rating% per mostrare il "
|
535 |
"voto complessivo."
|
536 |
|
537 |
+
#: lib/settings/yasr-settings-functions.php:345
|
538 |
msgid ""
|
539 |
"In the Second and Third fields you can use %total_count% pattern to show the "
|
540 |
"total count, and %average% pattern to show the average"
|
542 |
"Nel secondo e terzo campo puoi usare la variabile %total_count% per mostrare "
|
543 |
"il numero dei voti, e %average% per mostare la media"
|
544 |
|
545 |
+
#: lib/settings/yasr-settings-functions.php:386
|
546 |
msgid "Allow only logged-in users"
|
547 |
msgstr "Permetti solo agli utenti loggati"
|
548 |
|
549 |
+
#: lib/settings/yasr-settings-functions.php:390
|
550 |
msgid "Allow everybody (logged in and anonymous)"
|
551 |
msgstr "Permetti a tutti (loggati ed anonimi)"
|
552 |
|
553 |
+
#: lib/settings/yasr-settings-functions.php:418
|
554 |
#, php-format
|
555 |
msgid ""
|
556 |
"Please note that to comply with the %s EU law, you must warn your users that "
|
559 |
"Attenzione: per essere in regola con la legge europea %s, devi avvisare i "
|
560 |
"tuoi utenti che stai salvando il loro indirizzo ip"
|
561 |
|
562 |
+
#: lib/settings/yasr-settings-functions.php:440
|
563 |
msgid "Which rich snippet do you want to use?"
|
564 |
msgstr "Quale rich snippets vuoi usare?"
|
565 |
|
566 |
+
#: lib/settings/yasr-settings-functions.php:444
|
567 |
msgid "Review Rating"
|
568 |
msgstr "Voto Recensione"
|
569 |
|
570 |
+
#: lib/settings/yasr-settings-functions.php:448
|
571 |
msgid "Aggregate Rating"
|
572 |
msgstr "Media Voto Utenti"
|
573 |
|
574 |
+
#: lib/settings/yasr-settings-functions.php:453
|
575 |
msgid "What is this?"
|
576 |
msgstr "Cos'è questo?"
|
577 |
|
578 |
+
#: lib/settings/yasr-settings-functions.php:458
|
579 |
msgid ""
|
580 |
"If you select \"Review Rating\", your site will be indexed from search "
|
581 |
"engines like this: "
|
583 |
"Se hai scelto \"Voto Recensione\", il sito verrà indicizzato dai motori di "
|
584 |
"ricerca così: "
|
585 |
|
586 |
+
#: lib/settings/yasr-settings-functions.php:463
|
587 |
msgid ""
|
588 |
"If, instead, you choose \"Aggregate Rating\", your site will be indexed like "
|
589 |
"this"
|
590 |
msgstr ""
|
591 |
"Se, invece, hai scelto \"Media Voto Utenti\", il sito verrà indicizzato così"
|
592 |
|
593 |
+
#: lib/settings/yasr-settings-functions.php:474
|
594 |
msgid "Select default item type for all post or pages"
|
595 |
msgstr "Seleziona l'item type di default per tutti i post e le pagine"
|
596 |
|
597 |
+
#: lib/settings/yasr-settings-functions.php:479
|
598 |
msgid "Product"
|
599 |
msgstr "Prodotto"
|
600 |
|
601 |
+
#: lib/settings/yasr-settings-functions.php:483
|
602 |
msgid "Place"
|
603 |
msgstr "Posto"
|
604 |
|
605 |
+
#: lib/settings/yasr-settings-functions.php:487
|
606 |
msgid "Recipe"
|
607 |
msgstr "Ricetta"
|
608 |
|
609 |
+
#: lib/settings/yasr-settings-functions.php:491
|
610 |
msgid "BlogPosting"
|
611 |
msgstr "BlogPosting"
|
612 |
|
613 |
+
#: lib/settings/yasr-settings-functions.php:497
|
614 |
msgid ""
|
615 |
"If you need to use BlogPosting as item type, even for just one post or page, "
|
616 |
"please fill these forms"
|
618 |
"Se devi usare BlogPosting come tipologia, anche solo per un post o una "
|
619 |
"pagina, riempi questi form"
|
620 |
|
621 |
+
#: lib/settings/yasr-settings-functions.php:502
|
622 |
msgid "Publisher name (e.g. Google)"
|
623 |
msgstr "Nome editore (es: Google)"
|
624 |
|
625 |
+
#: lib/settings/yasr-settings-functions.php:507
|
626 |
msgid "Logo Url (if empty siteicon will be used instead)"
|
627 |
msgstr "Url del logo (se vuoto verrà usata la siteicon)"
|
628 |
|
629 |
+
#: lib/settings/yasr-settings-functions.php:514
|
630 |
msgid "You can always change it in the single post or page."
|
631 |
msgstr "Puoi sempre cambiarlo nei singoli post o pagine."
|
632 |
|
633 |
+
#: lib/settings/yasr-settings-functions.php:516
|
634 |
msgid ""
|
635 |
"This will affect only the post/page where you didn't change manually the "
|
636 |
"itemtype yet."
|
637 |
msgstr ""
|
638 |
"Funzionerà solo sui post/pagine dove non hai cambiato l'itemtype manualmente."
|
639 |
|
640 |
+
#: lib/settings/yasr-settings-functions.php:536
|
641 |
msgid "Stars"
|
642 |
msgstr "Stelle"
|
643 |
|
644 |
+
#: lib/settings/yasr-settings-functions.php:540
|
645 |
msgid "Numbers"
|
646 |
msgstr "Numeri"
|
647 |
|
648 |
+
#: lib/yasr-admin-actions.php:30
|
649 |
+
msgid "Choose Stars Set"
|
650 |
+
msgstr "Scegli Set Stelle"
|
651 |
+
|
652 |
+
#: lib/yasr-admin-actions.php:73
|
653 |
+
msgid "Looking for more?"
|
654 |
+
msgstr "Ne vuoi altre?"
|
655 |
+
|
656 |
+
#: lib/yasr-admin-actions.php:75
|
657 |
#, php-format
|
658 |
+
msgid "Upgrade to %s"
|
659 |
+
msgstr "Passa a %s"
|
|
|
|
|
|
|
|
|
|
|
|
|
660 |
|
661 |
+
#: lib/yasr-ajax-functions.php:45 lib/yasr-ajax-functions.php:117
|
662 |
+
#: lib/yasr-ajax-functions.php:173 lib/yasr-ajax-functions.php:206
|
663 |
+
#: lib/yasr-ajax-functions.php:487 lib/yasr-ajax-functions.php:798
|
664 |
+
#: lib/yasr-functions.php:207 lib/yasr-functions.php:218
|
665 |
+
#: yasr-settings-page.php:24 yasr-stats-page.php:24
|
666 |
+
msgid "You do not have sufficient permissions to access this page."
|
667 |
+
msgstr "Non hai permessi sufficienti per accedere a questa pagina."
|
668 |
|
669 |
+
#: lib/yasr-ajax-functions.php:83
|
670 |
+
msgid "You've rated it "
|
671 |
+
msgstr "Hai votato "
|
|
|
|
|
672 |
|
673 |
+
#: lib/yasr-ajax-functions.php:87
|
674 |
+
msgid "You've reset the vote"
|
675 |
+
msgstr "Hai resettato il voto"
|
676 |
|
677 |
+
#: lib/yasr-ajax-functions.php:149
|
678 |
+
msgid "Type Saved"
|
679 |
+
msgstr "Tipo Salvato"
|
680 |
+
|
681 |
+
#: lib/yasr-ajax-functions.php:313
|
682 |
+
msgid "Main"
|
683 |
+
msgstr "Principale"
|
684 |
+
|
685 |
+
#: lib/yasr-ajax-functions.php:314
|
686 |
+
msgid "Charts"
|
687 |
+
msgstr "Classifiche"
|
688 |
+
|
689 |
+
#: lib/yasr-ajax-functions.php:317
|
690 |
+
msgid "Read the doc"
|
691 |
+
msgstr "Leggi la documentazione"
|
692 |
+
|
693 |
+
#: lib/yasr-ajax-functions.php:326
|
694 |
+
msgid "Overall Rating / Review"
|
695 |
+
msgstr "Voto Complessivo"
|
696 |
+
|
697 |
+
#: lib/yasr-ajax-functions.php:328
|
698 |
+
msgid "Insert Overall Rating"
|
699 |
+
msgstr "Inserisci Voto Complessivo"
|
700 |
+
|
701 |
+
#: lib/yasr-ajax-functions.php:329
|
702 |
+
msgid "Insert Overall Rating / Review for this post"
|
703 |
+
msgstr "Inserisci Voto Complessivo / Recensione per questo post"
|
704 |
+
|
705 |
+
#: lib/yasr-ajax-functions.php:332 lib/yasr-ajax-functions.php:350
|
706 |
+
msgid "Choose Size"
|
707 |
+
msgstr "Scegli la grandezza"
|
708 |
|
709 |
+
#: lib/yasr-ajax-functions.php:346
|
710 |
+
msgid "Insert Visitor Votes"
|
711 |
+
msgstr "Inserisci Voti Utenti"
|
712 |
|
713 |
+
#: lib/yasr-ajax-functions.php:347
|
714 |
+
msgid "Insert the ability for your visitor to vote"
|
715 |
+
msgstr "Permetti ai tuoi visitatori di votare"
|
716 |
|
717 |
+
#: lib/yasr-ajax-functions.php:364
|
718 |
+
msgid "If you want to insert a Multi Set, pick one:"
|
719 |
+
msgstr "Se vuoi inserire un Set Multiplo, scegline uno:"
|
720 |
|
721 |
+
#: lib/yasr-ajax-functions.php:370
|
722 |
+
msgid "Choose wich set you want to insert."
|
723 |
+
msgstr "Scegli quale Set Multiplo inserire."
|
724 |
|
725 |
+
#: lib/yasr-ajax-functions.php:373 lib/yasr-ajax-functions.php:396
|
726 |
+
msgid "Readonly?"
|
727 |
+
msgstr "Sola lettura?"
|
728 |
|
729 |
+
#: lib/yasr-ajax-functions.php:376 lib/yasr-ajax-functions.php:399
|
730 |
+
msgid ""
|
731 |
+
"If Readonly is checked, only you can insert the votes (in the box above the "
|
732 |
+
"editor)"
|
733 |
+
msgstr ""
|
734 |
+
"Se selezioni sola lettura, solo tu puoi inserire i voti (nel box sotto "
|
735 |
+
"l'editor)"
|
736 |
|
737 |
+
#: lib/yasr-ajax-functions.php:379 lib/yasr-ajax-functions.php:402
|
738 |
+
msgid "Hide Average?"
|
739 |
+
msgstr "Nascondere la media?"
|
|
|
740 |
|
741 |
+
#: lib/yasr-ajax-functions.php:383
|
742 |
+
msgid "Insert Multi Set"
|
743 |
+
msgstr "Inserisci Set Multiplo"
|
744 |
|
745 |
+
#: lib/yasr-ajax-functions.php:393
|
746 |
+
msgid "Insert Multiset:"
|
747 |
+
msgstr "Inserisci Set Multiplo:"
|
748 |
|
749 |
+
#: lib/yasr-ajax-functions.php:407
|
750 |
+
msgid "Insert Multiple Set"
|
751 |
+
msgstr "Inserisci Set Multiplo"
|
752 |
|
753 |
+
#: lib/yasr-ajax-functions.php:423
|
754 |
+
msgid "Ranking reviews"
|
755 |
+
msgstr "Classifica recensioni"
|
|
|
|
|
|
|
|
|
756 |
|
757 |
+
#: lib/yasr-ajax-functions.php:424
|
758 |
+
msgid "Insert Ranking reviews"
|
759 |
+
msgstr "Inserisci classifica recensioni"
|
760 |
|
761 |
+
#: lib/yasr-ajax-functions.php:425
|
762 |
+
msgid "Insert Top 10 ranking for [yasr_overall_rating] shortcode"
|
763 |
+
msgstr "Inserisci la classifica top 10 per lo shortcode [yasr_overall_rating]"
|
764 |
|
765 |
+
#: lib/yasr-ajax-functions.php:429
|
766 |
+
msgid "Users' ranking"
|
767 |
+
msgstr "Classifica degli utenti"
|
768 |
|
769 |
+
#: lib/yasr-ajax-functions.php:430
|
770 |
+
msgid "Insert Users ranking"
|
771 |
+
msgstr "Inserisci Classifica Utenti"
|
772 |
|
773 |
+
#: lib/yasr-ajax-functions.php:431
|
774 |
+
msgid "Insert Top 10 ranking for [yasr_visitor_votes] shortcode"
|
775 |
+
msgstr "Inserisci la classifica top 10 per lo shortcode [yasr_visitor_votes]"
|
776 |
|
777 |
+
#: lib/yasr-ajax-functions.php:435
|
778 |
+
msgid "Most active reviewers"
|
779 |
+
msgstr "Recensori più attivi"
|
|
|
|
|
780 |
|
781 |
+
#: lib/yasr-ajax-functions.php:436
|
782 |
+
msgid "Insert Most Active Reviewers"
|
783 |
+
msgstr "Inserisci i 5 recensori più attivi"
|
|
|
|
|
784 |
|
785 |
+
#: lib/yasr-ajax-functions.php:437
|
786 |
+
msgid "Insert Top 5 active reviewers"
|
787 |
+
msgstr "Inserisci i 5 recensori più attivi"
|
|
|
|
|
788 |
|
789 |
+
#: lib/yasr-ajax-functions.php:441
|
790 |
+
msgid "Most Active Users"
|
791 |
+
msgstr "Utenti più attivi"
|
|
|
|
|
|
|
792 |
|
793 |
+
#: lib/yasr-ajax-functions.php:442
|
794 |
+
msgid "Insert Most Active Users"
|
795 |
+
msgstr "Inserisci i 10 utenti più attivi"
|
|
|
|
|
|
|
796 |
|
797 |
+
#: lib/yasr-ajax-functions.php:443
|
798 |
+
msgid "Insert Top 10 voters [yasr_visitor_votes] shortcode"
|
799 |
+
msgstr "Inserisci i 10 utenti più attivi in [yasr_visitor_votes]"
|
|
|
|
|
|
|
|
|
800 |
|
801 |
+
#: lib/yasr-ajax-functions.php:510 lib/yasr-ajax-functions.php:669
|
802 |
+
msgid "No Recenet votes yet"
|
803 |
+
msgstr "Ancora nessun voto recente"
|
804 |
|
805 |
+
#: lib/yasr-ajax-functions.php:523 lib/yasr-db-functions.php:545
|
806 |
+
#: lib/yasr-stats-functions.php:186 lib/yasr-widgets.php:449
|
807 |
+
msgid "anonymous"
|
808 |
+
msgstr "anonimo"
|
809 |
|
810 |
+
#: lib/yasr-ajax-functions.php:532
|
811 |
+
#, php-format
|
812 |
+
msgid "Vote %d from %s on"
|
813 |
+
msgstr "Voto %d da %s su"
|
814 |
|
815 |
+
#: lib/yasr-ajax-functions.php:548 lib/yasr-ajax-functions.php:696
|
816 |
+
#: lib/yasr-db-functions.php:576
|
817 |
+
msgid "Ip address"
|
818 |
+
msgstr "Indirizzo Ip"
|
819 |
|
820 |
+
#: lib/yasr-ajax-functions.php:566 lib/yasr-ajax-functions.php:713
|
821 |
+
#: lib/yasr-db-functions.php:597 lib/yasr-db-functions.php:724
|
822 |
+
msgid "Pages"
|
823 |
+
msgstr "Pagine"
|
824 |
|
825 |
+
#: lib/yasr-ajax-functions.php:681 lib/yasr-db-functions.php:689
|
826 |
+
#, php-format
|
827 |
+
msgid "You rated %s on "
|
828 |
+
msgstr "Hai votato %s su "
|
829 |
|
830 |
+
#: lib/yasr-ajax-functions.php:875
|
831 |
+
msgid "Error: you can't vote 0"
|
832 |
+
msgstr "Errore: non puoi votare 0"
|
833 |
|
834 |
+
#: lib/yasr-ajax-functions.php:985 lib/yasr-shortcode-functions.php:767
|
835 |
+
#: lib/yasr-shortcode-functions.php:808
|
836 |
+
msgid "Total:"
|
837 |
+
msgstr "Voti:"
|
838 |
|
839 |
+
#: lib/yasr-ajax-functions.php:985
|
840 |
+
msgid "Average:"
|
841 |
+
msgstr "Media:"
|
|
|
|
|
|
|
|
|
842 |
|
843 |
+
#: lib/yasr-ajax-functions.php:986
|
844 |
+
msgid "Vote Saved"
|
845 |
+
msgstr "Voto Salvato"
|
846 |
|
847 |
+
#: lib/yasr-ajax-functions.php:1132
|
848 |
+
msgid "Rating saved!"
|
849 |
+
msgstr "Voto salvato!"
|
850 |
|
851 |
+
#: lib/yasr-ajax-functions.php:1137
|
852 |
+
msgid "Rating not saved. Please Try again"
|
853 |
+
msgstr "Voto non salvato. Per favore riprova"
|
854 |
|
855 |
+
#: lib/yasr-ajax-functions.php:1243
|
856 |
+
msgid "out of 5 stars"
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: lib/yasr-ajax-functions.php:1256
|
860 |
+
msgid "stars"
|
861 |
+
msgstr "stelle"
|
862 |
|
863 |
+
#: lib/yasr-ajax-functions.php:1261
|
864 |
+
msgid "star"
|
865 |
+
msgstr "stella"
|
866 |
|
867 |
+
#: lib/yasr-db-functions.php:281
|
868 |
+
msgid "Missing post or set id"
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: lib/yasr-db-functions.php:530 lib/yasr-db-functions.php:675
|
872 |
+
msgid "No recenet votes yet"
|
873 |
+
msgstr "Ancora nessun voto recente"
|
874 |
|
875 |
+
#: lib/yasr-db-functions.php:554
|
876 |
#, php-format
|
877 |
+
msgid "Vote %d from %s on "
|
878 |
+
msgstr "Voto %d from %s on "
|
879 |
+
|
880 |
+
#: lib/yasr-db-functions.php:690
|
881 |
+
msgid "Date:"
|
882 |
msgstr ""
|
|
|
883 |
|
884 |
+
#: lib/yasr-functions.php:61
|
885 |
+
msgid "bad, poor, ok, good, super"
|
886 |
+
msgstr "pessimo, scarso, ok, buono, super"
|
887 |
|
888 |
+
#: lib/yasr-functions.php:178
|
889 |
+
msgid "Yet Another Stars Rating: settings"
|
890 |
+
msgstr "Yet Another Stars Rating: impostazioni"
|
891 |
|
892 |
+
#: lib/yasr-functions.php:179
|
893 |
+
msgid "Yet Another Stars Rating"
|
894 |
+
msgstr "Yet Another Stars Rating"
|
895 |
|
896 |
+
#: lib/yasr-functions.php:255
|
897 |
+
msgid "Yet Another Stars Rating: Multiple set"
|
898 |
+
msgstr "Yet Another Stars Rating: Set Multipli"
|
899 |
|
900 |
+
#: lib/yasr-functions.php:266
|
901 |
+
msgid "You don't have enought privileges to insert Overall Rating"
|
902 |
+
msgstr "Non hai permessi sufficienti per inserire il Voto Complessivo"
|
903 |
|
904 |
+
#: lib/yasr-functions.php:276
|
905 |
+
msgid "You don't have enough privileges to insert a Multi Set"
|
906 |
+
msgstr "Non hai abbastanza permessi per inserire un Multi Set"
|
907 |
|
908 |
+
#: lib/yasr-functions.php:642
|
909 |
+
msgid "Product, Place, Recipe, BlogPosting"
|
910 |
+
msgstr "Product, Posto, Ricetta, BlogPosting"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
911 |
|
912 |
+
#: lib/yasr-shortcode-functions.php:210 lib/yasr-shortcode-functions.php:229
|
913 |
msgid "You've already voted this article with"
|
914 |
msgstr "Hai già votato questo articolo con"
|
915 |
|
916 |
+
#: lib/yasr-shortcode-functions.php:249 lib/yasr-shortcode-functions.php:522
|
917 |
#, fuzzy
|
918 |
msgid "You must sign in to vote"
|
919 |
msgstr "Devi fare il login per votare"
|
920 |
|
921 |
+
#: lib/yasr-shortcode-functions.php:284
|
922 |
+
msgid "Total: "
|
923 |
+
msgstr "Totale: "
|
924 |
+
|
925 |
+
#: lib/yasr-shortcode-functions.php:284
|
926 |
msgid "Average: "
|
927 |
msgstr "Media Voto: "
|
928 |
|
929 |
+
#: lib/yasr-shortcode-functions.php:423 lib/yasr-shortcode-functions.php:475
|
930 |
+
#: lib/yasr-shortcode-functions.php:767 lib/yasr-shortcode-functions.php:808
|
931 |
msgid "Average"
|
932 |
msgstr "Media"
|
933 |
|
934 |
+
#: lib/yasr-shortcode-functions.php:477
|
935 |
msgid "Submit!"
|
936 |
msgstr "Invia!"
|
937 |
|
938 |
+
#: lib/yasr-shortcode-functions.php:493
|
939 |
msgid "Thank you for voting! "
|
940 |
msgstr "Grazie per aver votato! "
|
941 |
|
942 |
+
#: lib/yasr-shortcode-functions.php:683
|
943 |
msgid "Rating"
|
944 |
msgstr "Voto"
|
945 |
|
946 |
+
#: lib/yasr-shortcode-functions.php:699
|
947 |
msgid "You don't have any votes stored"
|
948 |
msgstr "Non hai alcun voto salvato"
|
949 |
|
950 |
+
#: lib/yasr-shortcode-functions.php:742 lib/yasr-shortcode-functions.php:786
|
951 |
msgid "Post / Page"
|
952 |
msgstr "Post / Pagina"
|
953 |
|
954 |
+
#: lib/yasr-shortcode-functions.php:743 lib/yasr-shortcode-functions.php:787
|
955 |
msgid "Order By"
|
956 |
msgstr "Ordina per"
|
957 |
|
958 |
+
#: lib/yasr-shortcode-functions.php:744 lib/yasr-shortcode-functions.php:788
|
959 |
msgid "Most Rated"
|
960 |
msgstr "Più Votati"
|
961 |
|
962 |
+
#: lib/yasr-shortcode-functions.php:745 lib/yasr-shortcode-functions.php:789
|
963 |
msgid "Highest Rated"
|
964 |
msgstr "Voto più alto"
|
965 |
|
966 |
+
#: lib/yasr-shortcode-functions.php:778
|
|
|
|
|
|
|
|
|
967 |
msgid "You've not enough data"
|
968 |
msgstr "Non hai abbastanza dati"
|
969 |
|
970 |
+
#: lib/yasr-shortcode-functions.php:820
|
971 |
msgid "You've not enought data"
|
972 |
msgstr "Non hai abbastanza dati"
|
973 |
|
974 |
+
#: lib/yasr-shortcode-functions.php:906
|
975 |
msgid ""
|
976 |
"Problem while retrieving the top 5 most active reviewers. Did you publish "
|
977 |
"any review?"
|
979 |
"C'è stato un problema nell'ottenere la classifica dei 5 recensori più "
|
980 |
"attivi. Hai pubblicato qualche recensione?"
|
981 |
|
982 |
+
#: lib/yasr-shortcode-functions.php:974
|
983 |
msgid ""
|
984 |
"Problem while retrieving the top 10 active users chart. Are you sure you "
|
985 |
"have votes to show?"
|
987 |
"C'è stato un problema nell'ottenere la classifica dei 10 utenti più attivi. "
|
988 |
"Sei sicuro di avere voti da mostrare?"
|
989 |
|
990 |
+
#: lib/yasr-shortcode-functions.php:1032
|
991 |
#, php-format
|
992 |
msgid " based on %d votes"
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: lib/yasr-shortcode-functions.php:1046
|
996 |
msgid "No results, try a different setid"
|
997 |
msgstr ""
|
998 |
|
1053 |
msgid "Recent Ratings"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
+
#: yasr-metabox-multiple-rating.php:37
|
1057 |
msgid "Choose wich set you want to use"
|
1058 |
msgstr "Scegli che set vuoi usare"
|
1059 |
|
1060 |
+
#: yasr-metabox-multiple-rating.php:72
|
1061 |
+
msgid "Choose a vote for each element"
|
1062 |
+
msgstr "Scegli un voto per ogni elemento"
|
1063 |
+
|
1064 |
+
#: yasr-metabox-multiple-rating.php:80
|
1065 |
+
msgid "If you want to insert this multiset, paste this shortcode"
|
1066 |
+
msgstr ""
|
1067 |
+
|
1068 |
+
#: yasr-metabox-multiple-rating.php:83
|
1069 |
+
msgid ""
|
1070 |
+
"If, instead, you want allow your visitor to vote on this multiset, use this "
|
1071 |
+
"shortcode"
|
1072 |
+
msgstr ""
|
1073 |
+
"Se, invece, vuoi permettere al visitatore di votare su questo multiset, usa "
|
1074 |
+
"questo shortcode"
|
1075 |
+
|
1076 |
+
#: yasr-metabox-multiple-rating.php:85
|
1077 |
+
msgid "In this case, you don't need to vote here"
|
1078 |
+
msgstr ""
|
1079 |
+
|
1080 |
+
#: yasr-metabox-top-right.php:74 yasr-metabox-top-right.php:108
|
1081 |
msgid "Rate this article / item"
|
1082 |
msgstr "Vota questo articolo / oggetto"
|
1083 |
|
1084 |
+
#: yasr-metabox-top-right.php:80
|
1085 |
+
msgid "Loading, please wait"
|
1086 |
+
msgstr "Caricamento, attendere prego"
|
1087 |
+
|
1088 |
+
#: yasr-metabox-top-right.php:156
|
1089 |
msgid "Save Vote"
|
1090 |
msgstr "Salva Voto"
|
1091 |
|
1092 |
+
#: yasr-metabox-top-right.php:184
|
1093 |
msgid "Disable auto insert for this post or page?"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
+
#: yasr-metabox-top-right.php:207
|
1097 |
msgid "This review is about a..."
|
1098 |
msgstr "Questa recensione è..."
|
1099 |
|
1100 |
+
#: yasr-metabox-top-right.php:230
|
1101 |
msgid ""
|
1102 |
"Remember to insert this shortcode <strong>[yasr_overall_rating]</strong> "
|
1103 |
"where you want to display this rating"
|
1157 |
msgid "Save"
|
1158 |
msgstr "Salva"
|
1159 |
|
1160 |
+
#: yet-another-stars-rating.php:314
|
1161 |
msgid "Buy Yasr Pro"
|
1162 |
msgstr ""
|
1163 |
|
1164 |
+
#: yet-another-stars-rating.php:322
|
1165 |
+
msgid "Thank you for using Yasr Pro"
|
1166 |
+
msgstr ""
|
1167 |
+
|
1168 |
+
#: yet-another-stars-rating.php:377
|
1169 |
+
#, php-format
|
1170 |
+
msgid "Please check the %s and choose your brand new stars set"
|
1171 |
+
msgstr ""
|
1172 |
+
|
1173 |
+
#~ msgid "If you want to insert this multiset, paste this shortcode "
|
1174 |
+
#~ msgstr "Se vuoi inserire questo Set Multiplo, incolla questo shortcode "
|
1175 |
+
|
1176 |
+
#~ msgid "Choose a vote for every element"
|
1177 |
+
#~ msgstr "Scegli un voto per ogni elemento"
|
1178 |
+
|
1179 |
+
#~ msgid "Do you want disable jQuery?"
|
1180 |
+
#~ msgstr "Vuoi disabilitare jQuery?"
|
1181 |
+
|
1182 |
#~ msgid "Import Gd Star Rating"
|
1183 |
#~ msgstr "Importa Gd Star Rating"
|
1184 |
|
languages/yet-another-stars-rating.pot
CHANGED
@@ -1,810 +1,1025 @@
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: YASR lenguages\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
"PO-Revision-Date: 2016-07-04 10:26+0100\n"
|
6 |
"Last-Translator: Dario <thedudoworld@gmail.com>\n"
|
7 |
"Language-Team: \n"
|
8 |
-
"Language:
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit
|
13 |
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
"X-Poedit-Basepath: .\n"
|
15 |
"X-Poedit-SearchPath-0: ..\n"
|
16 |
"X-Poedit-SearchPath-1: ../lib\n"
|
17 |
|
18 |
-
#: ../
|
19 |
-
msgid "
|
20 |
msgstr ""
|
21 |
|
22 |
-
#: ../
|
23 |
-
|
24 |
-
msgid "Loading, please wait"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: ../
|
28 |
-
msgid "
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: ../
|
32 |
-
msgid "
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: ../
|
36 |
-
msgid "
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: ../
|
40 |
-
|
41 |
-
msgid "Select"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: ../
|
45 |
-
msgid ""
|
46 |
-
"Remember to insert this shortcode <strong>[yasr_overall_rating]</strong> "
|
47 |
-
"where you want to display this rating"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: ../
|
51 |
-
|
52 |
-
#: ../lib/yasr-ajax-functions.php:228 ../lib/yasr-ajax-functions.php:386
|
53 |
-
#: ../lib/yasr-ajax-functions.php:815 ../lib/yasr-ajax-functions.php:1129
|
54 |
-
msgid "You do not have sufficient permissions to access this page."
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: ../
|
58 |
-
msgid "
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: ../
|
62 |
-
|
|
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: ../
|
66 |
-
|
|
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: ../
|
70 |
-
msgid "
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: ../
|
74 |
-
msgid "
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: ../
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: ../
|
83 |
-
msgid "
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: ../
|
87 |
-
msgid "
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: ../
|
91 |
-
msgid "
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: ../
|
95 |
-
msgid "
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: ../yasr-settings-
|
99 |
-
msgid "
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: ../yasr-settings-
|
103 |
-
msgid "
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: ../yasr-settings-
|
107 |
-
msgid "
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: ../yasr-settings-
|
111 |
-
msgid "
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: ../yasr-settings-
|
115 |
-
msgid "
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: ../yasr-settings-
|
119 |
-
msgid "
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: ../yasr-settings-
|
123 |
-
msgid "
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: ../yasr-settings-
|
|
|
127 |
msgid ""
|
128 |
-
"
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: ../yasr-settings-
|
132 |
-
msgid "
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: ../yasr-settings-
|
136 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: ../yasr-settings-
|
|
|
|
|
|
|
|
|
|
|
140 |
msgid ""
|
141 |
-
"
|
142 |
-
"
|
|
|
|
|
|
|
|
|
|
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: ../yasr-settings-
|
146 |
msgid ""
|
147 |
-
"
|
148 |
-
"
|
149 |
-
|
150 |
-
|
|
|
|
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: ../yasr-settings-
|
154 |
msgid ""
|
155 |
-
"
|
156 |
-
"
|
157 |
-
"the star in the graphic editor and select \"Insert Multi Set\"."
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: ../yasr-settings-
|
161 |
-
msgid "
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: ../yasr-settings-
|
165 |
-
msgid "
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: ../yasr-settings-
|
169 |
-
msgid "
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: ../yasr-settings-
|
173 |
-
msgid "
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: ../yasr-settings-
|
177 |
-
|
178 |
-
"
|
179 |
-
"Reviews extension."
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: ../yasr-settings-
|
183 |
-
|
184 |
-
msgid "Get this extension"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: ../yasr-settings-
|
188 |
-
|
|
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: ../yasr-settings-
|
192 |
-
|
|
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: ../yasr-
|
196 |
-
|
|
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: ../lib/yasr-
|
200 |
-
#: ../lib/yasr-
|
201 |
-
msgid "
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: ../lib/yasr-
|
205 |
-
#: ../lib/yasr-
|
206 |
-
msgid "
|
|
|
|
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: ../lib/yasr-
|
210 |
-
#: ../lib/yasr-
|
211 |
-
msgid "
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: ../lib/yasr-
|
215 |
-
|
|
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: ../lib/yasr-
|
219 |
-
#: ../lib/yasr-
|
220 |
-
|
221 |
-
#: ../lib/yasr-shortcode-functions.php:920
|
222 |
-
msgid "Average"
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: ../lib/yasr-
|
226 |
-
msgid "
|
227 |
msgstr ""
|
228 |
|
229 |
-
#: ../lib/yasr-
|
230 |
-
|
|
|
231 |
msgstr ""
|
232 |
|
233 |
-
#: ../lib/yasr-
|
234 |
-
msgid "
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: ../lib/yasr-
|
238 |
-
msgid "
|
239 |
msgstr ""
|
240 |
|
241 |
-
#: ../lib/yasr-
|
242 |
-
|
243 |
-
msgid "Post / Page"
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: ../lib/yasr-
|
247 |
-
|
248 |
-
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: ../lib/yasr-
|
252 |
-
|
253 |
-
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: ../lib/yasr-
|
257 |
-
|
258 |
-
|
|
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: ../lib/yasr-
|
262 |
-
|
263 |
-
msgid "Total:"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: ../lib/yasr-
|
267 |
-
msgid "
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: ../lib/yasr-
|
271 |
-
msgid "
|
272 |
msgstr ""
|
273 |
|
274 |
-
#: ../lib/yasr-
|
275 |
-
msgid ""
|
276 |
-
|
277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: ../lib/yasr-
|
281 |
msgid ""
|
282 |
-
"
|
283 |
-
"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: ../lib/yasr-
|
287 |
-
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: ../lib/yasr-settings-functions.php:
|
|
|
|
|
|
|
|
|
292 |
msgid "General settings"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: ../lib/yasr-settings-functions.php:
|
296 |
msgid "Auto insert options"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: ../lib/yasr-settings-functions.php:
|
300 |
msgid "Show \"Overall Rating\" in Archive Page?"
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: ../lib/yasr-settings-functions.php:
|
304 |
msgid "Show \"Visitor Votes\" in Archive Page?"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: ../lib/yasr-settings-functions.php:
|
308 |
msgid "Insert custom text to show before / after stars"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: ../lib/yasr-settings-functions.php:
|
312 |
msgid "Do you want show stats for visitors votes?"
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: ../lib/yasr-settings-functions.php:
|
316 |
msgid "Allow only logged in user to vote?"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: ../lib/yasr-settings-functions.php:
|
|
|
|
|
|
|
|
|
320 |
msgid "Rich snippet options"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: ../lib/yasr-settings-functions.php:
|
324 |
msgid "How do you want to rate \"Overall Rating\"?"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: ../lib/yasr-settings-functions.php:
|
328 |
msgid "Use Auto Insert?"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: ../lib/yasr-settings-functions.php:
|
332 |
msgid "What?"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: ../lib/yasr-settings-functions.php:
|
336 |
msgid "Overall Rating / Author Rating"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: ../lib/
|
|
|
340 |
msgid "Visitor Votes"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: ../lib/yasr-settings-functions.php:
|
344 |
msgid "Both"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: ../lib/yasr-settings-functions.php:
|
348 |
msgid "Where?"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: ../lib/yasr-settings-functions.php:
|
352 |
msgid "Before the post"
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: ../lib/yasr-settings-functions.php:
|
356 |
msgid "After the post"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: ../lib/yasr-settings-functions.php:
|
|
|
|
|
360 |
msgid "Size"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: ../lib/
|
364 |
-
#: ../lib/yasr-ajax-functions.php:
|
|
|
|
|
|
|
|
|
365 |
msgid "Small"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: ../lib/
|
369 |
-
#: ../lib/yasr-ajax-functions.php:
|
|
|
|
|
|
|
|
|
370 |
msgid "Medium"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: ../lib/
|
374 |
-
#: ../lib/yasr-ajax-functions.php:
|
|
|
|
|
|
|
|
|
375 |
msgid "Large"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: ../lib/yasr-settings-functions.php:
|
379 |
msgid "Exclude Pages?"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: ../lib/yasr-settings-functions.php:
|
383 |
-
#: ../lib/yasr-settings-functions.php:
|
|
|
|
|
|
|
|
|
384 |
msgid "Yes"
|
385 |
msgstr ""
|
386 |
|
387 |
-
#: ../lib/yasr-settings-functions.php:
|
388 |
-
#: ../lib/yasr-settings-functions.php:
|
|
|
|
|
|
|
|
|
|
|
389 |
msgid "No"
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: ../lib/yasr-settings-functions.php:
|
393 |
msgid "Use only in custom post types?"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: ../lib/yasr-settings-functions.php:
|
397 |
msgid "You see this because you use custom post types."
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: ../lib/yasr-settings-functions.php:
|
401 |
msgid "If you want to use auto insert only in custom post types, choose Yes"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: ../lib/yasr-settings-functions.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
msgid ""
|
406 |
"If you enable this, \"Overall Rating\" will be showed not only in the single "
|
407 |
"article or page, but also in pages like Home Page, category pages or "
|
408 |
"archives."
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: ../lib/yasr-settings-functions.php:
|
412 |
msgid ""
|
413 |
"If you enable this, \"Visitor Votes\" will be showed not only in the single "
|
414 |
"article or page, but also in pages like Home Page, category pages or "
|
415 |
"archives."
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: ../lib/yasr-settings-functions.php:
|
419 |
msgid "Custom text to display before Overall Rating"
|
420 |
msgstr ""
|
421 |
|
422 |
-
#: ../lib/yasr-settings-functions.php:
|
423 |
msgid "Custom text to display BEFORE Visitor Rating"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: ../lib/yasr-settings-functions.php:
|
427 |
msgid "Custom text to display AFTER Visitor Rating"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: ../lib/yasr-settings-functions.php:
|
431 |
msgid "Custom text to display when a non logged user has already rated"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: ../lib/yasr-settings-functions.php:
|
435 |
msgid "Help"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: ../lib/yasr-settings-functions.php:
|
439 |
msgid ""
|
440 |
"In the first field you can use %overall_rating% pattern to show the overall "
|
441 |
"rating."
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: ../lib/yasr-settings-functions.php:
|
445 |
msgid ""
|
446 |
"In the Second and Third fields you can use %total_count% pattern to show the "
|
447 |
"total count, and %average% pattern to show the average"
|
448 |
msgstr ""
|
449 |
|
450 |
-
#: ../lib/yasr-settings-functions.php:
|
451 |
msgid "Allow only logged-in users"
|
452 |
msgstr ""
|
453 |
|
454 |
-
#: ../lib/yasr-settings-functions.php:
|
455 |
msgid "Allow everybody (logged in and anonymous)"
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: ../lib/yasr-settings-functions.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
msgid "Which rich snippet do you want to use?"
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: ../lib/yasr-settings-functions.php:
|
463 |
msgid "Review Rating"
|
464 |
msgstr ""
|
465 |
|
466 |
-
#: ../lib/yasr-settings-functions.php:
|
467 |
msgid "Aggregate Rating"
|
468 |
msgstr ""
|
469 |
|
470 |
-
#: ../lib/yasr-settings-functions.php:
|
471 |
msgid "What is this?"
|
472 |
msgstr ""
|
473 |
|
474 |
-
#: ../lib/yasr-settings-functions.php:
|
475 |
msgid ""
|
476 |
"If you select \"Review Rating\", your site will be indexed from search "
|
477 |
"engines like this: "
|
478 |
msgstr ""
|
479 |
|
480 |
-
#: ../lib/yasr-settings-functions.php:
|
481 |
msgid ""
|
482 |
"If, instead, you choose \"Aggregate Rating\", your site will be indexed like "
|
483 |
"this"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#: ../lib/yasr-settings-functions.php:
|
487 |
msgid "Select default item type for all post or pages"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: ../lib/yasr-settings-functions.php:
|
491 |
msgid "Product"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#: ../lib/yasr-settings-functions.php:
|
495 |
msgid "Place"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: ../lib/yasr-settings-functions.php:
|
499 |
msgid "Recipe"
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: ../lib/yasr-settings-functions.php:
|
503 |
msgid "BlogPosting"
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: ../lib/yasr-settings-functions.php:
|
507 |
msgid ""
|
508 |
"If you need to use BlogPosting as item type, even for just one post or page, "
|
509 |
"please fill these forms"
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: ../lib/yasr-settings-functions.php:
|
513 |
msgid "Publisher name (e.g. Google)"
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: ../lib/yasr-settings-functions.php:
|
517 |
msgid "Logo Url (if empty siteicon will be used instead)"
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: ../lib/yasr-settings-functions.php:
|
521 |
msgid "You can always change it in the single post or page."
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: ../lib/yasr-settings-functions.php:
|
525 |
msgid ""
|
526 |
"This will affect only the post/page where you didn't change manually the "
|
527 |
"itemtype yet."
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: ../lib/yasr-settings-functions.php:
|
531 |
msgid "Stars"
|
532 |
msgstr ""
|
533 |
|
534 |
-
#: ../lib/yasr-settings-functions.php:
|
535 |
msgid "Numbers"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: ../lib/yasr-
|
539 |
-
|
|
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: ../lib/yasr-
|
543 |
-
msgid ""
|
544 |
-
"If you select no, the \"Average\" row will not be displayed. You can "
|
545 |
-
"override this in the single multi set by using the parameter \"show_average\""
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: ../lib/yasr-
|
549 |
-
|
|
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: ../lib/yasr-
|
553 |
-
|
554 |
-
|
555 |
-
|
|
|
|
|
556 |
msgstr ""
|
557 |
|
558 |
-
#: ../lib/yasr-
|
559 |
-
msgid "
|
560 |
msgstr ""
|
561 |
|
562 |
-
#: ../lib/yasr-
|
563 |
-
msgid "You
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: ../lib/yasr-
|
567 |
-
msgid "
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: ../lib/yasr-
|
571 |
-
msgid "
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: ../lib/yasr-
|
575 |
-
|
576 |
-
msgid "Manage Multiple Set"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: ../lib/yasr-
|
580 |
-
msgid "
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: ../lib/yasr-
|
584 |
-
|
585 |
-
msgid "Field name"
|
586 |
msgstr ""
|
587 |
|
588 |
-
#: ../lib/yasr-
|
589 |
-
|
590 |
-
msgid "Remove"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: ../lib/yasr-
|
594 |
-
|
595 |
-
msgid "Remove whole set?"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: ../lib/yasr-
|
599 |
-
#: ../
|
600 |
-
msgid ""
|
601 |
-
"If you remove something you will remove all the votes for that set or field. "
|
602 |
-
"This operation CAN'T BE undone."
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: ../lib/yasr-
|
606 |
-
|
607 |
-
msgid "You can use up to 9 elements"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: ../lib/yasr-
|
611 |
-
|
612 |
-
msgid "Add element"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: ../lib/yasr-
|
616 |
-
|
617 |
-
msgid "Save changes"
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: ../lib/yasr-
|
621 |
-
msgid "
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: ../lib/yasr-
|
625 |
-
|
626 |
-
msgid "Settings Saved"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: ../lib/yasr-
|
630 |
-
msgid "
|
|
|
|
|
631 |
msgstr ""
|
632 |
|
633 |
-
#: ../lib/yasr-
|
634 |
-
msgid "
|
635 |
msgstr ""
|
636 |
|
637 |
-
#: ../lib/yasr-
|
638 |
-
msgid "
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: ../lib/yasr-
|
642 |
-
msgid ""
|
643 |
-
"Something goes wrong trying to delete a Multi Set's element. Please report it"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: ../lib/yasr-
|
647 |
-
msgid ""
|
648 |
-
"Something goes wrong trying to update a Multi Set's element. Please report it"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: ../lib/yasr-
|
652 |
-
msgid ""
|
653 |
-
"Something goes wrong trying to insert set field name in edit form. Please "
|
654 |
-
"report it"
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: ../lib/yasr-
|
658 |
-
msgid "
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: ../lib/yasr-
|
662 |
-
msgid "
|
663 |
msgstr ""
|
664 |
|
665 |
-
#: ../lib/yasr-
|
666 |
-
msgid "
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: ../lib/yasr-
|
670 |
-
msgid "
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: ../lib/yasr-
|
674 |
-
msgid "
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: ../lib/yasr-
|
678 |
-
msgid "
|
679 |
msgstr ""
|
680 |
|
681 |
-
#: ../lib/yasr-
|
682 |
-
msgid "
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: ../lib/yasr-
|
686 |
-
msgid "
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: ../lib/yasr-
|
690 |
-
msgid ""
|
691 |
-
"Please use text area below to write your own CSS styles to override the "
|
692 |
-
"default ones."
|
693 |
msgstr ""
|
694 |
|
695 |
-
#: ../lib/yasr-
|
696 |
-
msgid "
|
697 |
msgstr ""
|
698 |
|
699 |
-
#: ../lib/yasr-
|
700 |
-
msgid "
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: ../lib/yasr-
|
704 |
-
|
705 |
-
msgid ""
|
706 |
-
"Hey, seems like you reached %s votes on your site throught YASR! That's cool!"
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: ../lib/yasr-
|
710 |
-
|
|
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: ../lib/yasr-
|
714 |
-
|
715 |
-
|
|
|
716 |
|
717 |
-
#: ../lib/yasr-
|
718 |
-
|
|
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: ../lib/yasr-
|
722 |
-
|
|
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: ../lib/yasr-
|
726 |
-
|
|
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: ../lib/yasr-
|
730 |
-
msgid "
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: ../lib/yasr-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
|
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: ../lib/yasr-
|
742 |
-
msgid "
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: ../lib/yasr-
|
746 |
-
msgid "
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: ../lib/yasr-
|
750 |
-
msgid "
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: ../lib/yasr-
|
754 |
-
|
755 |
-
msgid "Vote %d from %s on "
|
756 |
msgstr ""
|
757 |
|
758 |
-
#: ../lib/yasr-
|
759 |
-
|
760 |
-
msgid "Ip address"
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: ../lib/yasr-
|
764 |
-
#: ../
|
765 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: ../lib/yasr-db-functions.php:
|
769 |
#, php-format
|
770 |
-
msgid "
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: ../lib/yasr-functions.php:
|
|
|
|
|
|
|
|
|
774 |
msgid "bad, poor, ok, good, super"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: ../lib/yasr-functions.php:
|
778 |
-
msgid "Yet Another Stars Rating:
|
|
|
|
|
|
|
|
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: ../lib/yasr-functions.php:
|
782 |
msgid "Yet Another Stars Rating: Multiple set"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: ../lib/yasr-functions.php:
|
786 |
msgid "You don't have enought privileges to insert Overall Rating"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: ../lib/yasr-functions.php:
|
790 |
msgid "You don't have enough privileges to insert a Multi Set"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: ../lib/yasr-functions.php:
|
794 |
msgid "Product, Place, Recipe, BlogPosting"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: ../lib/yasr-
|
798 |
-
|
|
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: ../lib/yasr-
|
802 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: ../lib/yasr-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
806 |
#, php-format
|
807 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
808 |
msgstr ""
|
809 |
|
810 |
#: ../lib/yasr-widgets.php:43
|
@@ -819,270 +1034,510 @@ msgstr ""
|
|
819 |
msgid "Our Rating:"
|
820 |
msgstr ""
|
821 |
|
822 |
-
#: ../lib/yasr-widgets.php:123 ../lib/yasr-widgets.php:
|
|
|
823 |
msgid "Title:"
|
824 |
msgstr ""
|
825 |
|
826 |
-
#: ../lib/yasr-widgets.php:127 ../lib/yasr-widgets.php:
|
827 |
msgid "Size:"
|
828 |
msgstr ""
|
829 |
|
830 |
-
#: ../lib/yasr-widgets.php:
|
831 |
msgid "Yasr Visitor Votes"
|
832 |
msgstr ""
|
833 |
|
834 |
-
#: ../lib/yasr-widgets.php:
|
835 |
msgid "Show Yasr Visitor Votes"
|
836 |
msgstr ""
|
837 |
|
838 |
-
#: ../lib/yasr-widgets.php:
|
839 |
msgid "Rate This:"
|
840 |
msgstr ""
|
841 |
|
842 |
-
#: ../lib/yasr-
|
843 |
-
msgid "
|
844 |
msgstr ""
|
845 |
|
846 |
-
#: ../lib/yasr-
|
847 |
-
msgid "
|
848 |
msgstr ""
|
849 |
|
850 |
-
#: ../lib/yasr-
|
851 |
-
|
|
|
852 |
msgstr ""
|
853 |
|
854 |
-
#: ../lib/yasr-
|
855 |
-
msgid ""
|
856 |
-
"There was an error while trying to insert the review type. Please report it"
|
857 |
msgstr ""
|
858 |
|
859 |
-
#: ../
|
|
|
|
|
|
|
|
|
860 |
msgid "Choose a vote for each element"
|
861 |
msgstr ""
|
862 |
|
863 |
-
#: ../
|
864 |
-
msgid "If you want to insert this multiset, paste this shortcode
|
865 |
msgstr ""
|
866 |
|
867 |
-
#: ../
|
868 |
msgid ""
|
869 |
"If, instead, you want allow your visitor to vote on this multiset, use this "
|
870 |
"shortcode"
|
871 |
msgstr ""
|
872 |
|
873 |
-
#: ../
|
874 |
-
msgid "
|
875 |
msgstr ""
|
876 |
|
877 |
-
#: ../
|
878 |
-
msgid "
|
879 |
msgstr ""
|
880 |
|
881 |
-
#: ../
|
882 |
-
|
|
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: ../
|
886 |
-
msgid "
|
887 |
msgstr ""
|
888 |
|
889 |
-
#: ../
|
890 |
-
msgid "
|
891 |
msgstr ""
|
892 |
|
893 |
-
#: ../
|
894 |
-
msgid "
|
895 |
msgstr ""
|
896 |
|
897 |
-
#: ../
|
898 |
-
msgid "
|
|
|
|
|
899 |
msgstr ""
|
900 |
|
901 |
-
#: ../
|
902 |
-
msgid "
|
903 |
msgstr ""
|
904 |
|
905 |
-
#: ../
|
906 |
-
msgid "
|
907 |
msgstr ""
|
908 |
|
909 |
-
#: ../
|
910 |
-
msgid "
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: ../
|
914 |
-
msgid "
|
|
|
|
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: ../
|
918 |
-
msgid "
|
|
|
|
|
|
|
|
|
919 |
msgstr ""
|
920 |
|
921 |
-
#: ../
|
922 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: ../
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
926 |
msgid ""
|
927 |
-
"
|
928 |
-
"
|
929 |
msgstr ""
|
930 |
|
931 |
-
#: ../
|
932 |
-
msgid "
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: ../
|
936 |
-
msgid "
|
937 |
msgstr ""
|
938 |
|
939 |
-
#: ../
|
940 |
-
msgid "
|
941 |
msgstr ""
|
942 |
|
943 |
-
#: ../
|
944 |
-
msgid "
|
945 |
msgstr ""
|
946 |
|
947 |
-
#: ../
|
948 |
-
msgid "Ranking
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: ../
|
952 |
-
|
|
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: ../
|
956 |
-
|
|
|
957 |
msgstr ""
|
958 |
|
959 |
-
#: ../
|
960 |
-
|
|
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: ../
|
964 |
-
msgid "
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: ../
|
968 |
-
msgid "
|
969 |
msgstr ""
|
970 |
|
971 |
-
#: ../
|
972 |
-
msgid "
|
|
|
|
|
973 |
msgstr ""
|
974 |
|
975 |
-
#: ../
|
976 |
-
msgid "
|
|
|
|
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: ../
|
980 |
-
msgid "
|
|
|
|
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: ../
|
984 |
-
msgid "
|
|
|
|
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: ../
|
988 |
-
msgid "
|
989 |
msgstr ""
|
990 |
|
991 |
-
#: ../
|
992 |
-
msgid "
|
993 |
msgstr ""
|
994 |
|
995 |
-
#: ../
|
996 |
-
msgid "
|
997 |
msgstr ""
|
998 |
|
999 |
-
#: ../
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1000 |
msgid ""
|
1001 |
-
"
|
1002 |
-
"
|
1003 |
msgstr ""
|
1004 |
|
1005 |
-
#: ../
|
1006 |
-
msgid "
|
1007 |
msgstr ""
|
1008 |
|
1009 |
-
#: ../
|
1010 |
-
msgid "
|
1011 |
msgstr ""
|
1012 |
|
1013 |
-
#: ../
|
1014 |
-
msgid "
|
1015 |
msgstr ""
|
1016 |
|
1017 |
-
#: ../
|
1018 |
-
|
|
|
1019 |
msgstr ""
|
1020 |
|
1021 |
-
#: ../
|
1022 |
-
msgid "
|
1023 |
msgstr ""
|
1024 |
|
1025 |
-
#: ../
|
1026 |
-
msgid "
|
1027 |
msgstr ""
|
1028 |
|
1029 |
-
#: ../
|
1030 |
-
msgid "
|
1031 |
msgstr ""
|
1032 |
|
1033 |
-
#: ../
|
1034 |
-
msgid "
|
1035 |
msgstr ""
|
1036 |
|
1037 |
-
#: ../
|
1038 |
-
msgid "
|
1039 |
msgstr ""
|
1040 |
|
1041 |
-
#: ../
|
1042 |
-
msgid "
|
1043 |
msgstr ""
|
1044 |
|
1045 |
-
#: ../
|
1046 |
-
msgid "
|
1047 |
msgstr ""
|
1048 |
|
1049 |
-
#: ../
|
1050 |
-
msgid "
|
|
|
|
|
|
|
|
|
1051 |
msgstr ""
|
1052 |
|
1053 |
-
#: ../
|
1054 |
#, php-format
|
1055 |
-
msgid "
|
1056 |
msgstr ""
|
1057 |
|
1058 |
-
#: ../
|
1059 |
-
|
|
|
1060 |
msgstr ""
|
1061 |
|
1062 |
-
#: ../
|
1063 |
-
msgid "
|
1064 |
msgstr ""
|
1065 |
|
1066 |
-
#: ../
|
1067 |
-
msgid "
|
1068 |
msgstr ""
|
1069 |
|
1070 |
-
#: ../
|
1071 |
-
msgid "
|
1072 |
msgstr ""
|
1073 |
|
1074 |
-
#: ../
|
1075 |
-
msgid "
|
1076 |
msgstr ""
|
1077 |
|
1078 |
-
#: ../
|
1079 |
-
msgid "
|
1080 |
msgstr ""
|
1081 |
|
1082 |
-
#: ../
|
1083 |
-
msgid "
|
1084 |
msgstr ""
|
1085 |
|
1086 |
-
#: ../
|
1087 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1088 |
msgstr ""
|
1 |
+
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: YASR lenguages\n"
|
5 |
+
"POT-Creation-Date: 2018-12-26 14:56+0100\n"
|
6 |
"PO-Revision-Date: 2016-07-04 10:26+0100\n"
|
7 |
"Last-Translator: Dario <thedudoworld@gmail.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
+
"Language: en\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.0.6\n"
|
14 |
"X-Poedit-KeywordsList: __;_e\n"
|
15 |
"X-Poedit-Basepath: .\n"
|
16 |
"X-Poedit-SearchPath-0: ..\n"
|
17 |
"X-Poedit-SearchPath-1: ../lib\n"
|
18 |
|
19 |
+
#: ../lib/class-wp-list-table.php:160
|
20 |
+
msgid "List View"
|
21 |
msgstr ""
|
22 |
|
23 |
+
#: ../lib/class-wp-list-table.php:161
|
24 |
+
msgid "Excerpt View"
|
|
|
25 |
msgstr ""
|
26 |
|
27 |
+
#: ../lib/class-wp-list-table.php:325
|
28 |
+
msgid "No items found."
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: ../lib/class-wp-list-table.php:454
|
32 |
+
msgid "Select bulk action"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: ../lib/class-wp-list-table.php:456
|
36 |
+
msgid "Bulk Actions"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: ../lib/class-wp-list-table.php:466
|
40 |
+
msgid "Apply"
|
|
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: ../lib/class-wp-list-table.php:518 ../lib/class-wp-list-table.php:1337
|
44 |
+
msgid "Show more details"
|
|
|
|
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: ../lib/class-wp-list-table.php:585
|
48 |
+
msgid "Filter by date"
|
|
|
|
|
|
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: ../lib/class-wp-list-table.php:587
|
52 |
+
msgid "All dates"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: ../lib/class-wp-list-table.php:602
|
56 |
+
#, php-format
|
57 |
+
msgid "%1$s %2$d"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: ../lib/class-wp-list-table.php:661 ../lib/class-wp-list-table.php:682
|
61 |
+
#: ../lib/class-wp-list-table.php:704
|
62 |
+
msgid "No comments"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: ../lib/class-wp-list-table.php:682
|
66 |
+
msgid "No approved comments"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: ../lib/class-wp-list-table.php:704
|
70 |
+
msgid "No pending comments"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: ../lib/class-wp-list-table.php:817
|
74 |
+
msgid "First page"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: ../lib/class-wp-list-table.php:828
|
78 |
+
msgid "Previous page"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: ../lib/class-wp-list-table.php:835 ../lib/class-wp-list-table.php:839
|
82 |
+
msgid "Current Page"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: ../lib/class-wp-list-table.php:853
|
86 |
+
msgid "Next page"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: ../lib/class-wp-list-table.php:864
|
90 |
+
msgid "Last page"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: ../lib/class-wp-list-table.php:1086
|
94 |
+
msgid "Select All"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:47
|
98 |
+
msgid "Upgrade to YASR Pro"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:52
|
102 |
+
msgid " User Reviews"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:53
|
106 |
+
msgid " Custom Rankings"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:54
|
110 |
+
msgid " 20 + ready to use themes"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:55
|
114 |
+
msgid " Upload your own theme"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:56
|
118 |
+
msgid " Dedicate support"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:86
|
122 |
+
msgid "Keep in touch!"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:125
|
126 |
+
#, php-format
|
127 |
msgid ""
|
128 |
+
"Hey, seems like you reached %s votes on your site throught YASR! That's cool!"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:127
|
132 |
+
msgid "Can I ask a favor?"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:129
|
136 |
+
msgid "Can you please rate YASR 5 stars on"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:131
|
140 |
+
msgid " It will require just 1 min but it's a HUGE help for me. Thank you."
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:137
|
144 |
+
msgid "Ok, I'm glad to help!"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:138
|
148 |
+
msgid "Remind me later!"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:139
|
152 |
+
msgid "Don't need to ask, I already did it!"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: ../lib/settings/yasr-settings-functions-misc.php:172
|
156 |
+
#, php-format
|
157 |
msgid ""
|
158 |
+
"Thank you for using <a href=\"%s\" target=\"_blank\">Yet Another Stars "
|
159 |
+
"Rating</a>. Please <a href=\"%s\" target=\"_blank\">rate it</a> 5 stars on "
|
160 |
+
"<a href=\"%s\" target=\"_blank\">WordPress.org</a>"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:49
|
164 |
+
msgid "Show average?"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:77
|
168 |
msgid ""
|
169 |
+
"If you select no, the \"Average\" row will not be displayed. You can "
|
170 |
+
"override this in the single multi set by using the parameter \"show_average\""
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:106
|
174 |
+
msgid "Add New Multiple Set"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:107
|
178 |
msgid ""
|
179 |
+
"Name, Element#1 and Element#2 MUST be filled and must be long at least 3 "
|
180 |
+
"characters"
|
|
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:110
|
184 |
+
msgid "Name"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:115
|
188 |
+
msgid "You can insert up to nine elements"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:120
|
192 |
+
msgid "Element "
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:130
|
196 |
+
msgid "Create New Set"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:150
|
200 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:183
|
201 |
+
msgid "Manage Multiple Set"
|
|
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:152
|
205 |
+
msgid "Wich set do you want to edit or remove?"
|
|
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:160
|
209 |
+
#: ../yasr-metabox-multiple-rating.php:48 ../yasr-metabox-top-right.php:212
|
210 |
+
msgid "Select"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:193
|
214 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:310
|
215 |
+
msgid "Field name"
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:197
|
219 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:314
|
220 |
+
msgid "Remove"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:239
|
224 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:356
|
225 |
+
msgid "Remove whole set?"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:252
|
229 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:369
|
230 |
+
msgid ""
|
231 |
+
"If you remove something you will remove all the votes for that set or field. "
|
232 |
+
"This operation CAN'T BE undone."
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:259
|
236 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:376
|
237 |
+
msgid "You can use up to 9 elements"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:261
|
241 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:378
|
242 |
+
msgid "Add element"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:263
|
246 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:380
|
247 |
+
msgid "Save changes"
|
|
|
|
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:273
|
251 |
+
msgid "No Multiple Set were found"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:519
|
255 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:817
|
256 |
+
msgid "Settings Saved"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:524
|
260 |
+
msgid "Something goes wrong trying insert set field name. Please report it"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:530
|
264 |
+
msgid "Something goes wrong trying insert Multi Set name. Please report it"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:603
|
268 |
+
msgid "Something goes wrong trying to delete a Multi Set . Please report it"
|
|
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:649
|
272 |
+
msgid ""
|
273 |
+
"Something goes wrong trying to delete a Multi Set's element. Please report it"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:713
|
277 |
+
msgid ""
|
278 |
+
"Something goes wrong trying to update a Multi Set's element. Please report it"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: ../lib/settings/yasr-settings-functions-multiset.php:802
|
282 |
+
msgid ""
|
283 |
+
"Something goes wrong trying to insert set field name in edit form. Please "
|
284 |
+
"report it"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: ../lib/settings/yasr-settings-functions-style.php:46
|
288 |
+
msgid "Style Options"
|
|
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: ../lib/settings/yasr-settings-functions-style.php:48
|
292 |
+
msgid "Which color scheme do you want to use?"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: ../lib/settings/yasr-settings-functions-style.php:49
|
296 |
+
msgid "Custom CSS Styles"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: ../lib/settings/yasr-settings-functions-style.php:66
|
300 |
+
msgid "Light"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: ../lib/settings/yasr-settings-functions-style.php:71
|
304 |
+
msgid "Dark"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: ../lib/settings/yasr-settings-functions-style.php:76
|
308 |
+
msgid "Preview"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: ../lib/settings/yasr-settings-functions-style.php:81
|
312 |
+
msgid "Light theme"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: ../lib/settings/yasr-settings-functions-style.php:86
|
316 |
+
msgid "Dark theme"
|
317 |
msgstr ""
|
318 |
|
319 |
+
#: ../lib/settings/yasr-settings-functions-style.php:98
|
320 |
msgid ""
|
321 |
+
"Please use text area below to write your own CSS styles to override the "
|
322 |
+
"default ones."
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: ../lib/settings/yasr-settings-functions-style.php:100
|
326 |
+
msgid "Leave it blank if you don't know what you're doing."
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: ../lib/settings/yasr-settings-functions.php:29
|
330 |
+
msgid "General Settings"
|
331 |
+
msgstr ""
|
332 |
+
|
333 |
+
#: ../lib/settings/yasr-settings-functions.php:30
|
334 |
+
msgid "Multi Sets"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: ../lib/settings/yasr-settings-functions.php:31
|
338 |
+
msgid "Aspect & Styles"
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: ../lib/settings/yasr-settings-functions.php:83
|
342 |
msgid "General settings"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: ../lib/settings/yasr-settings-functions.php:84
|
346 |
msgid "Auto insert options"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: ../lib/settings/yasr-settings-functions.php:85
|
350 |
msgid "Show \"Overall Rating\" in Archive Page?"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: ../lib/settings/yasr-settings-functions.php:86
|
354 |
msgid "Show \"Visitor Votes\" in Archive Page?"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: ../lib/settings/yasr-settings-functions.php:87
|
358 |
msgid "Insert custom text to show before / after stars"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: ../lib/settings/yasr-settings-functions.php:88
|
362 |
msgid "Do you want show stats for visitors votes?"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: ../lib/settings/yasr-settings-functions.php:89
|
366 |
msgid "Allow only logged in user to vote?"
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: ../lib/settings/yasr-settings-functions.php:90
|
370 |
+
msgid "Do you want to save ip address?"
|
371 |
+
msgstr ""
|
372 |
+
|
373 |
+
#: ../lib/settings/yasr-settings-functions.php:91
|
374 |
msgid "Rich snippet options"
|
375 |
msgstr ""
|
376 |
|
377 |
+
#: ../lib/settings/yasr-settings-functions.php:92
|
378 |
msgid "How do you want to rate \"Overall Rating\"?"
|
379 |
msgstr ""
|
380 |
|
381 |
+
#: ../lib/settings/yasr-settings-functions.php:104
|
382 |
msgid "Use Auto Insert?"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: ../lib/settings/yasr-settings-functions.php:117
|
386 |
msgid "What?"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: ../lib/settings/yasr-settings-functions.php:122
|
390 |
msgid "Overall Rating / Author Rating"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: ../lib/settings/yasr-settings-functions.php:126
|
394 |
+
#: ../lib/yasr-ajax-functions.php:344
|
395 |
msgid "Visitor Votes"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: ../lib/settings/yasr-settings-functions.php:130
|
399 |
msgid "Both"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: ../lib/settings/yasr-settings-functions.php:136
|
403 |
msgid "Where?"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: ../lib/settings/yasr-settings-functions.php:141
|
407 |
msgid "Before the post"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: ../lib/settings/yasr-settings-functions.php:145
|
411 |
msgid "After the post"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: ../lib/settings/yasr-settings-functions.php:152
|
415 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:53
|
416 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:244
|
417 |
msgid "Size"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: ../lib/settings/yasr-settings-functions.php:158
|
421 |
+
#: ../lib/yasr-ajax-functions.php:334 ../lib/yasr-ajax-functions.php:352
|
422 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:58
|
423 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:249
|
424 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:137
|
425 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:77
|
426 |
msgid "Small"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: ../lib/settings/yasr-settings-functions.php:163
|
430 |
+
#: ../lib/yasr-ajax-functions.php:335 ../lib/yasr-ajax-functions.php:353
|
431 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:63
|
432 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:254
|
433 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:138
|
434 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:82
|
435 |
msgid "Medium"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: ../lib/settings/yasr-settings-functions.php:168
|
439 |
+
#: ../lib/yasr-ajax-functions.php:336 ../lib/yasr-ajax-functions.php:354
|
440 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:68
|
441 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:259
|
442 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:139
|
443 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:87
|
444 |
msgid "Large"
|
445 |
msgstr ""
|
446 |
|
447 |
+
#: ../lib/settings/yasr-settings-functions.php:175
|
448 |
msgid "Exclude Pages?"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: ../lib/settings/yasr-settings-functions.php:179
|
452 |
+
#: ../lib/settings/yasr-settings-functions.php:199
|
453 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:102
|
454 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:155
|
455 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:338
|
456 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:391
|
457 |
msgid "Yes"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: ../lib/settings/yasr-settings-functions.php:184
|
461 |
+
#: ../lib/settings/yasr-settings-functions.php:204
|
462 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:75
|
463 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:98
|
464 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:151
|
465 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:334
|
466 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:387
|
467 |
msgid "No"
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: ../lib/settings/yasr-settings-functions.php:196
|
471 |
msgid "Use only in custom post types?"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: ../lib/settings/yasr-settings-functions.php:208
|
475 |
msgid "You see this because you use custom post types."
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: ../lib/settings/yasr-settings-functions.php:210
|
479 |
msgid "If you want to use auto insert only in custom post types, choose Yes"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: ../lib/settings/yasr-settings-functions.php:234
|
483 |
+
#: ../lib/settings/yasr-settings-functions.php:353
|
484 |
+
#: ../lib/yasr-admin-actions.php:94 ../yasr-settings-page.php:89
|
485 |
+
#: ../yasr_pro/yasr-stylish/yasr-st-settings.php:112
|
486 |
+
msgid "Save Settings"
|
487 |
+
msgstr ""
|
488 |
+
|
489 |
+
#: ../lib/settings/yasr-settings-functions.php:254
|
490 |
msgid ""
|
491 |
"If you enable this, \"Overall Rating\" will be showed not only in the single "
|
492 |
"article or page, but also in pages like Home Page, category pages or "
|
493 |
"archives."
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: ../lib/settings/yasr-settings-functions.php:281
|
497 |
msgid ""
|
498 |
"If you enable this, \"Visitor Votes\" will be showed not only in the single "
|
499 |
"article or page, but also in pages like Home Page, category pages or "
|
500 |
"archives."
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: ../lib/settings/yasr-settings-functions.php:316
|
504 |
msgid "Custom text to display before Overall Rating"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: ../lib/settings/yasr-settings-functions.php:321
|
508 |
msgid "Custom text to display BEFORE Visitor Rating"
|
509 |
msgstr ""
|
510 |
|
511 |
+
#: ../lib/settings/yasr-settings-functions.php:327
|
512 |
msgid "Custom text to display AFTER Visitor Rating"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: ../lib/settings/yasr-settings-functions.php:332
|
516 |
msgid "Custom text to display when a non logged user has already rated"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: ../lib/settings/yasr-settings-functions.php:337
|
520 |
msgid "Help"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: ../lib/settings/yasr-settings-functions.php:341
|
524 |
msgid ""
|
525 |
"In the first field you can use %overall_rating% pattern to show the overall "
|
526 |
"rating."
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: ../lib/settings/yasr-settings-functions.php:345
|
530 |
msgid ""
|
531 |
"In the Second and Third fields you can use %total_count% pattern to show the "
|
532 |
"total count, and %average% pattern to show the average"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: ../lib/settings/yasr-settings-functions.php:386
|
536 |
msgid "Allow only logged-in users"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: ../lib/settings/yasr-settings-functions.php:390
|
540 |
msgid "Allow everybody (logged in and anonymous)"
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: ../lib/settings/yasr-settings-functions.php:418
|
544 |
+
#, php-format
|
545 |
+
msgid ""
|
546 |
+
"Please note that to comply with the %s EU law, you must warn your users that "
|
547 |
+
"you're storing their ip"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: ../lib/settings/yasr-settings-functions.php:440
|
551 |
msgid "Which rich snippet do you want to use?"
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: ../lib/settings/yasr-settings-functions.php:444
|
555 |
msgid "Review Rating"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: ../lib/settings/yasr-settings-functions.php:448
|
559 |
msgid "Aggregate Rating"
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: ../lib/settings/yasr-settings-functions.php:453
|
563 |
msgid "What is this?"
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: ../lib/settings/yasr-settings-functions.php:458
|
567 |
msgid ""
|
568 |
"If you select \"Review Rating\", your site will be indexed from search "
|
569 |
"engines like this: "
|
570 |
msgstr ""
|
571 |
|
572 |
+
#: ../lib/settings/yasr-settings-functions.php:463
|
573 |
msgid ""
|
574 |
"If, instead, you choose \"Aggregate Rating\", your site will be indexed like "
|
575 |
"this"
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: ../lib/settings/yasr-settings-functions.php:474
|
579 |
msgid "Select default item type for all post or pages"
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: ../lib/settings/yasr-settings-functions.php:479
|
583 |
msgid "Product"
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: ../lib/settings/yasr-settings-functions.php:483
|
587 |
msgid "Place"
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: ../lib/settings/yasr-settings-functions.php:487
|
591 |
msgid "Recipe"
|
592 |
msgstr ""
|
593 |
|
594 |
+
#: ../lib/settings/yasr-settings-functions.php:491
|
595 |
msgid "BlogPosting"
|
596 |
msgstr ""
|
597 |
|
598 |
+
#: ../lib/settings/yasr-settings-functions.php:497
|
599 |
msgid ""
|
600 |
"If you need to use BlogPosting as item type, even for just one post or page, "
|
601 |
"please fill these forms"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: ../lib/settings/yasr-settings-functions.php:502
|
605 |
msgid "Publisher name (e.g. Google)"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: ../lib/settings/yasr-settings-functions.php:507
|
609 |
msgid "Logo Url (if empty siteicon will be used instead)"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: ../lib/settings/yasr-settings-functions.php:514
|
613 |
msgid "You can always change it in the single post or page."
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: ../lib/settings/yasr-settings-functions.php:516
|
617 |
msgid ""
|
618 |
"This will affect only the post/page where you didn't change manually the "
|
619 |
"itemtype yet."
|
620 |
msgstr ""
|
621 |
|
622 |
+
#: ../lib/settings/yasr-settings-functions.php:536
|
623 |
msgid "Stars"
|
624 |
msgstr ""
|
625 |
|
626 |
+
#: ../lib/settings/yasr-settings-functions.php:540
|
627 |
msgid "Numbers"
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: ../lib/yasr-admin-actions.php:30
|
631 |
+
#: ../yasr_pro/yasr-stylish/yasr-st-settings.php:12
|
632 |
+
msgid "Choose Stars Set"
|
633 |
msgstr ""
|
634 |
|
635 |
+
#: ../lib/yasr-admin-actions.php:73
|
636 |
+
msgid "Looking for more?"
|
|
|
|
|
637 |
msgstr ""
|
638 |
|
639 |
+
#: ../lib/yasr-admin-actions.php:75
|
640 |
+
#, php-format
|
641 |
+
msgid "Upgrade to %s"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: ../lib/yasr-ajax-functions.php:45 ../lib/yasr-ajax-functions.php:117
|
645 |
+
#: ../lib/yasr-ajax-functions.php:173 ../lib/yasr-ajax-functions.php:206
|
646 |
+
#: ../lib/yasr-ajax-functions.php:487 ../lib/yasr-ajax-functions.php:798
|
647 |
+
#: ../lib/yasr-functions.php:207 ../lib/yasr-functions.php:218
|
648 |
+
#: ../yasr-settings-page.php:24 ../yasr-stats-page.php:24
|
649 |
+
msgid "You do not have sufficient permissions to access this page."
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: ../lib/yasr-ajax-functions.php:83
|
653 |
+
msgid "You've rated it "
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: ../lib/yasr-ajax-functions.php:87
|
657 |
+
msgid "You've reset the vote"
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: ../lib/yasr-ajax-functions.php:149
|
661 |
+
msgid "Type Saved"
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: ../lib/yasr-ajax-functions.php:313
|
665 |
+
msgid "Main"
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: ../lib/yasr-ajax-functions.php:314
|
669 |
+
msgid "Charts"
|
|
|
670 |
msgstr ""
|
671 |
|
672 |
+
#: ../lib/yasr-ajax-functions.php:317
|
673 |
+
msgid "Read the doc"
|
674 |
msgstr ""
|
675 |
|
676 |
+
#: ../lib/yasr-ajax-functions.php:326
|
677 |
+
msgid "Overall Rating / Review"
|
|
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: ../lib/yasr-ajax-functions.php:328
|
681 |
+
msgid "Insert Overall Rating"
|
|
|
682 |
msgstr ""
|
683 |
|
684 |
+
#: ../lib/yasr-ajax-functions.php:329
|
685 |
+
msgid "Insert Overall Rating / Review for this post"
|
|
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: ../lib/yasr-ajax-functions.php:332 ../lib/yasr-ajax-functions.php:350
|
689 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:135
|
690 |
+
msgid "Choose Size"
|
|
|
|
|
691 |
msgstr ""
|
692 |
|
693 |
+
#: ../lib/yasr-ajax-functions.php:346
|
694 |
+
msgid "Insert Visitor Votes"
|
|
|
695 |
msgstr ""
|
696 |
|
697 |
+
#: ../lib/yasr-ajax-functions.php:347
|
698 |
+
msgid "Insert the ability for your visitor to vote"
|
|
|
699 |
msgstr ""
|
700 |
|
701 |
+
#: ../lib/yasr-ajax-functions.php:364
|
702 |
+
msgid "If you want to insert a Multi Set, pick one:"
|
|
|
703 |
msgstr ""
|
704 |
|
705 |
+
#: ../lib/yasr-ajax-functions.php:370
|
706 |
+
msgid "Choose wich set you want to insert."
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: ../lib/yasr-ajax-functions.php:373 ../lib/yasr-ajax-functions.php:396
|
710 |
+
msgid "Readonly?"
|
|
|
711 |
msgstr ""
|
712 |
|
713 |
+
#: ../lib/yasr-ajax-functions.php:376 ../lib/yasr-ajax-functions.php:399
|
714 |
+
msgid ""
|
715 |
+
"If Readonly is checked, only you can insert the votes (in the box above the "
|
716 |
+
"editor)"
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: ../lib/yasr-ajax-functions.php:379 ../lib/yasr-ajax-functions.php:402
|
720 |
+
msgid "Hide Average?"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: ../lib/yasr-ajax-functions.php:383
|
724 |
+
msgid "Insert Multi Set"
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: ../lib/yasr-ajax-functions.php:393
|
728 |
+
msgid "Insert Multiset:"
|
|
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: ../lib/yasr-ajax-functions.php:407
|
732 |
+
msgid "Insert Multiple Set"
|
|
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: ../lib/yasr-ajax-functions.php:423
|
736 |
+
msgid "Ranking reviews"
|
|
|
|
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: ../lib/yasr-ajax-functions.php:424
|
740 |
+
msgid "Insert Ranking reviews"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: ../lib/yasr-ajax-functions.php:425
|
744 |
+
msgid "Insert Top 10 ranking for [yasr_overall_rating] shortcode"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: ../lib/yasr-ajax-functions.php:429
|
748 |
+
msgid "Users' ranking"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: ../lib/yasr-ajax-functions.php:430
|
752 |
+
msgid "Insert Users ranking"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: ../lib/yasr-ajax-functions.php:431
|
756 |
+
msgid "Insert Top 10 ranking for [yasr_visitor_votes] shortcode"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: ../lib/yasr-ajax-functions.php:435
|
760 |
+
msgid "Most active reviewers"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: ../lib/yasr-ajax-functions.php:436
|
764 |
+
msgid "Insert Most Active Reviewers"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: ../lib/yasr-ajax-functions.php:437
|
768 |
+
msgid "Insert Top 5 active reviewers"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: ../lib/yasr-ajax-functions.php:441
|
772 |
+
msgid "Most Active Users"
|
|
|
|
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: ../lib/yasr-ajax-functions.php:442
|
776 |
+
msgid "Insert Most Active Users"
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: ../lib/yasr-ajax-functions.php:443
|
780 |
+
msgid "Insert Top 10 voters [yasr_visitor_votes] shortcode"
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: ../lib/yasr-ajax-functions.php:510 ../lib/yasr-ajax-functions.php:669
|
784 |
+
msgid "No Recenet votes yet"
|
|
|
|
|
785 |
msgstr ""
|
786 |
|
787 |
+
#: ../lib/yasr-ajax-functions.php:523 ../lib/yasr-db-functions.php:545
|
788 |
+
#: ../lib/yasr-stats-functions.php:186 ../lib/yasr-widgets.php:449
|
789 |
+
msgid "anonymous"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: ../lib/yasr-ajax-functions.php:532
|
793 |
+
#, php-format
|
794 |
+
msgid "Vote %d from %s on"
|
795 |
+
msgstr ""
|
796 |
|
797 |
+
#: ../lib/yasr-ajax-functions.php:548 ../lib/yasr-ajax-functions.php:696
|
798 |
+
#: ../lib/yasr-db-functions.php:576
|
799 |
+
msgid "Ip address"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: ../lib/yasr-ajax-functions.php:566 ../lib/yasr-ajax-functions.php:713
|
803 |
+
#: ../lib/yasr-db-functions.php:597 ../lib/yasr-db-functions.php:724
|
804 |
+
msgid "Pages"
|
805 |
msgstr ""
|
806 |
|
807 |
+
#: ../lib/yasr-ajax-functions.php:681 ../lib/yasr-db-functions.php:689
|
808 |
+
#, php-format
|
809 |
+
msgid "You rated %s on "
|
810 |
msgstr ""
|
811 |
|
812 |
+
#: ../lib/yasr-ajax-functions.php:875
|
813 |
+
msgid "Error: you can't vote 0"
|
814 |
msgstr ""
|
815 |
|
816 |
+
#: ../lib/yasr-ajax-functions.php:985 ../lib/yasr-shortcode-functions.php:767
|
817 |
+
#: ../lib/yasr-shortcode-functions.php:808
|
818 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:283
|
819 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:319
|
820 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:290
|
821 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:320
|
822 |
+
msgid "Total:"
|
823 |
msgstr ""
|
824 |
|
825 |
+
#: ../lib/yasr-ajax-functions.php:985
|
826 |
+
msgid "Average:"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: ../lib/yasr-ajax-functions.php:986
|
830 |
+
msgid "Vote Saved"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: ../lib/yasr-ajax-functions.php:1132
|
834 |
+
msgid "Rating saved!"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: ../lib/yasr-ajax-functions.php:1137
|
838 |
+
msgid "Rating not saved. Please Try again"
|
|
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: ../lib/yasr-ajax-functions.php:1243
|
842 |
+
msgid "out of 5 stars"
|
|
|
843 |
msgstr ""
|
844 |
|
845 |
+
#: ../lib/yasr-ajax-functions.php:1256
|
846 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:179
|
847 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:215
|
848 |
+
msgid "stars"
|
849 |
+
msgstr ""
|
850 |
+
|
851 |
+
#: ../lib/yasr-ajax-functions.php:1261
|
852 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:189
|
853 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:218
|
854 |
+
msgid "star"
|
855 |
+
msgstr ""
|
856 |
+
|
857 |
+
#: ../lib/yasr-db-functions.php:281
|
858 |
+
msgid "Missing post or set id"
|
859 |
+
msgstr ""
|
860 |
+
|
861 |
+
#: ../lib/yasr-db-functions.php:530 ../lib/yasr-db-functions.php:675
|
862 |
+
msgid "No recenet votes yet"
|
863 |
msgstr ""
|
864 |
|
865 |
+
#: ../lib/yasr-db-functions.php:554
|
866 |
#, php-format
|
867 |
+
msgid "Vote %d from %s on "
|
868 |
msgstr ""
|
869 |
|
870 |
+
#: ../lib/yasr-db-functions.php:690
|
871 |
+
msgid "Date:"
|
872 |
+
msgstr ""
|
873 |
+
|
874 |
+
#: ../lib/yasr-functions.php:61
|
875 |
msgid "bad, poor, ok, good, super"
|
876 |
msgstr ""
|
877 |
|
878 |
+
#: ../lib/yasr-functions.php:178
|
879 |
+
msgid "Yet Another Stars Rating: settings"
|
880 |
+
msgstr ""
|
881 |
+
|
882 |
+
#: ../lib/yasr-functions.php:179
|
883 |
+
msgid "Yet Another Stars Rating"
|
884 |
msgstr ""
|
885 |
|
886 |
+
#: ../lib/yasr-functions.php:255
|
887 |
msgid "Yet Another Stars Rating: Multiple set"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: ../lib/yasr-functions.php:266
|
891 |
msgid "You don't have enought privileges to insert Overall Rating"
|
892 |
msgstr ""
|
893 |
|
894 |
+
#: ../lib/yasr-functions.php:276
|
895 |
msgid "You don't have enough privileges to insert a Multi Set"
|
896 |
msgstr ""
|
897 |
|
898 |
+
#: ../lib/yasr-functions.php:642
|
899 |
msgid "Product, Place, Recipe, BlogPosting"
|
900 |
msgstr ""
|
901 |
|
902 |
+
#: ../lib/yasr-shortcode-functions.php:210
|
903 |
+
#: ../lib/yasr-shortcode-functions.php:229
|
904 |
+
msgid "You've already voted this article with"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: ../lib/yasr-shortcode-functions.php:249
|
908 |
+
#: ../lib/yasr-shortcode-functions.php:522
|
909 |
+
msgid "You must sign in to vote"
|
910 |
+
msgstr ""
|
911 |
+
|
912 |
+
#: ../lib/yasr-shortcode-functions.php:284
|
913 |
+
msgid "Total: "
|
914 |
+
msgstr ""
|
915 |
+
|
916 |
+
#: ../lib/yasr-shortcode-functions.php:284
|
917 |
+
msgid "Average: "
|
918 |
+
msgstr ""
|
919 |
+
|
920 |
+
#: ../lib/yasr-shortcode-functions.php:423
|
921 |
+
#: ../lib/yasr-shortcode-functions.php:475
|
922 |
+
#: ../lib/yasr-shortcode-functions.php:767
|
923 |
+
#: ../lib/yasr-shortcode-functions.php:808
|
924 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:283
|
925 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:319
|
926 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:290
|
927 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:320
|
928 |
+
msgid "Average"
|
929 |
+
msgstr ""
|
930 |
+
|
931 |
+
#: ../lib/yasr-shortcode-functions.php:477
|
932 |
+
msgid "Submit!"
|
933 |
+
msgstr ""
|
934 |
+
|
935 |
+
#: ../lib/yasr-shortcode-functions.php:493
|
936 |
+
msgid "Thank you for voting! "
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: ../lib/yasr-shortcode-functions.php:683
|
940 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:170
|
941 |
+
msgid "Rating"
|
942 |
+
msgstr ""
|
943 |
+
|
944 |
+
#: ../lib/yasr-shortcode-functions.php:699
|
945 |
+
msgid "You don't have any votes stored"
|
946 |
+
msgstr ""
|
947 |
+
|
948 |
+
#: ../lib/yasr-shortcode-functions.php:742
|
949 |
+
#: ../lib/yasr-shortcode-functions.php:786
|
950 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:267
|
951 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:304
|
952 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:277
|
953 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:307
|
954 |
+
msgid "Post / Page"
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: ../lib/yasr-shortcode-functions.php:743
|
958 |
+
#: ../lib/yasr-shortcode-functions.php:787
|
959 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:268
|
960 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:305
|
961 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:278
|
962 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:308
|
963 |
+
msgid "Order By"
|
964 |
+
msgstr ""
|
965 |
+
|
966 |
+
#: ../lib/yasr-shortcode-functions.php:744
|
967 |
+
#: ../lib/yasr-shortcode-functions.php:788
|
968 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:268
|
969 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:268
|
970 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:305
|
971 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:278
|
972 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:308
|
973 |
+
msgid "Most Rated"
|
974 |
+
msgstr ""
|
975 |
+
|
976 |
+
#: ../lib/yasr-shortcode-functions.php:745
|
977 |
+
#: ../lib/yasr-shortcode-functions.php:789
|
978 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:272
|
979 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:268
|
980 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:305
|
981 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:278
|
982 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:308
|
983 |
+
msgid "Highest Rated"
|
984 |
+
msgstr ""
|
985 |
+
|
986 |
+
#: ../lib/yasr-shortcode-functions.php:778
|
987 |
+
msgid "You've not enough data"
|
988 |
+
msgstr ""
|
989 |
+
|
990 |
+
#: ../lib/yasr-shortcode-functions.php:820
|
991 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:300
|
992 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:332
|
993 |
+
msgid "You've not enought data"
|
994 |
+
msgstr ""
|
995 |
+
|
996 |
+
#: ../lib/yasr-shortcode-functions.php:906
|
997 |
+
msgid ""
|
998 |
+
"Problem while retrieving the top 5 most active reviewers. Did you publish "
|
999 |
+
"any review?"
|
1000 |
+
msgstr ""
|
1001 |
+
|
1002 |
+
#: ../lib/yasr-shortcode-functions.php:974
|
1003 |
+
msgid ""
|
1004 |
+
"Problem while retrieving the top 10 active users chart. Are you sure you "
|
1005 |
+
"have votes to show?"
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: ../lib/yasr-shortcode-functions.php:1032
|
1009 |
#, php-format
|
1010 |
+
msgid " based on %d votes"
|
1011 |
+
msgstr ""
|
1012 |
+
|
1013 |
+
#: ../lib/yasr-shortcode-functions.php:1046
|
1014 |
+
msgid "No results, try a different setid"
|
1015 |
+
msgstr ""
|
1016 |
+
|
1017 |
+
#: ../lib/yasr-stats-functions.php:30 ../yasr-stats-page.php:38
|
1018 |
+
msgid "Logs"
|
1019 |
+
msgstr ""
|
1020 |
+
|
1021 |
+
#: ../lib/yasr-stats-functions.php:34
|
1022 |
+
msgid "Upgrade"
|
1023 |
msgstr ""
|
1024 |
|
1025 |
#: ../lib/yasr-widgets.php:43
|
1034 |
msgid "Our Rating:"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
+
#: ../lib/yasr-widgets.php:123 ../lib/yasr-widgets.php:313
|
1038 |
+
#: ../lib/yasr-widgets.php:506
|
1039 |
msgid "Title:"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
+
#: ../lib/yasr-widgets.php:127 ../lib/yasr-widgets.php:321
|
1043 |
msgid "Size:"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
+
#: ../lib/yasr-widgets.php:209
|
1047 |
msgid "Yasr Visitor Votes"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
+
#: ../lib/yasr-widgets.php:211
|
1051 |
msgid "Show Yasr Visitor Votes"
|
1052 |
msgstr ""
|
1053 |
|
1054 |
+
#: ../lib/yasr-widgets.php:282
|
1055 |
msgid "Rate This:"
|
1056 |
msgstr ""
|
1057 |
|
1058 |
+
#: ../lib/yasr-widgets.php:406
|
1059 |
+
msgid "Yasr Recent Ratings"
|
1060 |
msgstr ""
|
1061 |
|
1062 |
+
#: ../lib/yasr-widgets.php:408
|
1063 |
+
msgid "Show the 5 most recent rated posts"
|
1064 |
msgstr ""
|
1065 |
|
1066 |
+
#: ../lib/yasr-widgets.php:460
|
1067 |
+
#, php-format
|
1068 |
+
msgid "Vote %s from %s on"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: ../lib/yasr-widgets.php:499
|
1072 |
+
msgid "Recent Ratings"
|
|
|
1073 |
msgstr ""
|
1074 |
|
1075 |
+
#: ../yasr-metabox-multiple-rating.php:37
|
1076 |
+
msgid "Choose wich set you want to use"
|
1077 |
+
msgstr ""
|
1078 |
+
|
1079 |
+
#: ../yasr-metabox-multiple-rating.php:72
|
1080 |
msgid "Choose a vote for each element"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: ../yasr-metabox-multiple-rating.php:80
|
1084 |
+
msgid "If you want to insert this multiset, paste this shortcode"
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: ../yasr-metabox-multiple-rating.php:83
|
1088 |
msgid ""
|
1089 |
"If, instead, you want allow your visitor to vote on this multiset, use this "
|
1090 |
"shortcode"
|
1091 |
msgstr ""
|
1092 |
|
1093 |
+
#: ../yasr-metabox-multiple-rating.php:85
|
1094 |
+
msgid "In this case, you don't need to vote here"
|
1095 |
msgstr ""
|
1096 |
|
1097 |
+
#: ../yasr-metabox-top-right.php:74 ../yasr-metabox-top-right.php:108
|
1098 |
+
msgid "Rate this article / item"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
+
#: ../yasr-metabox-top-right.php:80
|
1102 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:399
|
1103 |
+
msgid "Loading, please wait"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: ../yasr-metabox-top-right.php:156
|
1107 |
+
msgid "Save Vote"
|
1108 |
msgstr ""
|
1109 |
|
1110 |
+
#: ../yasr-metabox-top-right.php:184
|
1111 |
+
msgid "Disable auto insert for this post or page?"
|
1112 |
msgstr ""
|
1113 |
|
1114 |
+
#: ../yasr-metabox-top-right.php:207
|
1115 |
+
msgid "This review is about a..."
|
1116 |
msgstr ""
|
1117 |
|
1118 |
+
#: ../yasr-metabox-top-right.php:230
|
1119 |
+
msgid ""
|
1120 |
+
"Remember to insert this shortcode <strong>[yasr_overall_rating]</strong> "
|
1121 |
+
"where you want to display this rating"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: ../yasr-settings-page.php:38
|
1125 |
+
msgid "Settings"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: ../yasr-settings-page.php:132
|
1129 |
+
msgid "Manage Multi Set"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: ../yasr-settings-page.php:136
|
1133 |
+
msgid "What is a Multi Set?"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: ../yasr-settings-page.php:141
|
1137 |
+
msgid ""
|
1138 |
+
"Multi Set allows you to insert a rate for each aspect about the product / "
|
1139 |
+
"local business / whetever you're reviewing, example in the image below."
|
1140 |
msgstr ""
|
1141 |
|
1142 |
+
#: ../yasr-settings-page.php:145
|
1143 |
+
msgid ""
|
1144 |
+
"You can create up to 99 different Multi Set and each one can contain up to 9 "
|
1145 |
+
"different fields. Once you've saved it, you can insert the rates while "
|
1146 |
+
"typing your article in the box below the editor, as you can see in this "
|
1147 |
+
"image (click to see it larger)"
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: ../yasr-settings-page.php:149
|
1151 |
+
msgid ""
|
1152 |
+
"In order to insert your Multi Sets into a post or page, you can either past "
|
1153 |
+
"the short code that will appear at the bottom of the box or just click on "
|
1154 |
+
"the star in the graphic editor and select \"Insert Multi Set\"."
|
1155 |
+
msgstr ""
|
1156 |
+
|
1157 |
+
#: ../yasr-settings-page.php:155
|
1158 |
+
msgid "Close this message"
|
1159 |
+
msgstr ""
|
1160 |
+
|
1161 |
+
#: ../yasr-settings-page.php:190 ../yasr-settings-page.php:224
|
1162 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:326
|
1163 |
+
msgid "Save"
|
1164 |
+
msgstr ""
|
1165 |
+
|
1166 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-actions.php:14
|
1167 |
+
msgid "Custom Rankings"
|
1168 |
+
msgstr ""
|
1169 |
+
|
1170 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-actions.php:31
|
1171 |
+
msgid "Click here"
|
1172 |
+
msgstr ""
|
1173 |
+
|
1174 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-actions.php:33
|
1175 |
+
msgid "to generate your custom rankings"
|
1176 |
+
msgstr ""
|
1177 |
+
|
1178 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-actions.php:71
|
1179 |
+
msgid "Rankings"
|
1180 |
+
msgstr ""
|
1181 |
+
|
1182 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:18
|
1183 |
+
msgid "Build Overall Rating Ranking"
|
1184 |
+
msgstr ""
|
1185 |
+
|
1186 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:26
|
1187 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:211
|
1188 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:447
|
1189 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:520
|
1190 |
+
msgid "Show Options"
|
1191 |
+
msgstr ""
|
1192 |
+
|
1193 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:28
|
1194 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:213
|
1195 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:449
|
1196 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:522
|
1197 |
+
msgid "Hide Options"
|
1198 |
+
msgstr ""
|
1199 |
+
|
1200 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:32
|
1201 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:217
|
1202 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:453
|
1203 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:526
|
1204 |
+
msgid "How many rows do you want to display?"
|
1205 |
+
msgstr ""
|
1206 |
+
|
1207 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:71
|
1208 |
+
msgid "Show text before or after the stars?"
|
1209 |
+
msgstr ""
|
1210 |
+
|
1211 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:79
|
1212 |
+
msgid "Yes, before the stars"
|
1213 |
+
msgstr ""
|
1214 |
+
|
1215 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:83
|
1216 |
+
msgid "Yes, after the stars"
|
1217 |
+
msgstr ""
|
1218 |
+
|
1219 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:87
|
1220 |
+
msgid "Text to show"
|
1221 |
+
msgstr ""
|
1222 |
+
|
1223 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:89
|
1224 |
+
msgid "Rating:"
|
1225 |
msgstr ""
|
1226 |
|
1227 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:94
|
1228 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:330
|
1229 |
+
msgid "Do you want to specify a category?"
|
1230 |
+
msgstr ""
|
1231 |
+
|
1232 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:147
|
1233 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:383
|
1234 |
+
msgid "Do you want to specify a custom post type?"
|
1235 |
+
msgstr ""
|
1236 |
+
|
1237 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:181
|
1238 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:417
|
1239 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:492
|
1240 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:565
|
1241 |
+
msgid "Create Shortcode"
|
1242 |
+
msgstr ""
|
1243 |
+
|
1244 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:185
|
1245 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:421
|
1246 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:495
|
1247 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:568
|
1248 |
msgid ""
|
1249 |
+
"This is the shortcode you've just created: paste it in the post or page "
|
1250 |
+
"where you want to make it appears"
|
1251 |
msgstr ""
|
1252 |
|
1253 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:203
|
1254 |
+
msgid "Build Visitor Votes Ranking"
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:264
|
1258 |
+
msgid "Choose default view"
|
1259 |
msgstr ""
|
1260 |
|
1261 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:276
|
1262 |
+
msgid "Number of minimum votes for most rated page"
|
1263 |
msgstr ""
|
1264 |
|
1265 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:303
|
1266 |
+
msgid "Number of minimum votes for highest rated page"
|
1267 |
msgstr ""
|
1268 |
|
1269 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:439
|
1270 |
+
msgid "Build Most Active Reviewers Ranking"
|
1271 |
msgstr ""
|
1272 |
|
1273 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:480
|
1274 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:553
|
1275 |
+
msgid "Do you want to use Username or Display Name?"
|
1276 |
msgstr ""
|
1277 |
|
1278 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:484
|
1279 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:557
|
1280 |
+
msgid "Username"
|
1281 |
msgstr ""
|
1282 |
|
1283 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:488
|
1284 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:561
|
1285 |
+
msgid "User display name"
|
1286 |
msgstr ""
|
1287 |
|
1288 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-settings-functions.php:512
|
1289 |
+
msgid "Build Most Active Users Ranking"
|
1290 |
msgstr ""
|
1291 |
|
1292 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:118
|
1293 |
+
msgid "You don't have any votes stored with this params"
|
1294 |
msgstr ""
|
1295 |
|
1296 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:296
|
1297 |
+
msgid ""
|
1298 |
+
"You've not enought data. Try to choose a lower number of votes for most "
|
1299 |
+
"rated page"
|
1300 |
msgstr ""
|
1301 |
|
1302 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:331
|
1303 |
+
msgid ""
|
1304 |
+
"You've not enought data. Try to choose a lower number of votes for highest "
|
1305 |
+
"rated page"
|
1306 |
msgstr ""
|
1307 |
|
1308 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:457
|
1309 |
+
msgid ""
|
1310 |
+
"Problem while retriving the most active reviewers chart. Did you published "
|
1311 |
+
"any review?"
|
1312 |
msgstr ""
|
1313 |
|
1314 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-cr-shortcodes.php:554
|
1315 |
+
msgid ""
|
1316 |
+
"Problem while retriving the top 10 active users chart. Are you sure you have "
|
1317 |
+
"votes to show?"
|
1318 |
msgstr ""
|
1319 |
|
1320 |
+
#: ../yasr_pro/yasr-custom-rankings/yasr-custom-rankings.php:23
|
1321 |
+
msgid "Yasr Custom Rating has been disabled"
|
1322 |
msgstr ""
|
1323 |
|
1324 |
+
#: ../yasr_pro/yasr-stylish/yasr-st-settings.php:11
|
1325 |
+
msgid "Custom Star Set"
|
1326 |
msgstr ""
|
1327 |
|
1328 |
+
#: ../yasr_pro/yasr-stylish/yasr-st-settings.php:30
|
1329 |
+
msgid "Upload Custom Icons"
|
1330 |
msgstr ""
|
1331 |
|
1332 |
+
#: ../yasr_pro/yasr-stylish/yasr-st-settings.php:33
|
1333 |
+
msgid "\"Off\" image"
|
1334 |
+
msgstr ""
|
1335 |
+
|
1336 |
+
#: ../yasr_pro/yasr-stylish/yasr-st-settings.php:42
|
1337 |
+
#: ../yasr_pro/yasr-stylish/yasr-st-settings.php:54
|
1338 |
+
msgid "Upload"
|
1339 |
+
msgstr ""
|
1340 |
+
|
1341 |
+
#: ../yasr_pro/yasr-stylish/yasr-st-settings.php:45
|
1342 |
+
msgid "\"Active\" image"
|
1343 |
+
msgstr ""
|
1344 |
+
|
1345 |
+
#: ../yasr_pro/yasr-stylish/yasr-st-settings.php:60
|
1346 |
+
#, php-format
|
1347 |
msgid ""
|
1348 |
+
"%s (You need a plugin like %s to upload it). %s Aspect ratio must be 1:1 and "
|
1349 |
+
"width x height at least 32x32"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: ../yasr_pro/yasr-stylish/yasr-stylish.php:42
|
1353 |
+
msgid "Yasr Stylish has been disabled"
|
1354 |
msgstr ""
|
1355 |
|
1356 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:33
|
1357 |
+
msgid "Reviews in comments for this post / page are ENABLED"
|
1358 |
msgstr ""
|
1359 |
|
1360 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:39
|
1361 |
+
msgid "Reviews in comments for this post / page are DISABLED"
|
1362 |
msgstr ""
|
1363 |
|
1364 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:105
|
1365 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:303
|
1366 |
+
msgid "User Reviews"
|
1367 |
msgstr ""
|
1368 |
|
1369 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:123
|
1370 |
+
msgid "Insert Progress Bars"
|
1371 |
msgstr ""
|
1372 |
|
1373 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:124
|
1374 |
+
msgid "Insert Progress Bars stats"
|
1375 |
msgstr ""
|
1376 |
|
1377 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:125
|
1378 |
+
msgid "Insert progress bars statistics for review in comments"
|
1379 |
msgstr ""
|
1380 |
|
1381 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:129
|
1382 |
+
msgid "Insert Average Rating"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:131
|
1386 |
+
msgid "Insert Stars Average"
|
1387 |
msgstr ""
|
1388 |
|
1389 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:132
|
1390 |
+
msgid "Insert the average (in stars) of all ratings in comments"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:147
|
1394 |
+
msgid "Ranking from reviews"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:148
|
1398 |
+
msgid "Insert Ranking From Reviews"
|
1399 |
+
msgstr ""
|
1400 |
+
|
1401 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-actions.php:149
|
1402 |
+
msgid "Show up a ranking build from the reviews"
|
1403 |
msgstr ""
|
1404 |
|
1405 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-ajax.php:32
|
1406 |
#, php-format
|
1407 |
+
msgid "New vote is %d"
|
1408 |
msgstr ""
|
1409 |
|
1410 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-ajax.php:36
|
1411 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-ajax.php:90
|
1412 |
+
msgid "Something goes wrong"
|
1413 |
msgstr ""
|
1414 |
|
1415 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-ajax.php:66
|
1416 |
+
msgid "Title must be at least 2 chars"
|
1417 |
msgstr ""
|
1418 |
|
1419 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-ajax.php:73
|
1420 |
+
msgid "Title must be shorter than 100 chars"
|
1421 |
msgstr ""
|
1422 |
|
1423 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-ajax.php:85
|
1424 |
+
msgid "Title Updated"
|
1425 |
msgstr ""
|
1426 |
|
1427 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:128
|
1428 |
+
msgid "If you want to leave a review, please"
|
1429 |
msgstr ""
|
1430 |
|
1431 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:129
|
1432 |
+
msgid "Login"
|
1433 |
msgstr ""
|
1434 |
|
1435 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:131
|
1436 |
+
msgid "or"
|
1437 |
msgstr ""
|
1438 |
|
1439 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:132
|
1440 |
+
msgid "Register"
|
1441 |
+
msgstr ""
|
1442 |
+
|
1443 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:134
|
1444 |
+
msgid "first."
|
1445 |
+
msgstr ""
|
1446 |
+
|
1447 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:145
|
1448 |
+
msgid "Add your own review"
|
1449 |
+
msgstr ""
|
1450 |
+
|
1451 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:181
|
1452 |
+
msgid "Title of your review"
|
1453 |
+
msgstr ""
|
1454 |
+
|
1455 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:187
|
1456 |
+
msgid "You've rated:"
|
1457 |
+
msgstr ""
|
1458 |
+
|
1459 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:297
|
1460 |
+
msgid "Please insert a title for the review"
|
1461 |
+
msgstr ""
|
1462 |
+
|
1463 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:333
|
1464 |
+
msgid "Please insert the rating for this review"
|
1465 |
+
msgstr ""
|
1466 |
+
|
1467 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:407
|
1468 |
+
msgid "Edit Title"
|
1469 |
+
msgstr ""
|
1470 |
+
|
1471 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:412
|
1472 |
+
msgid "Update"
|
1473 |
+
msgstr ""
|
1474 |
+
|
1475 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-comment-form-functions.php:414
|
1476 |
+
msgid "Undo"
|
1477 |
+
msgstr ""
|
1478 |
+
|
1479 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:29
|
1480 |
+
msgid "Yasr User Reviews Options"
|
1481 |
+
msgstr ""
|
1482 |
+
|
1483 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:30
|
1484 |
+
msgid "Reviews In Comments Options"
|
1485 |
+
msgstr ""
|
1486 |
+
|
1487 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:42
|
1488 |
+
msgid "Allow anonymous?"
|
1489 |
+
msgstr ""
|
1490 |
+
|
1491 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:70
|
1492 |
+
msgid "Size?"
|
1493 |
+
msgstr ""
|
1494 |
+
|
1495 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:94
|
1496 |
+
msgid "Enable on every post and page?"
|
1497 |
+
msgstr ""
|
1498 |
+
|
1499 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:114
|
1500 |
+
msgid ""
|
1501 |
+
"By enabling this, in every comment form YASR will add the fields in order to "
|
1502 |
+
"enable your visitors to add their own reviews."
|
1503 |
+
msgstr ""
|
1504 |
+
|
1505 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:116
|
1506 |
+
msgid ""
|
1507 |
+
"If you choose \"Yes\" but want to exclude a specific post or page, just open "
|
1508 |
+
"the editor page and disable it. "
|
1509 |
+
msgstr ""
|
1510 |
+
|
1511 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:118
|
1512 |
+
msgid "Vice versa if you choose \"No\". "
|
1513 |
+
msgstr ""
|
1514 |
+
|
1515 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:127
|
1516 |
+
msgid "Should rating and title review be mandatory?"
|
1517 |
+
msgstr ""
|
1518 |
+
|
1519 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-settings.php:143
|
1520 |
+
msgid "Create Rich Snippet for comments?"
|
1521 |
+
msgstr ""
|
1522 |
+
|
1523 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:85
|
1524 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-ur-shortcode.php:237
|
1525 |
+
msgid "Comment Reviews for this post are disabled. Please enable it first"
|
1526 |
+
msgstr ""
|
1527 |
+
|
1528 |
+
#: ../yasr_pro/yasr-user-reviews/yasr-user-reviews.php:22
|
1529 |
+
msgid "Yasr User Reviews has been disabled"
|
1530 |
+
msgstr ""
|
1531 |
+
|
1532 |
+
#: ../yet-another-stars-rating.php:314
|
1533 |
+
msgid "Buy Yasr Pro"
|
1534 |
+
msgstr ""
|
1535 |
+
|
1536 |
+
#: ../yet-another-stars-rating.php:322
|
1537 |
+
msgid "Thank you for using Yasr Pro"
|
1538 |
+
msgstr ""
|
1539 |
+
|
1540 |
+
#: ../yet-another-stars-rating.php:377
|
1541 |
+
#, php-format
|
1542 |
+
msgid "Please check the %s and choose your brand new stars set"
|
1543 |
msgstr ""
|
lib/settings/yasr-settings-functions-misc.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*** Facebook sdk, since version 0.8.8 ***/
|
4 |
+
|
5 |
+
function yasr_include_fb_sdk () {
|
6 |
+
|
7 |
+
$lang = get_locale();
|
8 |
+
|
9 |
+
$lang = json_encode("$lang");
|
10 |
+
|
11 |
+
?>
|
12 |
+
|
13 |
+
<div id="fb-root"></div>
|
14 |
+
<script>
|
15 |
+
(function(d, s, id) {
|
16 |
+
var lang = <?php echo ($lang); ?>;
|
17 |
+
var js, fjs = d.getElementsByTagName(s)[0];
|
18 |
+
if (d.getElementById(id)) return;
|
19 |
+
js = d.createElement(s); js.id = id;
|
20 |
+
js.src = "//connect.facebook.net/"+lang+"/sdk.js#xfbml=1&version=v2.3&appId=113845018658519";
|
21 |
+
fjs.parentNode.insertBefore(js, fjs);
|
22 |
+
}
|
23 |
+
(document, 'script', 'facebook-jssdk'));
|
24 |
+
</script>
|
25 |
+
|
26 |
+
<?php
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
function yasr_upgrade_pro_box ($position=FALSE) {
|
31 |
+
|
32 |
+
if ( yasr_fs()->is_free_plan() ) {
|
33 |
+
|
34 |
+
if ( $position && $position == "bottom" ) {
|
35 |
+
$yasr_upgrade_class = "yasr-donatedivbottom";
|
36 |
+
}
|
37 |
+
|
38 |
+
else {
|
39 |
+
$yasr_upgrade_class = "yasr-donatedivdx";
|
40 |
+
}
|
41 |
+
|
42 |
+
?>
|
43 |
+
|
44 |
+
<div class="<?php echo $yasr_upgrade_class ?>" style="display: none">
|
45 |
+
|
46 |
+
<h2 style="color: #34A7C1">
|
47 |
+
<?php _e( 'Upgrade to YASR Pro', 'yet-another-stars-rating' ); ?>
|
48 |
+
</h2>
|
49 |
+
|
50 |
+
<div class="yasr-upgrade-to-pro">
|
51 |
+
<ul>
|
52 |
+
<li><strong><?php _e( ' User Reviews', 'yet-another-stars-rating' ); ?></strong></li>
|
53 |
+
<li><strong><?php _e( ' Custom Rankings', 'yet-another-stars-rating' ); ?></strong></li>
|
54 |
+
<li><strong><?php _e( ' 20 + ready to use themes', 'yet-another-stars-rating' ); ?></strong></li>
|
55 |
+
<li><strong><?php _e( ' Upload your own theme', 'yet-another-stars-rating' ); ?></strong></li>
|
56 |
+
<li><strong><?php _e( ' Dedicate support', 'yet-another-stars-rating' ); ?></strong></li>
|
57 |
+
</ul>
|
58 |
+
<a href="<?php echo yasr_fs()->get_upgrade_url(); ?>"><button class="button button-primary">Upgrade Now</button></a>
|
59 |
+
|
60 |
+
</div>
|
61 |
+
|
62 |
+
</div>
|
63 |
+
|
64 |
+
<?php
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
/****** Facebook box, since version 0.8.8 ******/
|
71 |
+
|
72 |
+
function yasr_fb_box ($position=FALSE) {
|
73 |
+
|
74 |
+
if ($position && $position == "bottom") {
|
75 |
+
$yasr_fb_class = "yasr-donatedivbottom";
|
76 |
+
}
|
77 |
+
|
78 |
+
else {
|
79 |
+
$yasr_fb_class = "yasr-donatedivdx";
|
80 |
+
}
|
81 |
+
|
82 |
+
?>
|
83 |
+
|
84 |
+
<div class="<?php echo $yasr_fb_class; ?>" style="display:none">
|
85 |
+
|
86 |
+
<h2><?php _e('Keep in touch!', 'yet-another-stars-rating'); ?></h2>
|
87 |
+
|
88 |
+
<div class="fb-page" data-href="https://www.facebook.com/yetanotherstarsrating" data-hide-cover="false" data-show-facepile="true" data-show-posts="false">
|
89 |
+
<div class="fb-xfbml-parse-ignore">
|
90 |
+
<blockquote cite="https://www.facebook.com/yetanotherstarsrating"><a href="https://www.facebook.com/yetanotherstarsrating">YASR - Yet Another Stars Rating</a></blockquote>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<?php
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
/** Add a box on the right for asking to rate 5 stars on Wordpress.org
|
101 |
+
* It must be appear after 10 logged rating, after 100 and after 1000
|
102 |
+
* Since version 0.9.0
|
103 |
+
*/
|
104 |
+
|
105 |
+
function yasr_ask_rating ($position=FALSE) {
|
106 |
+
|
107 |
+
$transient = get_site_transient ('yasr_hide_ask_rating');
|
108 |
+
|
109 |
+
if (!$transient) {
|
110 |
+
|
111 |
+
if ($position && $position == "bottom") {
|
112 |
+
$yasr_metabox_class = "yasr-donatedivbottom";
|
113 |
+
}
|
114 |
+
|
115 |
+
else {
|
116 |
+
$yasr_metabox_class = "yasr-donatedivdx";
|
117 |
+
}
|
118 |
+
|
119 |
+
$n_stored_ratings = yasr_count_logged_vote ();
|
120 |
+
|
121 |
+
$div = "<div class=\"$yasr_metabox_class\" id=\"yasr-ask-five-stars\" style=\" display:none; border-left: 3px solid #7AD03A; font-size: 14px;\">";
|
122 |
+
|
123 |
+
if($n_stored_ratings > 20) {
|
124 |
+
|
125 |
+
$text = sprintf( __('Hey, seems like you reached %s votes on your site throught YASR! That\'s cool!', 'yet-another-stars-rating'),'<strong>'.$n_stored_ratings.'</strong>');
|
126 |
+
$text .= "<br />";
|
127 |
+
$text .= __('Can I ask a favor?', 'yet-another-stars-rating');
|
128 |
+
$text .= "<br />";
|
129 |
+
$text .= __('Can you please rate YASR 5 stars on', 'yet-another-stars-rating');
|
130 |
+
$text .= ' <a href="https://wordpress.org/support/view/plugin-reviews/yet-another-stars-rating?filter=5">wordpress.org?</a>';
|
131 |
+
$text .= __(' It will require just 1 min but it\'s a HUGE help for me. Thank you.' , 'yet-another-stars-rating');
|
132 |
+
$text .= "<br /><br />";
|
133 |
+
$text .= "<em>> Dario Curvino</em>";
|
134 |
+
|
135 |
+
$text .= "<ul>
|
136 |
+
|
137 |
+
<li><a href=\"https://wordpress.org/support/view/plugin-reviews/yet-another-stars-rating?filter=5\">" . __("Ok, I'm glad to help!" , 'yet-another-stars-rating') ."</a></li>
|
138 |
+
<li><a href=\"#\" id=\"yasr-ask-five-star-later\">" . __("Remind me later!" , 'yet-another-stars-rating') ."</a></li>
|
139 |
+
<li><a href=\"#\" id=\"yasr-ask-five-close\">" . __("Don't need to ask, I already did it!" , 'yet-another-stars-rating') ."</a></li>
|
140 |
+
|
141 |
+
</ul>";
|
142 |
+
|
143 |
+
|
144 |
+
$div_and_text = $div . $text . '</div>';
|
145 |
+
|
146 |
+
echo $div_and_text;
|
147 |
+
|
148 |
+
}
|
149 |
+
|
150 |
+
} //End if (!transient)
|
151 |
+
|
152 |
+
|
153 |
+
}
|
154 |
+
|
155 |
+
|
156 |
+
|
157 |
+
/** Change default admin footer on yasr settings pages
|
158 |
+
* $text is the default wordpress text
|
159 |
+
* Since 0.8.9
|
160 |
+
*/
|
161 |
+
|
162 |
+
add_filter( 'admin_footer_text', 'yasr_custom_admin_footer' );
|
163 |
+
|
164 |
+
function yasr_custom_admin_footer ($text) {
|
165 |
+
|
166 |
+
if (isset($_GET['page'])) {
|
167 |
+
$yasr_page = $_GET[ 'page' ];
|
168 |
+
|
169 |
+
if ($yasr_page == 'yasr_settings_page') {
|
170 |
+
|
171 |
+
$custom_text = ' | <i>';
|
172 |
+
$custom_text .= sprintf( __( 'Thank you for using <a href="%s" target="_blank">Yet Another Stars Rating</a>. Please <a href="%s" target="_blank">rate it</a> 5 stars on <a href="%s" target="_blank">WordPress.org</a>', 'yet-another-stars-rating' ),
|
173 |
+
'https://yetanotherstarsrating.com',
|
174 |
+
'https://wordpress.org/support/view/plugin-reviews/yet-another-stars-rating?filter=5',
|
175 |
+
'https://wordpress.org/support/view/plugin-reviews/yet-another-stars-rating?filter=5' );
|
176 |
+
$custom_text .= '</i>';
|
177 |
+
|
178 |
+
return $text . $custom_text;
|
179 |
+
|
180 |
+
}
|
181 |
+
|
182 |
+
else {
|
183 |
+
return $text;
|
184 |
+
}
|
185 |
+
|
186 |
+
}
|
187 |
+
|
188 |
+
else {
|
189 |
+
return $text;
|
190 |
+
}
|
191 |
+
|
192 |
+
}
|
193 |
+
|
194 |
+
?>
|
lib/settings/yasr-settings-functions-multiset.php
ADDED
@@ -0,0 +1,828 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
|
5 |
+
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
6 |
+
|
7 |
+
This program is free software: you can redistribute it and/or modify
|
8 |
+
it under the terms of the GNU General Public License as published by
|
9 |
+
the Free Software Foundation, either version 2 of the License, or
|
10 |
+
(at your option) any later version.
|
11 |
+
|
12 |
+
This program is distributed in the hope that it will be useful,
|
13 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
+
GNU General Public License for more details.
|
16 |
+
|
17 |
+
You should have received a copy of the GNU General Public License
|
18 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>
|
19 |
+
*/
|
20 |
+
|
21 |
+
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
|
22 |
+
|
23 |
+
/**************** Add yasr multiset options and settings ************/
|
24 |
+
|
25 |
+
add_action( 'admin_init', 'yasr_multiset_options_init' ); //This is for general options
|
26 |
+
|
27 |
+
function yasr_multiset_options_init() {
|
28 |
+
register_setting(
|
29 |
+
'yasr_multiset_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
|
30 |
+
'yasr_multiset_options', //The name of an option to sanitize and save.
|
31 |
+
'yasr_sanitize_multiset_options'
|
32 |
+
);
|
33 |
+
|
34 |
+
$option_multiset = get_option( 'yasr_multiset_options' );
|
35 |
+
|
36 |
+
if ($option_multiset === FALSE) {
|
37 |
+
|
38 |
+
$option_multiset = array();
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
if (!isset($option_multiset['show_average'])) {
|
43 |
+
|
44 |
+
$option_multiset['show_average'] = 'yes';
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
add_settings_section( 'yasr_multiset_options_section_id', '', 'yasr_multiset_section_callback', 'yasr_multiset_tab' );
|
49 |
+
add_settings_field( 'yasr_multiset_hide_average_id', __('Show average?', 'yet-another-stars-rating'), 'yasr_multiset_hide_average_callback', 'yasr_multiset_tab', 'yasr_multiset_options_section_id', $option_multiset );
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
function yasr_multiset_section_callback () {
|
54 |
+
|
55 |
+
//Silence
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
function yasr_multiset_hide_average_callback ($option_multiset) {
|
60 |
+
|
61 |
+
?>
|
62 |
+
|
63 |
+
<div class="yasr-onoffswitch-big">
|
64 |
+
<input type="checkbox" name="yasr_multiset_options[show_average]" class="yasr-onoffswitch-checkbox" id="yasr-multiset-options-show-average-switch" <?php if ($option_multiset['show_average']==='yes') echo " checked='checked' "; ?> >
|
65 |
+
<label class="yasr-onoffswitch-label" for="yasr-multiset-options-show-average-switch">
|
66 |
+
<span class="yasr-onoffswitch-inner"></span>
|
67 |
+
<span class="yasr-onoffswitch-switch"></span>
|
68 |
+
</label>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<br />
|
72 |
+
|
73 |
+
<br />
|
74 |
+
|
75 |
+
<?php
|
76 |
+
|
77 |
+
_e("If you select no, the \"Average\" row will not be displayed. You can override this in the single multi set by using the parameter \"show_average\"", "yasr");
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
|
82 |
+
function yasr_sanitize_multiset_options ($option_multiset) {
|
83 |
+
|
84 |
+
if (!array_key_exists('show_average', $option_multiset)) {
|
85 |
+
|
86 |
+
$option_multiset['show_average'] = 'no';
|
87 |
+
|
88 |
+
}
|
89 |
+
|
90 |
+
else {
|
91 |
+
|
92 |
+
$option_multiset['show_average'] = 'yes';
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
return $option_multiset;
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
/****** Create a form for settings page to create new multi set ******/
|
102 |
+
function yasr_display_multi_set_form() {
|
103 |
+
|
104 |
+
?>
|
105 |
+
|
106 |
+
<h4 class="yasr-multi-set-form-headers"><?php _e("Add New Multiple Set", 'yet-another-stars-rating'); ?></h4>
|
107 |
+
<em><?php _e('Name, Element#1 and Element#2 MUST be filled and must be long at least 3 characters', 'yet-another-stars-rating') ?></em>
|
108 |
+
<p>
|
109 |
+
<form action="<?php echo admin_url('options-general.php?page=yasr_settings_page&tab=manage_multi') ?>" id="form_add_multi_set" method="post">
|
110 |
+
<strong><?php _e("Name", 'yet-another-stars-rating')?></strong>
|
111 |
+
<input type="text" name="multi-set-name" id="new-multi-set-name" class="input-text-multi-set">
|
112 |
+
<!--input type="hidden" name="action" value="yasr_new_multi_set_form" />-->
|
113 |
+
|
114 |
+
<p></p>
|
115 |
+
<?php _e("You can insert up to nine elements", 'yet-another-stars-rating') ?>
|
116 |
+
<br />
|
117 |
+
|
118 |
+
<?php for($i=1; $i<=9; $i++) {
|
119 |
+
|
120 |
+
echo "<strong>" . __("Element ", 'yet-another-stars-rating') . "#$i" . "</strong>";
|
121 |
+
?>
|
122 |
+
<input type="text" name="multi-set-name-element-<?php echo $i ?>" id="multi-set-name-element-<?php echo $i ?>" class="input-text-multi-set">
|
123 |
+
<br />
|
124 |
+
|
125 |
+
<?php } //End foreach
|
126 |
+
|
127 |
+
wp_nonce_field( 'add-multi-set', 'add-nonce-new-multi-set' ) ?><!-- a little security to process on submission -->
|
128 |
+
|
129 |
+
<br />
|
130 |
+
<input type="submit" value="<?php _e("Create New Set", 'yet-another-stars-rating') ?>" class="button-primary"/>
|
131 |
+
</form>
|
132 |
+
|
133 |
+
<?php
|
134 |
+
} //End function
|
135 |
+
|
136 |
+
|
137 |
+
function yasr_edit_multi_form() {
|
138 |
+
|
139 |
+
global $wpdb;
|
140 |
+
|
141 |
+
$multi_set=yasr_get_multi_set();
|
142 |
+
|
143 |
+
$n_multi_set = $wpdb->num_rows; //wpdb->num_rows always store the last of the last query
|
144 |
+
|
145 |
+
if ($n_multi_set > 1) {
|
146 |
+
?>
|
147 |
+
|
148 |
+
<div class="yasr-manage-multiset">
|
149 |
+
|
150 |
+
<h4 class="yasr-multi-set-form-headers"><?php _e("Manage Multiple Set" , 'yet-another-stars-rating'); ?></h4>
|
151 |
+
|
152 |
+
<?php _e('Wich set do you want to edit or remove?', 'yet-another-stars-rating')?>
|
153 |
+
|
154 |
+
<select id ="yasr_select_edit_set">
|
155 |
+
<?php foreach ($multi_set as $name) { ?>
|
156 |
+
<option value="<?php echo $name->set_id ?>"><?php echo $name->set_name ?></option>
|
157 |
+
<?php } //End foreach ?>
|
158 |
+
</select>
|
159 |
+
|
160 |
+
<button href="#" class="button-delete" id="yasr-button-select-set-edit-form"><?php _e("Select"); ?></button>
|
161 |
+
|
162 |
+
|
163 |
+
</div>
|
164 |
+
|
165 |
+
<?php
|
166 |
+
|
167 |
+
} //End if n_multi_set >1
|
168 |
+
|
169 |
+
elseif ($n_multi_set == 1) {
|
170 |
+
|
171 |
+
$set_name=$wpdb->get_results("SELECT field_name AS name, field_id AS id, parent_set_id AS set_id
|
172 |
+
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
173 |
+
ORDER BY field_id ASC");
|
174 |
+
|
175 |
+
foreach ($multi_set as $find_set_id) {
|
176 |
+
$set_type = $find_set_id->set_id;
|
177 |
+
}
|
178 |
+
|
179 |
+
?>
|
180 |
+
|
181 |
+
<div class="yasr-manage-multiset-single">
|
182 |
+
|
183 |
+
<h4 class="yasr-multi-set-form-headers"><?php _e("Manage Multiple Set", 'yet-another-stars-rating'); ?></h4>
|
184 |
+
|
185 |
+
<form action=" <?php echo admin_url('options-general.php?page=yasr_settings_page&tab=manage_multi') ?>" id="form_edit_multi_set" method="post">
|
186 |
+
|
187 |
+
<input type="hidden" name="yasr_edit_multi_set_form" value="<?php echo $set_type ?>" />
|
188 |
+
|
189 |
+
<table id="yasr-table-form-edit-multi-set">
|
190 |
+
<tr>
|
191 |
+
|
192 |
+
<td id="yasr-table-form-edit-multi-set-header">
|
193 |
+
<?php _e('Field name', 'yet-another-stars-rating') ?>
|
194 |
+
</td>
|
195 |
+
|
196 |
+
<td id="yasr-table-form-edit-multi-set-remove">
|
197 |
+
<?php _e('Remove', 'yet-another-stars-rating') ?>
|
198 |
+
</td>
|
199 |
+
|
200 |
+
</tr>
|
201 |
+
|
202 |
+
<?php
|
203 |
+
|
204 |
+
$i=1;
|
205 |
+
|
206 |
+
foreach ($set_name as $name) {
|
207 |
+
|
208 |
+
echo "
|
209 |
+
<tr>
|
210 |
+
|
211 |
+
<td width=\"80%\">
|
212 |
+
Element #$i <input type=\"text\" value=\"$name->name\" name=\"edit-multi-set-element-$i\">
|
213 |
+
<input type=\"hidden\" value=\"$name->id\" name=\"db-id-for-element-$i\">
|
214 |
+
</td>
|
215 |
+
|
216 |
+
<td width=\"20%\" style=\"text-align:center\">
|
217 |
+
<input type=\"checkbox\" value=\"$name->id\" name=\"remove-element-$i\">
|
218 |
+
</td>
|
219 |
+
|
220 |
+
</tr>
|
221 |
+
";
|
222 |
+
|
223 |
+
$i++;
|
224 |
+
|
225 |
+
}
|
226 |
+
|
227 |
+
|
228 |
+
$i = $i-1; //This is the number of the fields
|
229 |
+
|
230 |
+
echo "
|
231 |
+
|
232 |
+
<input type=\"hidden\" name=\"yasr-edit-form-number-elements\" id=\"yasr-edit-form-number-elements\" value=\"$i\">
|
233 |
+
|
234 |
+
</table>
|
235 |
+
|
236 |
+
<table width=\"100%\" class=\"yasr-edit-form-remove-entire-set\">
|
237 |
+
<tr>
|
238 |
+
|
239 |
+
<td width=\"80%\">" . __("Remove whole set?", 'yet-another-stars-rating') . "</td>
|
240 |
+
|
241 |
+
<td width=\"20%\" style=\"text-align:center\">
|
242 |
+
<input type=\"checkbox\" name=\"yasr-remove-multi-set\" value=\"$set_type\">
|
243 |
+
</td>
|
244 |
+
|
245 |
+
</tr>
|
246 |
+
|
247 |
+
</table>
|
248 |
+
|
249 |
+
";
|
250 |
+
|
251 |
+
echo "<p>";
|
252 |
+
_e("If you remove something you will remove all the votes for that set or field. This operation CAN'T BE undone." , 'yet-another-stars-rating');
|
253 |
+
echo "</p>";
|
254 |
+
|
255 |
+
wp_nonce_field( 'edit-multi-set', 'add-nonce-edit-multi-set' )
|
256 |
+
|
257 |
+
?>
|
258 |
+
|
259 |
+
<div id="yasr-element-limit" style="display:none; color:red"><?php _e("You can use up to 9 elements" , 'yet-another-stars-rating') ?></div>
|
260 |
+
|
261 |
+
<input type="button" class="button-delete" id="yasr-add-field-edit-multiset" value="<?php _e('Add element', 'yet-another-stars-rating'); ?>">
|
262 |
+
|
263 |
+
<input type="submit" value="<?php _e('Save changes', 'yet-another-stars-rating') ?>" class="button-primary" >
|
264 |
+
|
265 |
+
</form>
|
266 |
+
|
267 |
+
</div>
|
268 |
+
|
269 |
+
<?php
|
270 |
+
}
|
271 |
+
|
272 |
+
else {
|
273 |
+
_e("No Multiple Set were found", 'yet-another-stars-rating');
|
274 |
+
}
|
275 |
+
|
276 |
+
}//End function
|
277 |
+
|
278 |
+
|
279 |
+
/****** Get and output multiple set in a form and table, used in settings page ******/
|
280 |
+
|
281 |
+
add_action( 'wp_ajax_yasr_get_multi_set', 'yasr_get_multi_set_callback' );
|
282 |
+
|
283 |
+
function yasr_get_multi_set_callback() {
|
284 |
+
if (isset($_POST['set_id']) && $_POST['set_id'] != '' ) {
|
285 |
+
$set_type = $_POST['set_id'];
|
286 |
+
}
|
287 |
+
else {
|
288 |
+
exit ();
|
289 |
+
}
|
290 |
+
|
291 |
+
global $wpdb;
|
292 |
+
|
293 |
+
$set_name=$wpdb->get_results($wpdb->prepare("SELECT field_name AS name, field_id AS id
|
294 |
+
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
295 |
+
WHERE parent_set_id=%d
|
296 |
+
ORDER BY field_id ASC", $set_type));
|
297 |
+
|
298 |
+
|
299 |
+
|
300 |
+
?>
|
301 |
+
|
302 |
+
<form action=" <?php echo admin_url('options-general.php?page=yasr_settings_page&tab=manage_multi') ?>" id="form_edit_multi_set" method="post">
|
303 |
+
<input type="hidden" name="yasr_edit_multi_set_form" value="<?php echo $set_type ?>" />
|
304 |
+
|
305 |
+
|
306 |
+
<table id="yasr-table-form-edit-multi-set">
|
307 |
+
<tr>
|
308 |
+
|
309 |
+
<td id="yasr-table-form-edit-multi-set-header">
|
310 |
+
<?php _e('Field name', 'yet-another-stars-rating') ?>
|
311 |
+
</td>
|
312 |
+
|
313 |
+
<td id="yasr-table-form-edit-multi-set-remove">
|
314 |
+
<?php _e('Remove', 'yet-another-stars-rating') ?>
|
315 |
+
</td>
|
316 |
+
|
317 |
+
</tr>
|
318 |
+
|
319 |
+
<?php
|
320 |
+
|
321 |
+
$i=1;
|
322 |
+
|
323 |
+
foreach ($set_name as $name) {
|
324 |
+
|
325 |
+
echo "
|
326 |
+
<tr>
|
327 |
+
|
328 |
+
<td width=\"80%\">
|
329 |
+
Element #$i <input type=\"text\" value=\"$name->name\" name=\"edit-multi-set-element-$i\">
|
330 |
+
<input type=\"hidden\" value=\"$name->id\" name=\"db-id-for-element-$i\">
|
331 |
+
</td>
|
332 |
+
|
333 |
+
<td width=\"20%\" style=\"text-align:center\">
|
334 |
+
<input type=\"checkbox\" value=\"$name->id\" name=\"remove-element-$i\">
|
335 |
+
</td>
|
336 |
+
|
337 |
+
</tr>
|
338 |
+
";
|
339 |
+
|
340 |
+
$i++;
|
341 |
+
|
342 |
+
}
|
343 |
+
|
344 |
+
|
345 |
+
$i = $i-1; //This is the number of the fields
|
346 |
+
|
347 |
+
echo "
|
348 |
+
|
349 |
+
<input type=\"hidden\" name=\"yasr-edit-form-number-elements\" id=\"yasr-edit-form-number-elements\" value=\"$i\">
|
350 |
+
|
351 |
+
</table>
|
352 |
+
|
353 |
+
<table width=\"100%\" class=\"yasr-edit-form-remove-entire-set\">
|
354 |
+
<tr>
|
355 |
+
|
356 |
+
<td width=\"80%\">" . __("Remove whole set?", 'yet-another-stars-rating') . "</td>
|
357 |
+
|
358 |
+
<td width=\"20%\" style=\"text-align:center\">
|
359 |
+
<input type=\"checkbox\" name=\"yasr-remove-multi-set\" value=\"$set_type\">
|
360 |
+
</td>
|
361 |
+
|
362 |
+
</tr>
|
363 |
+
|
364 |
+
</table>
|
365 |
+
|
366 |
+
";
|
367 |
+
|
368 |
+
echo "<p>";
|
369 |
+
_e("If you remove something you will remove all the votes for that set or field. This operation CAN'T BE undone." , 'yet-another-stars-rating');
|
370 |
+
echo "</p>";
|
371 |
+
|
372 |
+
wp_nonce_field( 'edit-multi-set', 'add-nonce-edit-multi-set' )
|
373 |
+
|
374 |
+
?>
|
375 |
+
|
376 |
+
<div id="yasr-element-limit" style="display:none; color:red"><?php _e("You can use up to 9 elements" , 'yet-another-stars-rating') ?></div>
|
377 |
+
|
378 |
+
<input type="button" class="button-delete" id="yasr-add-field-edit-multiset" value="<?php _e('Add element', 'yet-another-stars-rating'); ?>">
|
379 |
+
|
380 |
+
<input type="submit" value="<?php _e('Save changes', 'yet-another-stars-rating') ?>" class="button-primary" >
|
381 |
+
|
382 |
+
</form>
|
383 |
+
|
384 |
+
<?php
|
385 |
+
|
386 |
+
die();
|
387 |
+
|
388 |
+
} //End function
|
389 |
+
|
390 |
+
|
391 |
+
/****** Validate new multi set form ******/
|
392 |
+
function yasr_process_new_multi_set_form() {
|
393 |
+
|
394 |
+
if ( isset( $_POST['multi-set-name'])) {
|
395 |
+
|
396 |
+
global $wpdb;
|
397 |
+
|
398 |
+
if ( !current_user_can( 'manage_options' ) ) {
|
399 |
+
wp_die( 'You are not allowed to be on this page.' );
|
400 |
+
}
|
401 |
+
|
402 |
+
// Check nonce field
|
403 |
+
check_admin_referer( 'add-multi-set', 'add-nonce-new-multi-set' );
|
404 |
+
|
405 |
+
$array_errors = array();
|
406 |
+
$error = FALSE;
|
407 |
+
|
408 |
+
//IF thes fields are not empty go ahed
|
409 |
+
if ($_POST['multi-set-name']!='' && $_POST['multi-set-name-element-1']!='' && $_POST['multi-set-name-element-2']!='' ) {
|
410 |
+
|
411 |
+
$multi_set_name = ucfirst(strtolower($_POST['multi-set-name']));
|
412 |
+
|
413 |
+
$multi_set_name_element_=array();
|
414 |
+
|
415 |
+
$multi_set_name_element_[1]=$_POST['multi-set-name-element-1'];
|
416 |
+
$multi_set_name_element_[2]=$_POST['multi-set-name-element-2'];
|
417 |
+
|
418 |
+
//If multi set name is shorter than 3 characher come back
|
419 |
+
if (mb_strlen($multi_set_name) < 3 || mb_strlen($multi_set_name_element_[1]) <3 || mb_strlen($multi_set_name_element_[2]) < 3 ) {
|
420 |
+
$array_errors[] = "Content field must be longer than 3 chars";
|
421 |
+
$error=TRUE;
|
422 |
+
}
|
423 |
+
|
424 |
+
|
425 |
+
if (mb_strlen($multi_set_name) > 40 || mb_strlen($multi_set_name_element_[1]) > 40 || mb_strlen($multi_set_name_element_[2]) > 40 ) {
|
426 |
+
$array_errors[] = "Content field must be shorter than 40 chars";
|
427 |
+
$error=TRUE;
|
428 |
+
}
|
429 |
+
|
430 |
+
//Check if a set with that name already exists
|
431 |
+
$check_name_exists=$wpdb->get_results("SELECT set_name FROM " . YASR_MULTI_SET_NAME_TABLE . " ORDER BY set_id ASC");
|
432 |
+
|
433 |
+
foreach ($check_name_exists as $set_name) {
|
434 |
+
|
435 |
+
if ($multi_set_name==$set_name->set_name) {
|
436 |
+
$array_errors[] = "You already have a set with this name";
|
437 |
+
$error=TRUE;
|
438 |
+
}
|
439 |
+
|
440 |
+
}
|
441 |
+
|
442 |
+
$element_filled=2;
|
443 |
+
|
444 |
+
//If filled get the element from 3 to 9
|
445 |
+
for($i=3; $i<=9; $i++) {
|
446 |
+
|
447 |
+
if (isset($_POST["multi-set-name-element-$i"]) && $_POST["multi-set-name-element-$i"]!='') {
|
448 |
+
|
449 |
+
$multi_set_name_element_[$i]=$_POST["multi-set-name-element-$i"];
|
450 |
+
|
451 |
+
if (mb_strlen($multi_set_name_element_[$i]) < 3) {
|
452 |
+
$array_errors[] = "Field # $i must be at least 3 characters";
|
453 |
+
$error=TRUE;
|
454 |
+
}
|
455 |
+
|
456 |
+
if (mb_strlen($multi_set_name_element_[$i]) > 40) {
|
457 |
+
$array_errors[] = "Field # $i must be shorter than 40 characters";
|
458 |
+
$error=TRUE;
|
459 |
+
}
|
460 |
+
|
461 |
+
$element_filled++;
|
462 |
+
}
|
463 |
+
|
464 |
+
}
|
465 |
+
|
466 |
+
//If there isnt any error write in the table
|
467 |
+
if (!$error) {
|
468 |
+
|
469 |
+
//get the highest id in table
|
470 |
+
$highest_id=$wpdb->get_results("SELECT set_id FROM " . YASR_MULTI_SET_NAME_TABLE . " ORDER BY set_id DESC LIMIT 1 ");
|
471 |
+
|
472 |
+
if (!$highest_id) {
|
473 |
+
$name_table_new_id=0;
|
474 |
+
}
|
475 |
+
|
476 |
+
foreach ($highest_id as $id) {
|
477 |
+
$name_table_new_id=$id->set_id + 1;
|
478 |
+
}
|
479 |
+
|
480 |
+
$insert_multi_name_success = $wpdb->replace(
|
481 |
+
YASR_MULTI_SET_NAME_TABLE,
|
482 |
+
array(
|
483 |
+
'set_id' =>$name_table_new_id,
|
484 |
+
'set_name' =>$multi_set_name
|
485 |
+
),
|
486 |
+
array ('%d', '%s')
|
487 |
+
);
|
488 |
+
|
489 |
+
//If multi set name hase been inserted, now we're going to insert elements
|
490 |
+
if ($insert_multi_name_success) {
|
491 |
+
|
492 |
+
//get the highest id in table
|
493 |
+
$highest_id=$wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_FIELDS_TABLE . " ORDER BY id DESC LIMIT 1 ");
|
494 |
+
|
495 |
+
if (!$highest_id) {
|
496 |
+
$field_table_new_id=0;
|
497 |
+
}
|
498 |
+
|
499 |
+
foreach ($highest_id as $id) {
|
500 |
+
$field_table_new_id=$id->id + 1;
|
501 |
+
}
|
502 |
+
|
503 |
+
for ($i=1; $i<=$element_filled; $i++) {
|
504 |
+
$insert_set_value=$wpdb->replace(
|
505 |
+
YASR_MULTI_SET_FIELDS_TABLE,
|
506 |
+
array(
|
507 |
+
'id' => $field_table_new_id,
|
508 |
+
'parent_set_id' =>$name_table_new_id,
|
509 |
+
'field_name' =>$multi_set_name_element_[$i],
|
510 |
+
'field_id' =>$i
|
511 |
+
),
|
512 |
+
array ('%d', '%d', '%s', '%d')
|
513 |
+
);
|
514 |
+
$field_table_new_id++; //Avoid overwrite
|
515 |
+
} //End for
|
516 |
+
|
517 |
+
if ($insert_set_value) {
|
518 |
+
echo "<div class=\"updated\"><p><strong>";
|
519 |
+
_e("Settings Saved", 'yet-another-stars-rating');
|
520 |
+
echo "</strong></p></div> ";
|
521 |
+
}
|
522 |
+
|
523 |
+
else {
|
524 |
+
_e("Something goes wrong trying insert set field name. Please report it", 'yet-another-stars-rating');
|
525 |
+
}
|
526 |
+
|
527 |
+
} //End if $insert_multi_name_success
|
528 |
+
|
529 |
+
else {
|
530 |
+
_e("Something goes wrong trying insert Multi Set name. Please report it", 'yet-another-stars-rating');
|
531 |
+
}
|
532 |
+
|
533 |
+
} //End if !$error
|
534 |
+
|
535 |
+
} //End if $_POST['multi-set-name']!=''
|
536 |
+
|
537 |
+
//Else multi set's name and first 2 elements are empty
|
538 |
+
else {
|
539 |
+
$array_errors[] = "Multi Set's name and first 2 elements can't be empty";
|
540 |
+
$error=TRUE;
|
541 |
+
}
|
542 |
+
|
543 |
+
if ($error) {
|
544 |
+
return $array_errors;
|
545 |
+
}
|
546 |
+
|
547 |
+
} //End if ( isset( $_POST['multi-set-name']) ) {
|
548 |
+
|
549 |
+
} //End yasr_process_new_multi_set_form() function
|
550 |
+
|
551 |
+
function yasr_process_edit_multi_set_form() {
|
552 |
+
|
553 |
+
$error = FALSE;
|
554 |
+
|
555 |
+
if ( isset( $_POST['yasr_edit_multi_set_form']) ) {
|
556 |
+
|
557 |
+
$set_id = $_POST['yasr_edit_multi_set_form'];
|
558 |
+
|
559 |
+
$number_of_stored_elements = $_POST['yasr-edit-form-number-elements'];
|
560 |
+
|
561 |
+
global $wpdb;
|
562 |
+
|
563 |
+
$array_errors = array();
|
564 |
+
|
565 |
+
if ( !current_user_can( 'manage_options' ) ) {
|
566 |
+
wp_die( 'You are not allowed to be on this page.' );
|
567 |
+
}
|
568 |
+
|
569 |
+
// Check nonce field
|
570 |
+
check_admin_referer( 'edit-multi-set', 'add-nonce-edit-multi-set' );
|
571 |
+
|
572 |
+
|
573 |
+
//Check if user want to delete entire set
|
574 |
+
|
575 |
+
if (isset($_POST["yasr-remove-multi-set"])) {
|
576 |
+
|
577 |
+
$remove_set = $wpdb->delete (
|
578 |
+
YASR_MULTI_SET_NAME_TABLE,
|
579 |
+
array(
|
580 |
+
'set_id' => $set_id,
|
581 |
+
),
|
582 |
+
array ('%d')
|
583 |
+
);
|
584 |
+
|
585 |
+
$remove_set_values = $wpdb->delete (
|
586 |
+
YASR_MULTI_SET_FIELDS_TABLE,
|
587 |
+
array(
|
588 |
+
'parent_set_id' => $set_id,
|
589 |
+
),
|
590 |
+
array ('%d')
|
591 |
+
);
|
592 |
+
|
593 |
+
$remove_set_votes = $wpdb->delete (
|
594 |
+
YASR_MULTI_SET_VALUES_TABLE,
|
595 |
+
array(
|
596 |
+
'set_type' => $set_id,
|
597 |
+
),
|
598 |
+
array ('%d')
|
599 |
+
);
|
600 |
+
|
601 |
+
if ($remove_set==FALSE) {
|
602 |
+
$error = TRUE;
|
603 |
+
$array_errors[] .= __("Something goes wrong trying to delete a Multi Set . Please report it", 'yet-another-stars-rating');
|
604 |
+
}
|
605 |
+
|
606 |
+
|
607 |
+
//Comment this out, if try to delete an empty set print error
|
608 |
+
/*if ($remove_set_values==FALSE) {
|
609 |
+
$error = TRUE;
|
610 |
+
$array_errors[] .= __("Something goes wrong trying to delete data fields for a set. Please report it", 'yet-another-stars-rating');
|
611 |
+
}
|
612 |
+
*/
|
613 |
+
|
614 |
+
//Comment this out, will echo error even if the value for that field it's just empty
|
615 |
+
/*if ($remove_set_votes==FALSE) {
|
616 |
+
$error = TRUE;
|
617 |
+
$array_errors[] .= __("Something goes wrong trying to delete data values for a set. Please report it", 'yet-another-stars-rating');
|
618 |
+
}*/
|
619 |
+
|
620 |
+
}
|
621 |
+
|
622 |
+
for ($i = 0; $i <= 9; $i++) {
|
623 |
+
|
624 |
+
//Than, check if the user want to remove some field
|
625 |
+
if (isset($_POST["remove-element-$i"]) && !isset($_POST["yasr-remove-multi-set"]) ) {
|
626 |
+
|
627 |
+
$field_to_remove = $_POST["remove-element-$i"];
|
628 |
+
|
629 |
+
$remove_field = $wpdb->delete (
|
630 |
+
YASR_MULTI_SET_FIELDS_TABLE,
|
631 |
+
array(
|
632 |
+
'parent_set_id' => $set_id,
|
633 |
+
'field_id' =>$field_to_remove
|
634 |
+
),
|
635 |
+
array ('%d', '%d')
|
636 |
+
);
|
637 |
+
|
638 |
+
$remove_values = $wpdb->delete (
|
639 |
+
YASR_MULTI_SET_VALUES_TABLE,
|
640 |
+
array(
|
641 |
+
'set_type' => $set_id,
|
642 |
+
'field_id' =>$field_to_remove
|
643 |
+
),
|
644 |
+
array ('%d', '%d')
|
645 |
+
);
|
646 |
+
|
647 |
+
if ($remove_field == FALSE) {
|
648 |
+
$error = TRUE;
|
649 |
+
$array_errors[] = __("Something goes wrong trying to delete a Multi Set's element. Please report it", 'yet-another-stars-rating');
|
650 |
+
}
|
651 |
+
|
652 |
+
|
653 |
+
//Comment this out, will echo error even if the value for that field it's just empty
|
654 |
+
/*if ($remove_values == FALSE) {
|
655 |
+
$error = TRUE;
|
656 |
+
$array_errors[] = __("Something goes wrong trying to delete data value for an element. Please report it", 'yet-another-stars-rating');
|
657 |
+
}*/
|
658 |
+
|
659 |
+
|
660 |
+
} //End if isset $_POST['remove-element-$i']
|
661 |
+
|
662 |
+
|
663 |
+
//update the stored elements with the new ones
|
664 |
+
if (isset($_POST["edit-multi-set-element-$i"]) && !isset($_POST["yasr-remove-multi-set"]) && !isset($_POST["remove-element-$i"]) && $i <= $number_of_stored_elements ) {
|
665 |
+
|
666 |
+
$field_name = $_POST["edit-multi-set-element-$i"];
|
667 |
+
|
668 |
+
$field_id = $_POST["db-id-for-element-$i"];
|
669 |
+
|
670 |
+
//if elements name is shorter than 3 chars
|
671 |
+
if (mb_strlen($field_name) <3) {
|
672 |
+
$array_errors[] = __("Field # $i must be at least 3 characters", 'yet-another-stars-rating');
|
673 |
+
$error=TRUE;
|
674 |
+
}
|
675 |
+
|
676 |
+
if(mb_strlen($field_name) > 40) {
|
677 |
+
$array_errors[] = __("Field # $i must be shorter than 40 characters", 'yet-another-stars-rating');
|
678 |
+
$error=TRUE;
|
679 |
+
}
|
680 |
+
|
681 |
+
else {
|
682 |
+
|
683 |
+
//Check if field name is changed
|
684 |
+
$field_name_in_db = $wpdb->get_results($wpdb->prepare("SELECT field_name FROM " . YASR_MULTI_SET_FIELDS_TABLE . " WHERE field_id=%d AND parent_set_id=%d", $field_id, $set_id ) );
|
685 |
+
|
686 |
+
foreach ($field_name_in_db as $field_in_db) {
|
687 |
+
$field_name_in_database = $field_in_db->field_name;
|
688 |
+
}
|
689 |
+
|
690 |
+
//if field name in db is different from field name in form update it
|
691 |
+
if ($field_name_in_database != $field_name) {
|
692 |
+
|
693 |
+
$insert_field_name=$wpdb->update(
|
694 |
+
YASR_MULTI_SET_FIELDS_TABLE,
|
695 |
+
|
696 |
+
array(
|
697 |
+
'field_name' =>$field_name,
|
698 |
+
),
|
699 |
+
|
700 |
+
array(
|
701 |
+
'parent_set_id' =>$set_id,
|
702 |
+
'field_id' =>$field_id
|
703 |
+
),
|
704 |
+
|
705 |
+
array ('%s'),
|
706 |
+
|
707 |
+
array ('%d', '%d')
|
708 |
+
|
709 |
+
);
|
710 |
+
|
711 |
+
if ($insert_field_name == FALSE) {
|
712 |
+
$error = TRUE;
|
713 |
+
$array_errors[] = __("Something goes wrong trying to update a Multi Set's element. Please report it", 'yet-another-stars-rating');
|
714 |
+
}
|
715 |
+
|
716 |
+
} //End if ($field_name_in_database != $field_name) {
|
717 |
+
|
718 |
+
}
|
719 |
+
|
720 |
+
} //End if (isset($_POST["edit-multi-set-element-$i"]) && !isset($_POST["remove-element-$i"]) && $i<=$number_of_stored_elements )
|
721 |
+
|
722 |
+
|
723 |
+
//If $i > number of stored elements, user is adding new elements, so we're going to insert the new ones
|
724 |
+
if (isset($_POST["edit-multi-set-element-$i"]) && !isset($_POST["yasr-remove-multi-set"]) && !isset($_POST["remove-element-$i"]) && $i > $number_of_stored_elements ) {
|
725 |
+
|
726 |
+
$field_name = $_POST["edit-multi-set-element-$i"];
|
727 |
+
|
728 |
+
//if elements name is shorter than 3 chars return error. I use mb_strlen($field_name) > 1
|
729 |
+
//because I don't wont return error if an user add an empty field. An empty field will be
|
730 |
+
//just ignored
|
731 |
+
if (mb_strlen($field_name) > 1 && mb_strlen($field_name) < 3) {
|
732 |
+
$array_errors[] = __("Field # $i must be at least 3 characters", 'yet-another-stars-rating');
|
733 |
+
$error=TRUE;
|
734 |
+
}
|
735 |
+
|
736 |
+
if(mb_strlen($field_name) > 40) {
|
737 |
+
$array_errors[] = __("Field # $i must be shorter than 40 characters", 'yet-another-stars-rating');
|
738 |
+
$error=TRUE;
|
739 |
+
}
|
740 |
+
|
741 |
+
//if field is not empty
|
742 |
+
elseif ($field_name != '') {
|
743 |
+
|
744 |
+
$highest_id=$wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_FIELDS_TABLE . " ORDER BY id DESC LIMIT 1 ");
|
745 |
+
|
746 |
+
$highest_field_id = $wpdb->get_results("SELECT field_id FROM " . YASR_MULTI_SET_FIELDS_TABLE . " ORDER BY field_id DESC LIMIT 1 ");
|
747 |
+
|
748 |
+
foreach ($highest_id as $id) {
|
749 |
+
$field_table_new_id=$id->id + 1;
|
750 |
+
}
|
751 |
+
|
752 |
+
foreach ($highest_field_id as $id) {
|
753 |
+
$new_field_id = $id->field_id+1;
|
754 |
+
}
|
755 |
+
|
756 |
+
$insert_set_value=$wpdb->replace(
|
757 |
+
YASR_MULTI_SET_FIELDS_TABLE,
|
758 |
+
array(
|
759 |
+
'id' => $field_table_new_id,
|
760 |
+
'parent_set_id' =>$set_id,
|
761 |
+
'field_name' =>$field_name,
|
762 |
+
'field_id' =>$new_field_id
|
763 |
+
),
|
764 |
+
array ('%d', '%d', '%s', '%d')
|
765 |
+
);
|
766 |
+
|
767 |
+
//now, I've to find which post is using the edited multi set and add the new field with value 0
|
768 |
+
|
769 |
+
//get the highest id
|
770 |
+
$highest_id_value_table = $wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_VALUES_TABLE . " ORDER BY id DESC LIMIT 1 ");
|
771 |
+
|
772 |
+
foreach ($highest_id_value_table as $id) {
|
773 |
+
$field_value_table_new_id=$id->id + 1;
|
774 |
+
}
|
775 |
+
|
776 |
+
//get all the post id that are using this multiset
|
777 |
+
$array_post_id = $wpdb->get_results($wpdb->prepare("SELECT post_id
|
778 |
+
FROM " . YASR_MULTI_SET_VALUES_TABLE .
|
779 |
+
" WHERE set_type=%d
|
780 |
+
GROUP BY post_id", $set_id));
|
781 |
+
|
782 |
+
//Insert the new fields
|
783 |
+
foreach ($array_post_id as $postid) {
|
784 |
+
|
785 |
+
$insert_new_field_values_table = $wpdb->insert(
|
786 |
+
YASR_MULTI_SET_VALUES_TABLE,
|
787 |
+
array(
|
788 |
+
'id' => $field_value_table_new_id,
|
789 |
+
'set_type' => $set_id,
|
790 |
+
'field_id' => $new_field_id,
|
791 |
+
'post_id' => $postid->post_id
|
792 |
+
),
|
793 |
+
array ('%d', '%d', '%d', '%d')
|
794 |
+
);
|
795 |
+
|
796 |
+
$field_value_table_new_id++;
|
797 |
+
|
798 |
+
}
|
799 |
+
|
800 |
+
if ($insert_set_value == FALSE) {
|
801 |
+
$error = TRUE;
|
802 |
+
$array_errors[] = __("Something goes wrong trying to insert set field name in edit form. Please report it", 'yet-another-stars-rating');
|
803 |
+
}
|
804 |
+
|
805 |
+
} //end else
|
806 |
+
}
|
807 |
+
|
808 |
+
|
809 |
+
} //End for
|
810 |
+
|
811 |
+
|
812 |
+
if ($error) {
|
813 |
+
return $array_errors;
|
814 |
+
}
|
815 |
+
else {
|
816 |
+
echo "<div class=\"updated\"><p><strong>";
|
817 |
+
_e("Settings Saved", 'yet-another-stars-rating');
|
818 |
+
echo "</strong></p></div> ";
|
819 |
+
}
|
820 |
+
|
821 |
+
|
822 |
+
} //End if isset( $_POST['yasr_edit_multi_set_form']
|
823 |
+
|
824 |
+
|
825 |
+
} //End yasr_process_edit_multi_set_form() function
|
826 |
+
|
827 |
+
|
828 |
+
?>
|
lib/settings/yasr-settings-functions-style.php
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
|
5 |
+
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
6 |
+
|
7 |
+
This program is free software: you can redistribute it and/or modify
|
8 |
+
it under the terms of the GNU General Public License as published by
|
9 |
+
the Free Software Foundation, either version 2 of the License, or
|
10 |
+
(at your option) any later version.
|
11 |
+
|
12 |
+
This program is distributed in the hope that it will be useful,
|
13 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
+
GNU General Public License for more details.
|
16 |
+
|
17 |
+
You should have received a copy of the GNU General Public License
|
18 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>
|
19 |
+
*/
|
20 |
+
|
21 |
+
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
|
22 |
+
|
23 |
+
add_action( 'admin_init', 'yasr_style_options_init' ); //This is for auto insert options
|
24 |
+
|
25 |
+
function yasr_style_options_init() {
|
26 |
+
|
27 |
+
register_setting(
|
28 |
+
'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()
|
29 |
+
'yasr_style_options', //The name of an option to sanitize and save.
|
30 |
+
'yasr_style_options_sanitize'
|
31 |
+
);
|
32 |
+
|
33 |
+
global $style_options;
|
34 |
+
|
35 |
+
if (!$style_options || !isset($style_options['scheme_color_multiset']) || !isset($style_options['textarea'])) {
|
36 |
+
|
37 |
+
$style_options = array();
|
38 |
+
$style_options['scheme_color_multiset'] = 'light';
|
39 |
+
$style_options['textarea'] = NULL;
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
//filter $style_options
|
44 |
+
$style_options = apply_filters('yasr_filter_style_options', $style_options);
|
45 |
+
|
46 |
+
add_settings_section( 'yasr_style_options_section_id', __('Style Options', 'yet-another-stars-rating'), 'yasr_style_section_callback', 'yasr_style_tab' );
|
47 |
+
do_action('yasr_style_options_add_settings_field', $style_options);
|
48 |
+
add_settings_field( 'yasr_color_scheme_multiset', __('Which color scheme do you want to use?', 'yet-another-stars-rating') , 'yasr_color_scheme_multiset_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options);
|
49 |
+
add_settings_field( 'yasr_style_options_textarea', __('Custom CSS Styles', 'yet-another-stars-rating'), 'yasr_style_options_textarea_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options );
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
function yasr_style_section_callback () {
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
|
60 |
+
|
61 |
+
function yasr_color_scheme_multiset_callback($style_options) {
|
62 |
+
|
63 |
+
?>
|
64 |
+
|
65 |
+
<input type='radio' name='yasr_style_options[scheme_color_multiset]' value='light' class='yasr-general-options-scheme-color' <?php if ($style_options['scheme_color_multiset']==='light') echo " checked=\"checked\" "; ?> />
|
66 |
+
<?php _e('Light', 'yet-another-stars-rating')?>
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
<input type='radio' name='yasr_style_options[scheme_color_multiset]' value='dark' class='yasr-general-options-scheme-color' <?php if ($style_options['scheme_color_multiset']==='dark') echo " checked=\"checked\" "; ?> />
|
71 |
+
<?php _e('Dark', 'yet-another-stars-rating')?>
|
72 |
+
<br />
|
73 |
+
|
74 |
+
<br />
|
75 |
+
|
76 |
+
<a href="#" id="yasr-color-scheme-preview-link"><?php _e("Preview", 'yet-another-stars-rating') ?></a>
|
77 |
+
|
78 |
+
<div id="yasr-color-scheme-preview" style="display:none">
|
79 |
+
<?php
|
80 |
+
|
81 |
+
_e("Light theme", 'yet-another-stars-rating');
|
82 |
+
echo "<br /><br /><img src=" . YASR_IMG_DIR . "yasr-multi-set.png>";
|
83 |
+
|
84 |
+
echo "<br /> <br />";
|
85 |
+
|
86 |
+
_e("Dark theme", 'yet-another-stars-rating');
|
87 |
+
echo "<br /><br /><img src=" . YASR_IMG_DIR . "dark-multi-set.png>";
|
88 |
+
?>
|
89 |
+
</div>
|
90 |
+
|
91 |
+
<p>
|
92 |
+
|
93 |
+
<?php
|
94 |
+
}
|
95 |
+
|
96 |
+
function yasr_style_options_textarea_callback ($style_options) {
|
97 |
+
|
98 |
+
_e("Please use text area below to write your own CSS styles to override the default ones.", 'yet-another-stars-rating');
|
99 |
+
echo "<br /><strong>";
|
100 |
+
_e("Leave it blank if you don't know what you're doing.", 'yet-another-stars-rating');
|
101 |
+
echo "</strong><p>";
|
102 |
+
|
103 |
+
echo ("
|
104 |
+
<textarea rows=\"17\" cols=\"40\" name=\"yasr_style_options[textarea]\" id=\"yasr_style_options_textarea\">$style_options[textarea]</textarea>
|
105 |
+
");
|
106 |
+
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
//sanitize
|
111 |
+
function yasr_style_options_sanitize ($style_options) {
|
112 |
+
|
113 |
+
$style_options = apply_filters('yasr_sanitize_style_options', $style_options);
|
114 |
+
|
115 |
+
foreach ($style_options as $key => $value) {
|
116 |
+
$output[$key] = strip_tags( stripslashes( $style_options[$key] ) );
|
117 |
+
}
|
118 |
+
|
119 |
+
return $output;
|
120 |
+
|
121 |
+
}
|
122 |
+
|
123 |
+
?>
|
lib/settings/yasr-settings-functions.php
ADDED
@@ -0,0 +1,650 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
|
5 |
+
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
6 |
+
|
7 |
+
This program is free software: you can redistribute it and/or modify
|
8 |
+
it under the terms of the GNU General Public License as published by
|
9 |
+
the Free Software Foundation, either version 2 of the License, or
|
10 |
+
(at your option) any later version.
|
11 |
+
|
12 |
+
This program is distributed in the hope that it will be useful,
|
13 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
+
GNU General Public License for more details.
|
16 |
+
|
17 |
+
You should have received a copy of the GNU General Public License
|
18 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>
|
19 |
+
*/
|
20 |
+
|
21 |
+
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
|
22 |
+
|
23 |
+
function yasr_settings_tabs($active_tab) {
|
24 |
+
|
25 |
+
?>
|
26 |
+
|
27 |
+
<h2 class="nav-tab-wrapper yasr-no-underline">
|
28 |
+
|
29 |
+
<a href="?page=yasr_settings_page&tab=general_settings" class="nav-tab <?php if ($active_tab == 'general_settings') echo 'nav-tab-active'; ?>" > <?php _e("General Settings", 'yet-another-stars-rating'); ?> </a>
|
30 |
+
<a href="?page=yasr_settings_page&tab=manage_multi" class="nav-tab <?php if ($active_tab == 'manage_multi') echo 'nav-tab-active'; ?>" > <?php _e("Multi Sets", 'yet-another-stars-rating'); ?> </a>
|
31 |
+
<a href="?page=yasr_settings_page&tab=style_options" class="nav-tab <?php if ($active_tab == 'style_options') echo 'nav-tab-active'; ?>" > <?php _e("Aspect & Styles", 'yet-another-stars-rating'); ?> </a>
|
32 |
+
<?php do_action( 'yasr_add_settings_tab', $active_tab ); ?>
|
33 |
+
|
34 |
+
</h2>
|
35 |
+
|
36 |
+
<?php
|
37 |
+
}
|
38 |
+
|
39 |
+
/************ Add yasr general options ***********/
|
40 |
+
|
41 |
+
add_action( 'admin_init', 'yasr_general_options_init' ); //This is for general options
|
42 |
+
|
43 |
+
function yasr_general_options_init() {
|
44 |
+
|
45 |
+
register_setting(
|
46 |
+
'yasr_general_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
|
47 |
+
'yasr_general_options', //The name of an option to sanitize and save.
|
48 |
+
'yasr_general_options_sanitize'
|
49 |
+
);
|
50 |
+
|
51 |
+
$option = get_option( 'yasr_general_options' );
|
52 |
+
|
53 |
+
//This is to avoid undefined offset
|
54 |
+
if ($option && $option['auto_insert_enabled']==0) {
|
55 |
+
$option['auto_insert_what'] = 'overall_rating';
|
56 |
+
$option['auto_insert_where'] = 'top';
|
57 |
+
$option['auto_insert_exclude_pages'] = 'yes';
|
58 |
+
$option['auto_insert_size'] = 'large';
|
59 |
+
$option['auto_insert_custom_post_only'] = 'no';
|
60 |
+
}
|
61 |
+
|
62 |
+
//This is to avoid undefined offset
|
63 |
+
if ($option && $option['text_before_stars']==0) {
|
64 |
+
$option['text_before_overall'] = '';
|
65 |
+
$option['text_before_visitor_rating'] = '';
|
66 |
+
$option['text_after_visitor_rating'] = '';
|
67 |
+
$option['custom_text_user_voted'] = '';
|
68 |
+
}
|
69 |
+
|
70 |
+
//if it's not blogposting avoid undefined variable
|
71 |
+
if (!isset($option['blogposting_organization_name'])) {
|
72 |
+
|
73 |
+
$option['blogposting_organization_name'] = get_bloginfo('name');
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
if (!isset($option['blogposting_organization_logo'])) {
|
78 |
+
|
79 |
+
$option['blogposting_organization_logo'] = get_site_icon_url();
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
add_settings_section( 'yasr_general_options_section_id', __('General settings', 'yet-another-stars-rating'), 'yasr_section_callback', 'yasr_general_settings_tab' );
|
84 |
+
add_settings_field( 'yasr_use_auto_insert_id', __('Auto insert options', 'yet-another-stars-rating'), 'yasr_auto_insert_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
85 |
+
add_settings_field( 'yasr_show_overall_in_loop', __('Show "Overall Rating" in Archive Page?', 'yet-another-stars-rating'), 'yasr_show_overall_in_loop_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
86 |
+
add_settings_field( 'yasr_show_visitor_votes_in_loop', __('Show "Visitor Votes" in Archive Page?', 'yet-another-stars-rating'), 'yasr_show_visitor_votes_in_loop_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
87 |
+
add_settings_field( 'yasr_custom_text', __('Insert custom text to show before / after stars', 'yet-another-stars-rating'), 'yasr_custom_text_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
88 |
+
add_settings_field( 'yasr_visitors_stats', __('Do you want show stats for visitors votes?', 'yet-another-stars-rating'), 'yasr_visitors_stats_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
89 |
+
add_settings_field( 'yasr_allow_only_logged_in_id', __('Allow only logged in user to vote?', 'yet-another-stars-rating'), 'yasr_allow_only_logged_in_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
90 |
+
add_settings_field( 'yasr_enable_ip', __('Do you want to save ip address?', 'yet-another-stars-rating'), 'yasr_enable_ip_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
91 |
+
add_settings_field( 'yasr_choose_snippet_id', __('Rich snippet options', 'yet-another-stars-rating'), 'yasr_choose_snippet_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
92 |
+
add_settings_field( 'yasr_choose_overall_rating_method', __('How do you want to rate "Overall Rating"?', 'yet-another-stars-rating'), 'yasr_choose_overall_rating_method_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
function yasr_section_callback() {
|
97 |
+
//_e('Manage auto insert', 'yet-another-stars-rating');
|
98 |
+
}
|
99 |
+
|
100 |
+
function yasr_auto_insert_callback($option) {
|
101 |
+
|
102 |
+
?>
|
103 |
+
|
104 |
+
<strong><?php _e('Use Auto Insert?', 'yet-another-stars-rating'); ?></strong>
|
105 |
+
|
106 |
+
|
107 |
+
<div class="yasr-onoffswitch-big">
|
108 |
+
<input type="checkbox" name="yasr_general_options[auto_insert_enabled]" class="yasr-onoffswitch-checkbox" value="1" id="yasr_auto_insert_switch" <?php if ($option['auto_insert_enabled']==1) echo " checked='checked' "; ?> >
|
109 |
+
<label class="yasr-onoffswitch-label" for="yasr_auto_insert_switch">
|
110 |
+
<span class="yasr-onoffswitch-inner"></span>
|
111 |
+
<span class="yasr-onoffswitch-switch"></span>
|
112 |
+
</label>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<p> </p>
|
116 |
+
|
117 |
+
<strong><?php _e('What?', 'yet-another-stars-rating'); ?></strong>
|
118 |
+
|
119 |
+
<div class="yasr-indented-answer">
|
120 |
+
|
121 |
+
<input type="radio" name="yasr_general_options[auto_insert_what]" value="overall_rating" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_what']==='overall_rating') echo " checked=\"checked\" "; ?> >
|
122 |
+
<?php _e('Overall Rating / Author Rating', 'yet-another-stars-rating') ?>
|
123 |
+
<br />
|
124 |
+
|
125 |
+
<input type="radio" name="yasr_general_options[auto_insert_what]" value="visitor_rating" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_what']==='visitor_rating') echo " checked=\"checked\" "; ?> >
|
126 |
+
<?php _e('Visitor Votes', 'yet-another-stars-rating')?>
|
127 |
+
<br />
|
128 |
+
|
129 |
+
<input type="radio" name="yasr_general_options[auto_insert_what]" value="both" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_what']==='both') echo " checked=\"checked\" "; ?> >
|
130 |
+
<?php _e('Both', 'yet-another-stars-rating')?>
|
131 |
+
|
132 |
+
<p> </p>
|
133 |
+
|
134 |
+
</div>
|
135 |
+
|
136 |
+
<strong><?php _e('Where?', 'yet-another-stars-rating'); ?></strong>
|
137 |
+
|
138 |
+
<div class="yasr-indented-answer">
|
139 |
+
|
140 |
+
<input type="radio" name="yasr_general_options[auto_insert_where]" value="top" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_where']==='top' ) echo " checked=\"checked\" "; ?> >
|
141 |
+
<?php _e('Before the post', 'yet-another-stars-rating')?>
|
142 |
+
<br />
|
143 |
+
|
144 |
+
<input type="radio" name="yasr_general_options[auto_insert_where]" value="bottom" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_where']==='bottom') echo " checked=\"checked\" "; ?> >
|
145 |
+
<?php _e('After the post', 'yet-another-stars-rating')?>
|
146 |
+
<br />
|
147 |
+
|
148 |
+
<p> </p>
|
149 |
+
|
150 |
+
</div>
|
151 |
+
|
152 |
+
<strong><?php _e('Size', 'yet-another-stars-rating'); ?></strong>
|
153 |
+
|
154 |
+
<div class="yasr-indented-answer">
|
155 |
+
|
156 |
+
<div class="yasr-option-size">
|
157 |
+
<input type="radio" name="yasr_general_options[auto_insert_size]" value="small" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_size']==='small' ) echo " checked=\"checked\" "; ?> >
|
158 |
+
<img src="<?php echo YASR_IMG_DIR . "yasr-stars-small.png" ?>" class="yasr-img-option-size"><span class="yasr-text-options-size"><?php _e('Small', 'yet-another-stars-rating')?></span>
|
159 |
+
</div>
|
160 |
+
|
161 |
+
<div class="yasr-option-size">
|
162 |
+
<input type="radio" name="yasr_general_options[auto_insert_size]" value="medium" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_size']==='medium' ) echo " checked=\"checked\" "; ?> >
|
163 |
+
<img src="<?php echo YASR_IMG_DIR . "yasr-stars-medium.png" ?>" class="yasr-img-option-size"><span class="yasr-text-options-size"><?php _e('Medium', 'yet-another-stars-rating')?></span>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<div class="yasr-option-size">
|
167 |
+
<input type="radio" name="yasr_general_options[auto_insert_size]" value="large" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_size']==='large' ) echo " checked=\"checked\" "; ?> >
|
168 |
+
<img src="<?php echo YASR_IMG_DIR . "yasr-stars-large.png" ?>" class="yasr-img-option-size"><span class="yasr-text-options-size"><?php _e('Large', 'yet-another-stars-rating')?></span>
|
169 |
+
</div>
|
170 |
+
|
171 |
+
<p> </p>
|
172 |
+
|
173 |
+
</div>
|
174 |
+
|
175 |
+
<strong><?php _e('Exclude Pages?', 'yet-another-stars-rating'); ?></strong>
|
176 |
+
|
177 |
+
<div class="yasr-indented-answer">
|
178 |
+
<input type="radio" name="yasr_general_options[auto_insert_exclude_pages]" value="yes" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_exclude_pages']==='yes' ) echo " checked=\"checked\" "; ?> >
|
179 |
+
<?php _e('Yes', 'yet-another-stars-rating'); ?>
|
180 |
+
|
181 |
+
|
182 |
+
|
183 |
+
<input type="radio" name="yasr_general_options[auto_insert_exclude_pages]" value="no" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_exclude_pages']==='no') echo " checked=\"checked\" "; ?> >
|
184 |
+
<?php _e('No', 'yet-another-stars-rating'); ?>
|
185 |
+
<br />
|
186 |
+
|
187 |
+
<p> </p>
|
188 |
+
|
189 |
+
</div>
|
190 |
+
|
191 |
+
<?php
|
192 |
+
|
193 |
+
$custom_post_types = yasr_get_custom_post_type('bool');
|
194 |
+
|
195 |
+
if ($custom_post_types) { ?>
|
196 |
+
<strong><?php _e('Use only in custom post types?', 'yet-another-stars-rating'); ?></strong>
|
197 |
+
<div class="yasr-indented-answer">
|
198 |
+
<input type="radio" name="yasr_general_options[auto_insert_custom_post_only]" value="yes" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_custom_post_only']==='yes' ) echo " checked=\"checked\" "; ?> >
|
199 |
+
<?php _e('Yes', 'yet-another-stars-rating'); ?>
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
+
<input type="radio" name="yasr_general_options[auto_insert_custom_post_only]" value="no" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_custom_post_only']==='no') echo " checked=\"checked\" "; ?> >
|
204 |
+
<?php _e('No', 'yet-another-stars-rating'); ?>
|
205 |
+
|
206 |
+
<p>
|
207 |
+
|
208 |
+
<?php _e("You see this because you use custom post types.", 'yet-another-stars-rating'); ?>
|
209 |
+
<br/>
|
210 |
+
<?php _e("If you want to use auto insert only in custom post types, choose Yes", 'yet-another-stars-rating'); ?>
|
211 |
+
|
212 |
+
<p> </p>
|
213 |
+
|
214 |
+
</div>
|
215 |
+
|
216 |
+
<?php
|
217 |
+
}
|
218 |
+
|
219 |
+
else {
|
220 |
+
|
221 |
+
?>
|
222 |
+
|
223 |
+
<input type="hidden" name="yasr_general_options[auto_insert_custom_post_only]" value="no" ?>
|
224 |
+
|
225 |
+
<?php
|
226 |
+
|
227 |
+
}
|
228 |
+
|
229 |
+
?>
|
230 |
+
|
231 |
+
|
232 |
+
<?php
|
233 |
+
|
234 |
+
submit_button( __('Save Settings') );
|
235 |
+
|
236 |
+
|
237 |
+
} //End yasr_auto_insert_callback
|
238 |
+
|
239 |
+
function yasr_show_overall_in_loop_callback($option) {
|
240 |
+
|
241 |
+
?>
|
242 |
+
|
243 |
+
<div class="yasr-onoffswitch-big">
|
244 |
+
<input type="checkbox" name="yasr_general_options[show_overall_in_loop]" class="yasr-onoffswitch-checkbox" id="yasr-show-overall-in-loop-switch" <?php if ($option['show_overall_in_loop']==='enabled') echo " checked='checked' "; ?> >
|
245 |
+
<label class="yasr-onoffswitch-label" for="yasr-show-overall-in-loop-switch">
|
246 |
+
<span class="yasr-onoffswitch-inner"></span>
|
247 |
+
<span class="yasr-onoffswitch-switch"></span>
|
248 |
+
</label>
|
249 |
+
</div>
|
250 |
+
|
251 |
+
<br />
|
252 |
+
<br />
|
253 |
+
|
254 |
+
<?php _e('If you enable this, "Overall Rating" will be showed not only in the single article or page, but also in pages like Home Page, category pages or archives.', 'yet-another-stars-rating')?>
|
255 |
+
|
256 |
+
<p> </p>
|
257 |
+
|
258 |
+
<br />
|
259 |
+
|
260 |
+
<hr>
|
261 |
+
|
262 |
+
<?php
|
263 |
+
|
264 |
+
}
|
265 |
+
|
266 |
+
function yasr_show_visitor_votes_in_loop_callback ($option) {
|
267 |
+
|
268 |
+
?>
|
269 |
+
|
270 |
+
<div class="yasr-onoffswitch-big">
|
271 |
+
<input type="checkbox" name="yasr_general_options[show_visitor_votes_in_loop]" class="yasr-onoffswitch-checkbox" id="yasr-show-visitor-votes-in-loop-switch" <?php if ($option['show_visitor_votes_in_loop']==='enabled') echo " checked='checked' "; ?> >
|
272 |
+
<label class="yasr-onoffswitch-label" for="yasr-show-visitor-votes-in-loop-switch">
|
273 |
+
<span class="yasr-onoffswitch-inner"></span>
|
274 |
+
<span class="yasr-onoffswitch-switch"></span>
|
275 |
+
</label>
|
276 |
+
</div>
|
277 |
+
|
278 |
+
<br />
|
279 |
+
<br />
|
280 |
+
|
281 |
+
<?php _e('If you enable this, "Visitor Votes" will be showed not only in the single article or page, but also in pages like Home Page, category pages or archives.', 'yet-another-stars-rating')?>
|
282 |
+
|
283 |
+
<p> </p>
|
284 |
+
|
285 |
+
<br />
|
286 |
+
|
287 |
+
<hr>
|
288 |
+
|
289 |
+
<?php
|
290 |
+
|
291 |
+
}
|
292 |
+
|
293 |
+
function yasr_custom_text_callback($option) {
|
294 |
+
|
295 |
+
$text_before_overall = htmlspecialchars("$option[text_before_overall]");
|
296 |
+
|
297 |
+
$text_before_visitor_rating = htmlspecialchars("$option[text_before_visitor_rating]");
|
298 |
+
|
299 |
+
$text_after_visitor_rating = htmlspecialchars("$option[text_after_visitor_rating]");
|
300 |
+
|
301 |
+
$custom_text_user_votes = htmlentities("$option[custom_text_user_voted]");
|
302 |
+
|
303 |
+
?>
|
304 |
+
|
305 |
+
<div class="yasr-onoffswitch-big">
|
306 |
+
<input type="checkbox" name="yasr_general_options[text_before_stars]" class="yasr-onoffswitch-checkbox" id="yasr-general-options-text-before-stars-switch" <?php if ($option['text_before_stars']==1) echo " checked='checked' "; ?> >
|
307 |
+
<label class="yasr-onoffswitch-label" for="yasr-general-options-text-before-stars-switch">
|
308 |
+
<span class="yasr-onoffswitch-inner"></span>
|
309 |
+
<span class="yasr-onoffswitch-switch"></span>
|
310 |
+
</label>
|
311 |
+
</div>
|
312 |
+
|
313 |
+
<br /> <br />
|
314 |
+
|
315 |
+
<input type='text' name='yasr_general_options[text_before_overall]' id="yasr-general-options-custom-text-before-overall" class='yasr-general-options-text-before' <?php printf('value="%s"', $text_before_overall); ?> maxlength="40"/>
|
316 |
+
<?php _e('Custom text to display before Overall Rating', 'yet-another-stars-rating')?>
|
317 |
+
|
318 |
+
<br /> <br /> <br />
|
319 |
+
|
320 |
+
<input type='text' name='yasr_general_options[text_before_visitor_rating]' id="yasr-general-options-custom-text-before-visitor" class='yasr-general-options-text-before' <?php printf('value="%s"', $text_before_visitor_rating); ?> maxlength="80"/>
|
321 |
+
<?php _e('Custom text to display BEFORE Visitor Rating', 'yet-another-stars-rating')?>
|
322 |
+
|
323 |
+
<br /> <br />
|
324 |
+
|
325 |
+
|
326 |
+
<input type='text' name='yasr_general_options[text_after_visitor_rating]' id="yasr-general-options-custom-text-after-visitor" class='yasr-general-options-text-before' <?php printf('value="%s"', $text_after_visitor_rating); ?> maxlength="80"/>
|
327 |
+
<?php _e('Custom text to display AFTER Visitor Rating', 'yet-another-stars-rating')?>
|
328 |
+
|
329 |
+
<br /> <br /> <br />
|
330 |
+
|
331 |
+
<input type='text' name='yasr_general_options[custom_text_user_voted]' id="yasr-general-options-custom-text-already-rated" class='yasr-general-options-text-before' <?php printf('value="%s"', $custom_text_user_votes); ?> maxlength="60"/>
|
332 |
+
<?php _e('Custom text to display when a non logged user has already rated', 'yet-another-stars-rating')?>
|
333 |
+
|
334 |
+
|
335 |
+
<br /> <br />
|
336 |
+
|
337 |
+
<a href="#" id="yasr-doc-custom-text-link"><?php _e('Help', 'yet-another-stars-rating'); ?></a>
|
338 |
+
|
339 |
+
<div id="yasr-doc-custom-text-div" class="yasr-help-box-settings">
|
340 |
+
|
341 |
+
<?php _e('In the first field you can use %overall_rating% pattern to show the overall rating.', 'yet-another-stars-rating');?>
|
342 |
+
|
343 |
+
<br /> <br />
|
344 |
+
|
345 |
+
<?php _e('In the Second and Third fields you can use %total_count% pattern to show the total count, and %average% pattern to show the average', 'yet-another-stars-rating');?>
|
346 |
+
|
347 |
+
</div>
|
348 |
+
|
349 |
+
<p> </p>
|
350 |
+
|
351 |
+
<?php
|
352 |
+
|
353 |
+
submit_button( __('Save Settings') );
|
354 |
+
|
355 |
+
}
|
356 |
+
|
357 |
+
function yasr_visitors_stats_callback($option) {
|
358 |
+
|
359 |
+
?>
|
360 |
+
|
361 |
+
<div class="yasr-onoffswitch-big">
|
362 |
+
<input type="checkbox" name="yasr_general_options[visitors_stats]" class="yasr-onoffswitch-checkbox" id="yasr-general-options-visitors-stats-switch" <?php if ($option['visitors_stats']==='yes') echo " checked='checked' "; ?> >
|
363 |
+
<label class="yasr-onoffswitch-label" for="yasr-general-options-visitors-stats-switch">
|
364 |
+
<span class="yasr-onoffswitch-inner"></span>
|
365 |
+
<span class="yasr-onoffswitch-switch"></span>
|
366 |
+
</label>
|
367 |
+
</div>
|
368 |
+
|
369 |
+
<br />
|
370 |
+
|
371 |
+
<br />
|
372 |
+
|
373 |
+
<p> </p>
|
374 |
+
|
375 |
+
<hr>
|
376 |
+
|
377 |
+
<?php
|
378 |
+
|
379 |
+
}
|
380 |
+
|
381 |
+
function yasr_allow_only_logged_in_callback($option) {
|
382 |
+
|
383 |
+
?>
|
384 |
+
|
385 |
+
<input type='radio' name='yasr_general_options[allowed_user]' value='logged_only' class='yasr_auto_insert_loggedonly' <?php if ($option['allowed_user']==='logged_only') echo " checked=\"checked\" "; ?> />
|
386 |
+
<?php _e('Allow only logged-in users', 'yet-another-stars-rating')?>
|
387 |
+
<br />
|
388 |
+
|
389 |
+
<input type='radio' name='yasr_general_options[allowed_user]' value='allow_anonymous' class='yasr_auto_insert_loggedonly' <?php if ($option['allowed_user']==='allow_anonymous') echo " checked=\"checked\" "; ?> />
|
390 |
+
<?php _e('Allow everybody (logged in and anonymous)', 'yet-another-stars-rating')?>
|
391 |
+
<br />
|
392 |
+
|
393 |
+
<p> </p>
|
394 |
+
|
395 |
+
<hr>
|
396 |
+
|
397 |
+
<?php
|
398 |
+
|
399 |
+
} //End function
|
400 |
+
|
401 |
+
function yasr_enable_ip_callback($option) {
|
402 |
+
|
403 |
+
?>
|
404 |
+
|
405 |
+
|
406 |
+
<div class="yasr-onoffswitch-big">
|
407 |
+
<input type="checkbox" name="yasr_general_options[enable_ip]" class="yasr-onoffswitch-checkbox" id="yasr-general-options-enable-ip-switch" <?php if ($option['enable_ip']==='yes') echo " checked='checked' "; ?> >
|
408 |
+
<label class="yasr-onoffswitch-label" for="yasr-general-options-enable-ip-switch">
|
409 |
+
<span class="yasr-onoffswitch-inner"></span>
|
410 |
+
<span class="yasr-onoffswitch-switch"></span>
|
411 |
+
</label>
|
412 |
+
</div>
|
413 |
+
|
414 |
+
<br />
|
415 |
+
|
416 |
+
<?php
|
417 |
+
|
418 |
+
$string = sprintf(__('Please note that to comply with the %s EU law, you must warn your users that you\'re storing their ip', 'yet-another-stars-rating'), '<a href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation">GDPR</a>');
|
419 |
+
|
420 |
+
echo $string;
|
421 |
+
|
422 |
+
?>
|
423 |
+
|
424 |
+
<br />
|
425 |
+
|
426 |
+
<hr>
|
427 |
+
|
428 |
+
<?php
|
429 |
+
|
430 |
+
} //End function
|
431 |
+
|
432 |
+
function yasr_choose_snippet_callback($option) {
|
433 |
+
|
434 |
+
$blogposting_organization_name = htmlspecialchars("$option[blogposting_organization_name]");
|
435 |
+
|
436 |
+
$blogposting_organization_logo = htmlspecialchars("$option[blogposting_organization_logo]");
|
437 |
+
|
438 |
+
?>
|
439 |
+
|
440 |
+
<strong><?php _e('Which rich snippet do you want to use?', 'yet-another-stars-rating'); ?></strong>
|
441 |
+
|
442 |
+
<div class="yasr-indented-answer">
|
443 |
+
<input type="radio" name="yasr_general_options[snippet]" value="overall_rating" class="yasr_choose_snippet" <?php if ($option['snippet']==='overall_rating') echo " checked=\"checked\" "; ?> >
|
444 |
+
<?php _e('Review Rating', 'yet-another-stars-rating') ?>
|
445 |
+
<br />
|
446 |
+
|
447 |
+
<input type="radio" name="yasr_general_options[snippet]" value="visitor_rating" class="yasr_choose_snippet" <?php if ($option['snippet']==='visitor_rating') echo " checked=\"checked\" "; ?> >
|
448 |
+
<?php _e('Aggregate Rating', 'yet-another-stars-rating')?>
|
449 |
+
<br />
|
450 |
+
|
451 |
+
<p> </p>
|
452 |
+
|
453 |
+
<a href="#" id="yasr-snippet-explained-link"><?php _e("What is this?", 'yet-another-stars-rating') ?></a>
|
454 |
+
|
455 |
+
<div id="yasr-snippet-explained" class="yasr-help-box-settings">
|
456 |
+
<?php
|
457 |
+
|
458 |
+
_e("If you select \"Review Rating\", your site will be indexed from search engines like this: ", 'yet-another-stars-rating');
|
459 |
+
echo "<br /><br /><img src=" . YASR_IMG_DIR . "yasr_review.png>";
|
460 |
+
|
461 |
+
echo "<br /> <br />";
|
462 |
+
|
463 |
+
_e("If, instead, you choose \"Aggregate Rating\", your site will be indexed like this", 'yet-another-stars-rating');
|
464 |
+
echo "<br /><br /><img src=" . YASR_IMG_DIR . "yasr_aggregate.jpg>";
|
465 |
+
?>
|
466 |
+
</div>
|
467 |
+
|
468 |
+
</div>
|
469 |
+
|
470 |
+
<br />
|
471 |
+
|
472 |
+
<br />
|
473 |
+
|
474 |
+
<strong><?php _e('Select default item type for all post or pages', 'yet-another-stars-rating'); ?></strong>
|
475 |
+
|
476 |
+
<div class="yasr-indented-answer" id="yasr-choose-snippet-type">
|
477 |
+
|
478 |
+
<input type="radio" name="yasr_general_options[snippet_itemtype]" value="Product" class="yasr_choose_snippet" <?php if ($option['snippet_itemtype']==='Product') echo " checked=\"checked\" "; ?> >
|
479 |
+
<?php _e('Product', 'yet-another-stars-rating') ?>
|
480 |
+
<br />
|
481 |
+
|
482 |
+
<input type="radio" name="yasr_general_options[snippet_itemtype]" value="Place" class="yasr_choose_snippet" <?php if ($option['snippet_itemtype']==='Place') echo " checked=\"checked\" "; ?> >
|
483 |
+
<?php _e('Place', 'yet-another-stars-rating')?>
|
484 |
+
<br />
|
485 |
+
|
486 |
+
<input type="radio" name="yasr_general_options[snippet_itemtype]" value="Recipe" class="yasr_choose_snippet" <?php if ($option['snippet_itemtype']==='Recipe') echo " checked=\"checked\" "; ?> >
|
487 |
+
<?php _e('Recipe', 'yet-another-stars-rating')?>
|
488 |
+
<br />
|
489 |
+
|
490 |
+
<input type="radio" name="yasr_general_options[snippet_itemtype]" value="Other" class="yasr_choose_snippet" id="yasr_choose_snippet_blogposting" <?php if ($option['snippet_itemtype']==='Other') echo " checked=\"checked\" "; ?> >
|
491 |
+
<?php _e('BlogPosting')?>
|
492 |
+
<br />
|
493 |
+
|
494 |
+
|
495 |
+
<div class="yasr-help-box-settings" id="yasr-blogPosting-additional-info" style="display:block">
|
496 |
+
|
497 |
+
<?php _e("If you need to use BlogPosting as item type, even for just one post or page, please fill these forms", "yet-another-stars-rating"); ?>
|
498 |
+
|
499 |
+
<br /> <br />
|
500 |
+
|
501 |
+
<input type='text' name='yasr_general_options[blogposting_organization_name]' id="yasr-general-options-blogposting-organization-name" class="yasr-blogPosting-additional-info-inputs" <?php printf('value="%s"', $blogposting_organization_name); ?> maxlength="180"/>
|
502 |
+
<?php _e('Publisher name (e.g. Google)', 'yet-another-stars-rating')?>
|
503 |
+
|
504 |
+
<br /> <br />
|
505 |
+
|
506 |
+
<input type='text' name='yasr_general_options[blogposting_organization_logo]' id="yasr-general-options-blogposting-organization-logo" class="yasr-blogPosting-additional-info-inputs" <?php printf('value="%s"', $blogposting_organization_logo); ?> maxlength="300"/>
|
507 |
+
<?php _e('Logo Url (if empty siteicon will be used instead)', 'yet-another-stars-rating')?>
|
508 |
+
|
509 |
+
</div>
|
510 |
+
|
511 |
+
|
512 |
+
<br />
|
513 |
+
|
514 |
+
<small><?php _e('You can always change it in the single post or page.', 'yet-another-stars-rating'); ?></small>
|
515 |
+
<br />
|
516 |
+
<small><?php _e('This will affect only the post/page where you didn\'t change manually the itemtype yet.', 'yet-another-stars-rating'); ?> </small>
|
517 |
+
|
518 |
+
<p> </p>
|
519 |
+
|
520 |
+
</div>
|
521 |
+
|
522 |
+
|
523 |
+
<p> </p>
|
524 |
+
|
525 |
+
<hr>
|
526 |
+
|
527 |
+
<?php
|
528 |
+
|
529 |
+
} //End function yasr_choose_snippet_callback
|
530 |
+
|
531 |
+
function yasr_choose_overall_rating_method_callback($option) {
|
532 |
+
|
533 |
+
?>
|
534 |
+
|
535 |
+
<input type="radio" name="yasr_general_options[metabox_overall_rating]" value="stars" class="yasr_choose_overall_rating_method" <?php if ($option['metabox_overall_rating']==='stars') echo " checked=\"checked\" "; ?> >
|
536 |
+
<?php _e('Stars', 'yet-another-stars-rating') ?>
|
537 |
+
<br />
|
538 |
+
|
539 |
+
<input type="radio" name="yasr_general_options[metabox_overall_rating]" value="numbers" class="yasr_choose_overall_rating_method" <?php if ($option['metabox_overall_rating']==='numbers') echo " checked=\"checked\" "; ?> >
|
540 |
+
<?php _e('Numbers', 'yet-another-stars-rating')?>
|
541 |
+
<br />
|
542 |
+
|
543 |
+
<p> </p>
|
544 |
+
|
545 |
+
<?php
|
546 |
+
|
547 |
+
}
|
548 |
+
|
549 |
+
function yasr_general_options_sanitize($option) {
|
550 |
+
|
551 |
+
//Array to return
|
552 |
+
$output = array();
|
553 |
+
|
554 |
+
// Loop through each of the incoming options
|
555 |
+
foreach( $option as $key => $value ) {
|
556 |
+
|
557 |
+
// Check to see if the current option has a value. If so, process it.
|
558 |
+
if( isset( $option[$key] ) ) {
|
559 |
+
|
560 |
+
// Strip all HTML and PHP tags and properly handle quoted strings
|
561 |
+
$output[$key] = strip_tags( stripslashes( $option[ $key ] ) );
|
562 |
+
|
563 |
+
if ($key=='blogposting_organization_logo') {
|
564 |
+
|
565 |
+
//if is not a valid url get_site_icon_url instead
|
566 |
+
if (filter_var($value, FILTER_VALIDATE_URL) === FALSE) {
|
567 |
+
$output[$key] = get_site_icon_url();
|
568 |
+
}
|
569 |
+
|
570 |
+
}
|
571 |
+
|
572 |
+
} // end if
|
573 |
+
|
574 |
+
} // end foreach
|
575 |
+
|
576 |
+
//if in array doesn't exists [auto_insert_enabled] key, create it and set to 0
|
577 |
+
if(!array_key_exists('auto_insert_enabled', $output)) {
|
578 |
+
$output['auto_insert_enabled'] = 0;
|
579 |
+
}
|
580 |
+
//if exists value must be 1
|
581 |
+
else {
|
582 |
+
$output['auto_insert_enabled'] = 1;
|
583 |
+
}
|
584 |
+
|
585 |
+
|
586 |
+
//Same as above but for [show_overall_in_loop] key
|
587 |
+
if(!array_key_exists('show_overall_in_loop', $output)) {
|
588 |
+
$output['show_overall_in_loop'] = 'disabled';
|
589 |
+
}
|
590 |
+
//if exists must be string 'enabled'
|
591 |
+
else {
|
592 |
+
$output['show_overall_in_loop'] = 'enabled';
|
593 |
+
}
|
594 |
+
|
595 |
+
|
596 |
+
//Same as above but for [show_visitor_votes_in_loop] key
|
597 |
+
if(!array_key_exists('show_visitor_votes_in_loop', $output)) {
|
598 |
+
$output['show_visitor_votes_in_loop'] = 'disabled';
|
599 |
+
}
|
600 |
+
//if exists must be string 'enabled'
|
601 |
+
else {
|
602 |
+
$output['show_visitor_votes_in_loop'] = 'enabled';
|
603 |
+
}
|
604 |
+
|
605 |
+
//Same as above but for text_before_stars key
|
606 |
+
if(!array_key_exists('text_before_stars', $output)) {
|
607 |
+
$output['text_before_stars'] = 0;
|
608 |
+
}
|
609 |
+
//if exists must be 1
|
610 |
+
else {
|
611 |
+
$output['text_before_stars'] = 1;
|
612 |
+
}
|
613 |
+
|
614 |
+
|
615 |
+
//Same as above but for visitors_stats key
|
616 |
+
if(!array_key_exists('visitors_stats', $output)) {
|
617 |
+
$output['visitors_stats'] = 'no';
|
618 |
+
}
|
619 |
+
//if exists must be string 'yes'
|
620 |
+
else {
|
621 |
+
$output['visitors_stats'] = 'yes';
|
622 |
+
}
|
623 |
+
|
624 |
+
//Same as above but for enable_ip key
|
625 |
+
if(!array_key_exists('enable_ip', $output)) {
|
626 |
+
$output['enable_ip'] = 'no';
|
627 |
+
}
|
628 |
+
//if exists must be string 'yes'
|
629 |
+
else {
|
630 |
+
$output['enable_ip'] = 'yes';
|
631 |
+
}
|
632 |
+
|
633 |
+
return $output;
|
634 |
+
|
635 |
+
}
|
636 |
+
|
637 |
+
|
638 |
+
/************ End Yasr General Settings ************/
|
639 |
+
|
640 |
+
|
641 |
+
//include multiset functions
|
642 |
+
include( YASR_ABSOLUTE_PATH . '/lib/settings/yasr-settings-functions-multiset.php' );
|
643 |
+
|
644 |
+
//include style functions
|
645 |
+
include( YASR_ABSOLUTE_PATH . '/lib/settings/yasr-settings-functions-style.php' );
|
646 |
+
|
647 |
+
//Misc
|
648 |
+
include( YASR_ABSOLUTE_PATH . '/lib/settings/yasr-settings-functions-misc.php' );
|
649 |
+
|
650 |
+
?>
|
lib/yasr-admin-actions.php
CHANGED
@@ -3,21 +3,8 @@
|
|
3 |
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
|
4 |
|
5 |
|
6 |
-
//Delete caches for wp_super_Cache and wp_rocket
|
7 |
-
add_action('yasr_action_on_visitor_vote', 'yasr_delete_cache' );
|
8 |
-
add_action('yasr_action_on_update_visitor_vote', 'yasr_delete_cache');
|
9 |
|
10 |
|
11 |
-
function yasr_delete_cache($post_id) {
|
12 |
-
|
13 |
-
yasr_wp_super_cache_support($post_id);
|
14 |
-
|
15 |
-
yasr_wp_rocket_support($post_id);
|
16 |
-
|
17 |
-
yasr_litespeed_cache_support($post_id);
|
18 |
-
|
19 |
-
}
|
20 |
-
|
21 |
|
22 |
//
|
23 |
add_filter('yasr_filter_style_options', 'yasr_filter_style_options_callback');
|
@@ -25,9 +12,7 @@ add_filter('yasr_filter_style_options', 'yasr_filter_style_options_callback');
|
|
25 |
function yasr_filter_style_options_callback ($style_options) {
|
26 |
|
27 |
if(!array_key_exists('stars_set_free', $style_options)) {
|
28 |
-
|
29 |
-
$style_options['stars_set_free'] = 'flat'; //..default value if not exists
|
30 |
-
|
31 |
}
|
32 |
|
33 |
return $style_options;
|
@@ -52,11 +37,11 @@ add_action('yasr_style_options_add_settings_field', 'yasr_style_options_add_sett
|
|
52 |
|
53 |
<div class='yasr_choose_stars' id='yasr_pro_custom_set_choosen_stars'>
|
54 |
|
55 |
-
<input type='radio' name='yasr_style_options[stars_set_free]' value='
|
56 |
<br />
|
57 |
<div class='yasr_pro_stars_set' id='yasr_pro_custom_set_choosen_stars'>
|
58 |
<?php
|
59 |
-
echo
|
60 |
?>
|
61 |
</div>
|
62 |
|
@@ -64,48 +49,36 @@ add_action('yasr_style_options_add_settings_field', 'yasr_style_options_add_sett
|
|
64 |
|
65 |
<div class='yasr_choose_stars' id='yasr_pro_custom_set_choosen_stars'>
|
66 |
|
67 |
-
<input type='radio' name='yasr_style_options[stars_set_free]' value='
|
68 |
<br />
|
69 |
<div class='yasr_pro_stars_set' id='yasr_pro_custom_set_choosen_stars'>
|
70 |
<?php
|
71 |
-
echo
|
72 |
?>
|
73 |
</div>
|
74 |
|
75 |
</div>
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
<div id="yasr-settings-stylish-stars">
|
80 |
-
|
81 |
-
|
82 |
<div id="yasr-settings-stylish-image-container">
|
83 |
-
|
84 |
<?php
|
85 |
-
|
86 |
-
echo "<img id=\"yasr-settings-stylish-image\" src=" . YASR_IMG_DIR . "yasr-stylish-stars.png>";
|
87 |
-
|
88 |
?>
|
89 |
-
|
90 |
</div>
|
91 |
-
|
92 |
</div>
|
93 |
|
94 |
<div id='yasr-settings-stylish-text'>
|
95 |
|
96 |
<?php
|
97 |
-
|
98 |
$text = __('Looking for more?', 'yet-another-stars-rating');
|
99 |
$text .= '<br />';
|
100 |
$text .= sprintf(__('Upgrade to %s', 'yet-another-stars-rating'), '<a href="?page=yasr_settings_page-pricing">Yasr Pro!</a>');
|
101 |
|
102 |
echo $text;
|
103 |
-
|
104 |
?>
|
105 |
|
106 |
</div>
|
107 |
|
108 |
-
|
109 |
<script type="text/javascript">
|
110 |
|
111 |
jQuery('#yasr-settings-stylish-stars').mouseover(function() {
|
@@ -118,6 +91,8 @@ add_action('yasr_style_options_add_settings_field', 'yasr_style_options_add_sett
|
|
118 |
|
119 |
<?php
|
120 |
|
|
|
|
|
121 |
}
|
122 |
|
123 |
?>
|
3 |
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
|
4 |
|
5 |
|
|
|
|
|
|
|
6 |
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
//
|
10 |
add_filter('yasr_filter_style_options', 'yasr_filter_style_options_callback');
|
12 |
function yasr_filter_style_options_callback ($style_options) {
|
13 |
|
14 |
if(!array_key_exists('stars_set_free', $style_options)) {
|
15 |
+
$style_options['stars_set_free'] = 'rater-yasr'; //..default value if not exists
|
|
|
|
|
16 |
}
|
17 |
|
18 |
return $style_options;
|
37 |
|
38 |
<div class='yasr_choose_stars' id='yasr_pro_custom_set_choosen_stars'>
|
39 |
|
40 |
+
<input type='radio' name='yasr_style_options[stars_set_free]' value='rater' class='yasr-general-options-scheme-color' <?php if ($style_options['stars_set_free']==='rater') echo " checked=\"checked\" "; ?> />
|
41 |
<br />
|
42 |
<div class='yasr_pro_stars_set' id='yasr_pro_custom_set_choosen_stars'>
|
43 |
<?php
|
44 |
+
echo '<img src="' . YASR_IMG_DIR . 'stars_rater.png">';
|
45 |
?>
|
46 |
</div>
|
47 |
|
49 |
|
50 |
<div class='yasr_choose_stars' id='yasr_pro_custom_set_choosen_stars'>
|
51 |
|
52 |
+
<input type='radio' name='yasr_style_options[stars_set_free]' value='rater-yasr' class='yasr-general-options-scheme-color' <?php if ($style_options['stars_set_free']==='rater-yasr') echo " checked=\"checked\" "; ?> />
|
53 |
<br />
|
54 |
<div class='yasr_pro_stars_set' id='yasr_pro_custom_set_choosen_stars'>
|
55 |
<?php
|
56 |
+
echo '<img src="' . YASR_IMG_DIR . 'stars_rater_yasr.png">';
|
57 |
?>
|
58 |
</div>
|
59 |
|
60 |
</div>
|
61 |
|
62 |
+
<div id="yasr-settings-stylish-stars" style="margin-top: 15px">
|
|
|
|
|
|
|
|
|
63 |
<div id="yasr-settings-stylish-image-container">
|
|
|
64 |
<?php
|
65 |
+
echo "<img id=\"yasr-settings-stylish-image\" src=" . YASR_IMG_DIR . "yasr-pro-stars.png>";
|
|
|
|
|
66 |
?>
|
|
|
67 |
</div>
|
|
|
68 |
</div>
|
69 |
|
70 |
<div id='yasr-settings-stylish-text'>
|
71 |
|
72 |
<?php
|
|
|
73 |
$text = __('Looking for more?', 'yet-another-stars-rating');
|
74 |
$text .= '<br />';
|
75 |
$text .= sprintf(__('Upgrade to %s', 'yet-another-stars-rating'), '<a href="?page=yasr_settings_page-pricing">Yasr Pro!</a>');
|
76 |
|
77 |
echo $text;
|
|
|
78 |
?>
|
79 |
|
80 |
</div>
|
81 |
|
|
|
82 |
<script type="text/javascript">
|
83 |
|
84 |
jQuery('#yasr-settings-stylish-stars').mouseover(function() {
|
91 |
|
92 |
<?php
|
93 |
|
94 |
+
submit_button( __('Save Settings') );
|
95 |
+
|
96 |
}
|
97 |
|
98 |
?>
|
lib/yasr-ajax-functions.php
CHANGED
@@ -124,37 +124,25 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
124 |
$post_id = (int)$post_id;
|
125 |
|
126 |
if ($reviewtype === "1") {
|
127 |
-
|
128 |
$reviewtype = 'Product';
|
129 |
-
|
130 |
}
|
131 |
|
132 |
elseif ($reviewtype === "2") {
|
133 |
-
|
134 |
$reviewtype = 'Place';
|
135 |
-
|
136 |
}
|
137 |
|
138 |
elseif ($reviewtype === "3") {
|
139 |
-
|
140 |
$reviewtype = "Recipe";
|
141 |
-
|
142 |
}
|
143 |
|
144 |
elseif ($reviewtype === "4") {
|
145 |
-
|
146 |
$reviewtype = 'Other';
|
147 |
-
|
148 |
}
|
149 |
|
150 |
else {
|
151 |
-
|
152 |
die();
|
153 |
-
|
154 |
}
|
155 |
|
156 |
-
global $wpdb;
|
157 |
-
|
158 |
$review_type = update_post_meta($post_id, 'yasr_review_type', $reviewtype);
|
159 |
|
160 |
if($review_type) {
|
@@ -174,8 +162,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
174 |
function yasr_output_multiple_set_callback() {
|
175 |
|
176 |
if(isset($_POST['set_id']) && isset($_POST['post_id']) && $_POST['post_id'] != '' && $_POST['set_id'] != '' ) {
|
177 |
-
$
|
178 |
-
$post_id = $_POST['post_id'];
|
179 |
}
|
180 |
else {
|
181 |
exit();
|
@@ -185,132 +173,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
185 |
wp_die( __( 'You do not have sufficient permissions to access this page.', 'yet-another-stars-rating' ) );
|
186 |
}
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
//delete transient first
|
191 |
-
delete_transient( 'yasr_get_multi_set_values_and_field_' . $post_id . '_' . $set_type );
|
192 |
-
|
193 |
-
$set_values=yasr_get_multi_set_values_and_field ($post_id, $set_type);
|
194 |
-
|
195 |
-
//If this is a new post or post has no multi values data
|
196 |
-
if (!$set_values) {
|
197 |
-
|
198 |
-
echo "<p>";
|
199 |
-
|
200 |
-
_e('Choose a vote for each element', 'yet-another-stars-rating');
|
201 |
-
|
202 |
-
echo "
|
203 |
-
|
204 |
-
<br /> <br />
|
205 |
-
|
206 |
-
<table class=\"yasr_table_multi_set_admin\">";
|
207 |
-
//Get Set fields name
|
208 |
-
$set_name=$wpdb->get_results($wpdb->prepare("SELECT field_name AS name, field_id AS id
|
209 |
-
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
210 |
-
WHERE parent_set_id=%f
|
211 |
-
ORDER BY field_id ASC",
|
212 |
-
$set_type));
|
213 |
-
|
214 |
-
foreach ($set_name as $name) {
|
215 |
-
|
216 |
-
//// first, I've to rate all the values to -1, or if someone is leaved empty /////
|
217 |
-
//// will disappear later
|
218 |
-
|
219 |
-
//get the highest id in table cause it is not AI
|
220 |
-
$highest_id=$wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_VALUES_TABLE . " ORDER BY id DESC LIMIT 1 ");
|
221 |
-
|
222 |
-
if (!$highest_id) {
|
223 |
-
$new_id=0;
|
224 |
-
}
|
225 |
-
|
226 |
-
foreach ($highest_id as $id) {
|
227 |
-
$new_id=$id->id + 1;
|
228 |
-
}
|
229 |
-
|
230 |
-
$query_success=$wpdb->replace(
|
231 |
-
YASR_MULTI_SET_VALUES_TABLE,
|
232 |
-
array (
|
233 |
-
'id'=>$new_id,
|
234 |
-
'post_id'=>$post_id,
|
235 |
-
'field_id'=>$name->id,
|
236 |
-
'votes'=>'-1',
|
237 |
-
'set_type'=>$set_type,
|
238 |
-
'number_of_votes' => '0',
|
239 |
-
'sum_votes' => '0'
|
240 |
-
),
|
241 |
-
array ("%d", "%d", "%d", "%s", "%d", "%d", "%d")
|
242 |
-
);
|
243 |
-
|
244 |
-
|
245 |
-
echo "<tr> <td>";
|
246 |
-
echo "$name->name </td>";
|
247 |
-
echo "<td>
|
248 |
-
<div class=\"rateit bigstars multi\" id=\"$name->id\" data-rateit-value=\"\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-step=\"0.5\" data-rateit-resetable=\"true\" data-rateit-readonly=\"false\"></div>
|
249 |
-
|
250 |
-
<span id=\"yasr-loader-multi-set-field-$name->id\" style=\"display:none;\" > <img src=\"" . YASR_IMG_DIR . "/loader.gif\" ></span>
|
251 |
-
</td>
|
252 |
-
</tr>";
|
253 |
-
|
254 |
-
|
255 |
-
} //End foreach
|
256 |
-
|
257 |
-
echo "</table>
|
258 |
-
|
259 |
-
</p>";
|
260 |
-
|
261 |
-
echo "<p>";
|
262 |
-
|
263 |
-
_e("If you want to insert this multiset, paste this shortcode ", 'yet-another-stars-rating');
|
264 |
-
echo "<strong> [yasr_multiset setid=$set_type] </strong> <br />";
|
265 |
-
_e("If, instead, you want allow your visitor to vote on this multiset, use this shortcode", 'yet-another-stars-rating');
|
266 |
-
echo "<strong> [yasr_visitor_multiset setid=$set_type] </strong>. In this case, you don't need to vote here <br />";
|
267 |
-
|
268 |
-
echo "</p>";
|
269 |
-
|
270 |
-
} //
|
271 |
-
|
272 |
-
//else means that post already has vote and here I show it
|
273 |
-
else {
|
274 |
-
_e('Choose a vote for every element', 'yet-another-stars-rating');
|
275 |
-
|
276 |
-
echo "<table class=\"yasr_table_multi_set_admin\">";
|
277 |
-
|
278 |
-
foreach ($set_values as $set_content) {
|
279 |
-
|
280 |
-
echo "<tr><td width=\"50%\">$set_content->name </td>";
|
281 |
-
|
282 |
-
$integer_vote = floor($set_content->vote);
|
283 |
-
if($set_content->vote < ($integer_vote+0.3)) {
|
284 |
-
$set_content->vote = $integer_vote;
|
285 |
-
}
|
286 |
-
elseif ($set_content->vote >= ($integer_vote+0.3) AND $set_content->vote < ($integer_vote+0.7)) {
|
287 |
-
$set_content->vote = $integer_vote+0.5;
|
288 |
-
}
|
289 |
-
elseif ($set_content->vote >= ($integer_vote+0.7)) {
|
290 |
-
$set_content->vote = $integer_vote+1;
|
291 |
-
}
|
292 |
-
|
293 |
-
echo "<td width=\"50%\">
|
294 |
-
<div class=\"rateit bigstars multi\" id=\"$set_content->id\" data-rateit-starwidth=\"32\" data-rateit-starheight=\"32\" data-rateit-value=\"$set_content->vote\" data-rateit-step=\"0.5\" data-rateit-resetable=\"true\" data-rateit-readonly=\"false\"></div>
|
295 |
-
|
296 |
-
<span id=\"yasr-loader-multi-set-field-$set_content->id\" style=\"display:none;\" > <img src=\"" . YASR_IMG_DIR . "/loader.gif\"></span>
|
297 |
-
</td>
|
298 |
-
</tr>";
|
299 |
-
|
300 |
-
|
301 |
-
} //End foreach
|
302 |
-
|
303 |
-
echo "</table>";
|
304 |
-
|
305 |
-
echo "<p>";
|
306 |
-
|
307 |
-
_e("If you want to insert this multiset, paste this shortcode ", 'yet-another-stars-rating');
|
308 |
-
echo "<strong> [yasr_multiset setid=$set_type] </strong> <br />";
|
309 |
-
_e("If, instead, you want allow your visitor to vote on this multiset, use this shortcode", 'yet-another-stars-rating');
|
310 |
-
echo "<strong> [yasr_visitor_multiset setid=$set_type] </strong>. In this case, you don't need to vote here <br />";
|
311 |
-
|
312 |
-
echo "</p>";
|
313 |
-
}
|
314 |
|
315 |
die();
|
316 |
|
@@ -365,19 +228,19 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
365 |
$id = $index_id->id;
|
366 |
}
|
367 |
$query_success=$wpdb->update(
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
),
|
376 |
-
array (
|
377 |
-
'id'=>$id
|
378 |
),
|
379 |
-
|
380 |
-
|
|
|
|
|
|
|
381 |
);
|
382 |
|
383 |
if($query_success) {
|
@@ -830,11 +693,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
830 |
</div>
|
831 |
|
832 |
<div class=\"yasr-log-ip-date\">
|
833 |
-
|
834 |
<span class=\"yasr-log-ip\">" . __("Ip address" , 'yet-another-stars-rating') . ": <span style=\"color:blue\">$column->ip</span></span>
|
835 |
-
|
836 |
<span class=\"yasr-log-date\">$column->date</span>
|
837 |
-
|
838 |
</div>
|
839 |
|
840 |
</div>
|
@@ -989,23 +849,19 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
989 |
|
990 |
function yasr_insert_visitor_votes_callback () {
|
991 |
|
992 |
-
if(isset($_POST['rating']) && isset($_POST['post_id']) && isset($_POST['
|
993 |
|
994 |
$rating = $_POST['rating'];
|
995 |
$post_id = $_POST['post_id'];
|
996 |
-
$star_size = $_POST['size'];
|
997 |
$nonce_visitor = $_POST['nonce_visitor'];
|
998 |
|
999 |
if($post_id == '') {
|
1000 |
-
|
1001 |
exit();
|
1002 |
-
|
1003 |
}
|
1004 |
|
1005 |
}
|
1006 |
|
1007 |
else {
|
1008 |
-
|
1009 |
exit();
|
1010 |
}
|
1011 |
|
@@ -1024,30 +880,6 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
1024 |
$rating = 5;
|
1025 |
}
|
1026 |
|
1027 |
-
if (YASR_JQUERY_DISABLED === 'yes') {
|
1028 |
-
|
1029 |
-
$star_size = (int)$star_size;
|
1030 |
-
|
1031 |
-
}
|
1032 |
-
|
1033 |
-
else {
|
1034 |
-
|
1035 |
-
if ($star_size == 'rateit yasr_visitor_votes_stars_div rateit-bg') {
|
1036 |
-
$px_size = '16';
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
elseif ($star_size == 'rateit medium yasr_visitor_votes_stars_div rateit-bg') {
|
1040 |
-
$px_size = '24';
|
1041 |
-
}
|
1042 |
-
|
1043 |
-
//default values
|
1044 |
-
else {
|
1045 |
-
$px_size = '32';
|
1046 |
-
}
|
1047 |
-
|
1048 |
-
}
|
1049 |
-
|
1050 |
-
|
1051 |
$transient_name = 'yasr_visitor_votes_' . $post_id;
|
1052 |
|
1053 |
delete_transient( $transient_name );
|
@@ -1150,24 +982,10 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
1150 |
$total_rating = ($user_votes_sum / $number_of_votes);
|
1151 |
$medium_rating = round ($total_rating, 1);
|
1152 |
|
1153 |
-
|
1154 |
-
|
1155 |
-
$html_to_return = '<div id="yasr-visitor-votes-rater-'. "$post_id" . '"></div>';
|
1156 |
-
$html_to_return .= '<span class="yasr-total-average-text" title="yasr-stats"> [' . __( 'Total: ', 'yet-another-stars-rating' ) . "$number_of_votes " . __( 'Average:', 'yet-another-stars-rating' ) . "$medium_rating/5 ]</span>";
|
1157 |
-
$html_to_return .= '<span class="yasr-small-block-bold" id="yasr-vote-saved">' . __( 'Vote Saved', 'yet-another-stars-rating' ) . '</span>';
|
1158 |
-
|
1159 |
-
|
1160 |
-
echo json_encode($html_to_return);
|
1161 |
|
1162 |
-
|
1163 |
-
|
1164 |
-
else {
|
1165 |
-
|
1166 |
-
echo "<div class=\"$star_size\" id=\"yasr_rateit_user_votes_voted\" data-rateit-starwidth=\"$px_size\" data-rateit-starheight=\"$px_size\" data-rateit-value=\"$total_rating\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>
|
1167 |
-
<span class=\"yasr-total-average-text\" title=\"yasr-stats\"> [" . __( "Total: ", 'yet-another-stars-rating' ) . "$number_of_votes " . __( "Average:", 'yet-another-stars-rating' ) . " $medium_rating/5 ]</span>
|
1168 |
-
<span class=\"yasr-small-block-bold\" id=\"yasr-vote-saved\">" . __( "Vote Saved", 'yet-another-stars-rating' ) . "</span>";
|
1169 |
-
|
1170 |
-
}
|
1171 |
|
1172 |
}
|
1173 |
|
@@ -1283,15 +1101,11 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
1283 |
|
1284 |
|
1285 |
if ($query_success) {
|
1286 |
-
|
1287 |
$array_error[] = 0;
|
1288 |
-
|
1289 |
}
|
1290 |
|
1291 |
else {
|
1292 |
-
|
1293 |
$array_error[] = 1;
|
1294 |
-
|
1295 |
}
|
1296 |
|
1297 |
} //End foreach ($rating as $rating_values)
|
@@ -1299,13 +1113,9 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
1299 |
$error_found = FALSE;
|
1300 |
|
1301 |
foreach ($array_error as $error) {
|
1302 |
-
|
1303 |
if ($error === 1) {
|
1304 |
-
|
1305 |
$error_found = TRUE;
|
1306 |
-
|
1307 |
}
|
1308 |
-
|
1309 |
}
|
1310 |
|
1311 |
if(!$error_found) {
|
@@ -1324,9 +1134,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
1324 |
}
|
1325 |
|
1326 |
else {
|
1327 |
-
|
1328 |
_e('Rating not saved. Please Try again', 'yet-another-stars-rating');
|
1329 |
-
|
1330 |
}
|
1331 |
|
1332 |
die();
|
124 |
$post_id = (int)$post_id;
|
125 |
|
126 |
if ($reviewtype === "1") {
|
|
|
127 |
$reviewtype = 'Product';
|
|
|
128 |
}
|
129 |
|
130 |
elseif ($reviewtype === "2") {
|
|
|
131 |
$reviewtype = 'Place';
|
|
|
132 |
}
|
133 |
|
134 |
elseif ($reviewtype === "3") {
|
|
|
135 |
$reviewtype = "Recipe";
|
|
|
136 |
}
|
137 |
|
138 |
elseif ($reviewtype === "4") {
|
|
|
139 |
$reviewtype = 'Other';
|
|
|
140 |
}
|
141 |
|
142 |
else {
|
|
|
143 |
die();
|
|
|
144 |
}
|
145 |
|
|
|
|
|
146 |
$review_type = update_post_meta($post_id, 'yasr_review_type', $reviewtype);
|
147 |
|
148 |
if($review_type) {
|
162 |
function yasr_output_multiple_set_callback() {
|
163 |
|
164 |
if(isset($_POST['set_id']) && isset($_POST['post_id']) && $_POST['post_id'] != '' && $_POST['set_id'] != '' ) {
|
165 |
+
$set_id = (int)$_POST['set_id'];
|
166 |
+
$post_id = (int)$_POST['post_id'];
|
167 |
}
|
168 |
else {
|
169 |
exit();
|
173 |
wp_die( __( 'You do not have sufficient permissions to access this page.', 'yet-another-stars-rating' ) );
|
174 |
}
|
175 |
|
176 |
+
yasr_return_multi_set_values_admin($post_id, $set_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
die();
|
179 |
|
228 |
$id = $index_id->id;
|
229 |
}
|
230 |
$query_success=$wpdb->update(
|
231 |
+
YASR_MULTI_SET_VALUES_TABLE,
|
232 |
+
array (
|
233 |
+
'id'=>$id,
|
234 |
+
'post_id'=>$post_id,
|
235 |
+
'field_id'=>$id_field,
|
236 |
+
'votes'=>$vote,
|
237 |
+
'set_type'=>$set_type
|
|
|
|
|
|
|
238 |
),
|
239 |
+
array (
|
240 |
+
'id'=>$id
|
241 |
+
),
|
242 |
+
array ("%d", "%d", "%d", "%f", "%d"),
|
243 |
+
array ("%d")
|
244 |
);
|
245 |
|
246 |
if($query_success) {
|
693 |
</div>
|
694 |
|
695 |
<div class=\"yasr-log-ip-date\">
|
|
|
696 |
<span class=\"yasr-log-ip\">" . __("Ip address" , 'yet-another-stars-rating') . ": <span style=\"color:blue\">$column->ip</span></span>
|
|
|
697 |
<span class=\"yasr-log-date\">$column->date</span>
|
|
|
698 |
</div>
|
699 |
|
700 |
</div>
|
849 |
|
850 |
function yasr_insert_visitor_votes_callback () {
|
851 |
|
852 |
+
if(isset($_POST['rating']) && isset($_POST['post_id']) && isset($_POST['nonce_visitor'])) {
|
853 |
|
854 |
$rating = $_POST['rating'];
|
855 |
$post_id = $_POST['post_id'];
|
|
|
856 |
$nonce_visitor = $_POST['nonce_visitor'];
|
857 |
|
858 |
if($post_id == '') {
|
|
|
859 |
exit();
|
|
|
860 |
}
|
861 |
|
862 |
}
|
863 |
|
864 |
else {
|
|
|
865 |
exit();
|
866 |
}
|
867 |
|
880 |
$rating = 5;
|
881 |
}
|
882 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
883 |
$transient_name = 'yasr_visitor_votes_' . $post_id;
|
884 |
|
885 |
delete_transient( $transient_name );
|
982 |
$total_rating = ($user_votes_sum / $number_of_votes);
|
983 |
$medium_rating = round ($total_rating, 1);
|
984 |
|
985 |
+
$html_to_return = '<span class="yasr-total-average-text"> [' . __( 'Total:', 'yet-another-stars-rating' ) . " $number_of_votes " . __( 'Average:', 'yet-another-stars-rating' ) . " $medium_rating/5 ]</span>";
|
986 |
+
$html_to_return .= '<span class="yasr-small-block-bold" id="yasr-vote-saved">' . __( 'Vote Saved', 'yet-another-stars-rating' ) . '</span>';
|
|
|
|
|
|
|
|
|
|
|
|
|
987 |
|
988 |
+
echo json_encode($html_to_return);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
989 |
|
990 |
}
|
991 |
|
1101 |
|
1102 |
|
1103 |
if ($query_success) {
|
|
|
1104 |
$array_error[] = 0;
|
|
|
1105 |
}
|
1106 |
|
1107 |
else {
|
|
|
1108 |
$array_error[] = 1;
|
|
|
1109 |
}
|
1110 |
|
1111 |
} //End foreach ($rating as $rating_values)
|
1113 |
$error_found = FALSE;
|
1114 |
|
1115 |
foreach ($array_error as $error) {
|
|
|
1116 |
if ($error === 1) {
|
|
|
1117 |
$error_found = TRUE;
|
|
|
1118 |
}
|
|
|
1119 |
}
|
1120 |
|
1121 |
if(!$error_found) {
|
1134 |
}
|
1135 |
|
1136 |
else {
|
|
|
1137 |
_e('Rating not saved. Please Try again', 'yet-another-stars-rating');
|
|
|
1138 |
}
|
1139 |
|
1140 |
die();
|
lib/yasr-db-functions.php
CHANGED
@@ -260,9 +260,7 @@ function yasr_get_multi_set_values_and_field ($post_id, $set_type) {
|
|
260 |
ORDER BY f.field_id ASC", $set_type, $post_id, $set_type));
|
261 |
|
262 |
if (!empty($result)) {
|
263 |
-
|
264 |
set_transient( 'yasr_get_multi_set_values_and_field_' . $post_id . '_' . $set_type, $result, WEEK_IN_SECONDS );
|
265 |
-
|
266 |
}
|
267 |
|
268 |
return $result;
|
@@ -273,6 +271,114 @@ function yasr_get_multi_set_values_and_field ($post_id, $set_type) {
|
|
273 |
}
|
274 |
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
/****** Get multi set visitor votes ******/
|
277 |
function yasr_get_multi_set_visitor ($post_id, $set_type) {
|
278 |
|
@@ -308,7 +414,6 @@ function yasr_get_multi_set_visitor ($post_id, $set_type) {
|
|
308 |
}
|
309 |
|
310 |
|
311 |
-
|
312 |
/****** Get visitor votes ******/
|
313 |
function yasr_get_visitor_votes ($post_id=FALSE, $create_transient=TRUE) {
|
314 |
|
@@ -316,15 +421,11 @@ function yasr_get_visitor_votes ($post_id=FALSE, $create_transient=TRUE) {
|
|
316 |
|
317 |
//if values it's not passed get the post id, most of cases and default one
|
318 |
if(!$post_id) {
|
319 |
-
|
320 |
$post_id=get_the_ID();
|
321 |
-
|
322 |
}
|
323 |
|
324 |
if (!$post_id) {
|
325 |
-
|
326 |
return;
|
327 |
-
|
328 |
}
|
329 |
|
330 |
$transient_name = 'yasr_visitor_votes_' . $post_id;
|
@@ -389,7 +490,6 @@ function yasr_check_if_user_already_voted($post_id=FALSE) {
|
|
389 |
}
|
390 |
|
391 |
|
392 |
-
|
393 |
/****** Adding logs widget to the dashboard ******/
|
394 |
|
395 |
add_action( 'plugins_loaded', 'add_action_dashboard_widget_log' );
|
@@ -416,10 +516,8 @@ add_action( 'plugins_loaded', 'add_action_dashboard_widget_log' );
|
|
416 |
|
417 |
}
|
418 |
|
419 |
-
|
420 |
function yasr_widget_log_dashboard_callback () {
|
421 |
|
422 |
-
|
423 |
$limit = 8; //max number of row to echo
|
424 |
|
425 |
global $wpdb;
|
@@ -510,7 +608,6 @@ add_action( 'plugins_loaded', 'add_action_dashboard_widget_log' );
|
|
510 |
|
511 |
else {
|
512 |
echo "<button class=\"yasr-log-pagenum\" value=\"$i\">$i</button> ";
|
513 |
-
|
514 |
}
|
515 |
|
516 |
}
|
@@ -526,7 +623,6 @@ add_action( 'plugins_loaded', 'add_action_dashboard_widget_log' );
|
|
526 |
if ($i == 1) {
|
527 |
echo "<button class=\"button-primary\" value=\"$i\">$i</button> ";
|
528 |
}
|
529 |
-
|
530 |
else {
|
531 |
echo "<button class=\"yasr-log-pagenum\" value=\"$i\">$i</button> ";
|
532 |
}
|
@@ -549,7 +645,6 @@ add_action( 'plugins_loaded', 'add_action_dashboard_widget_log' );
|
|
549 |
|
550 |
} //End callback function
|
551 |
|
552 |
-
|
553 |
//This add a dashboard log for every users
|
554 |
//Add action is above
|
555 |
function yasr_add_dashboard_widget_user_log () {
|
@@ -731,8 +826,6 @@ add_action ('admin_init', 'admin_init_delete_data_on_post_callback');
|
|
731 |
|
732 |
|
733 |
|
734 |
-
|
735 |
-
|
736 |
/****** Function to get always the last id in the log table ******/
|
737 |
|
738 |
function yasr_count_logged_vote () {
|
@@ -742,15 +835,11 @@ add_action ('admin_init', 'admin_init_delete_data_on_post_callback');
|
|
742 |
$result = $wpdb->get_var("SELECT COUNT(id) FROM " . YASR_LOG_TABLE );
|
743 |
|
744 |
if ($result) {
|
745 |
-
|
746 |
return $result;
|
747 |
-
|
748 |
}
|
749 |
|
750 |
else {
|
751 |
-
|
752 |
return '0';
|
753 |
-
|
754 |
}
|
755 |
|
756 |
}
|
@@ -769,15 +858,11 @@ if (YASR_AUTO_INSERT_ENABLED == 1 ) {
|
|
769 |
$post_id = get_the_ID();
|
770 |
|
771 |
if(isset($_POST['yasr_auto_insert_disabled'])) {
|
772 |
-
|
773 |
update_post_meta($post_id, 'yasr_auto_insert_disabled', 'yes');
|
774 |
-
|
775 |
}
|
776 |
|
777 |
else {
|
778 |
-
|
779 |
delete_post_meta($post_id, 'yasr_auto_insert_disabled');
|
780 |
-
|
781 |
}
|
782 |
|
783 |
|
260 |
ORDER BY f.field_id ASC", $set_type, $post_id, $set_type));
|
261 |
|
262 |
if (!empty($result)) {
|
|
|
263 |
set_transient( 'yasr_get_multi_set_values_and_field_' . $post_id . '_' . $set_type, $result, WEEK_IN_SECONDS );
|
|
|
264 |
}
|
265 |
|
266 |
return $result;
|
271 |
}
|
272 |
|
273 |
|
274 |
+
/** Output the multi set while edit the page, used in
|
275 |
+
* yasr-metabox-multiple-rating and yasr-ajax-function
|
276 |
+
*/
|
277 |
+
|
278 |
+
function yasr_return_multi_set_values_admin ($post_id, $set_id) {
|
279 |
+
|
280 |
+
if ((!is_int($post_id)) || (!is_int($set_id)) ) {
|
281 |
+
exit(__('Missing post or set id', 'yet-another-stars-rating'));
|
282 |
+
}
|
283 |
+
|
284 |
+
//delete transient first
|
285 |
+
delete_transient( 'yasr_get_multi_set_values_and_field_' . $post_id . '_' . $set_id );
|
286 |
+
|
287 |
+
$set_values = yasr_get_multi_set_values_and_field($post_id, $set_id);
|
288 |
+
|
289 |
+
global $wpdb;
|
290 |
+
|
291 |
+
$index=0;
|
292 |
+
|
293 |
+
//If this is a new post or post has no multi values data
|
294 |
+
if ( !$set_values ) {
|
295 |
+
|
296 |
+
//Get Set fields name
|
297 |
+
$set_name = $wpdb->get_results( $wpdb->prepare( "SELECT field_name AS name, field_id AS id
|
298 |
+
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
299 |
+
WHERE parent_set_id=%d
|
300 |
+
ORDER BY field_id ASC",
|
301 |
+
$set_id ) );
|
302 |
+
|
303 |
+
foreach ( $set_name as $name ) {
|
304 |
+
|
305 |
+
//// first, I've to rate all the values to -1, or if someone is leaved empty /////
|
306 |
+
//// will disappear later
|
307 |
+
|
308 |
+
//get the highest id in table cause it is not AI
|
309 |
+
$highest_id = $wpdb->get_results( "SELECT id FROM " . YASR_MULTI_SET_VALUES_TABLE . " ORDER BY id DESC LIMIT 1 " );
|
310 |
+
|
311 |
+
if ( ! $highest_id ) {
|
312 |
+
$new_id = 0;
|
313 |
+
}
|
314 |
+
|
315 |
+
foreach ( $highest_id as $id ) {
|
316 |
+
$new_id = $id->id + 1;
|
317 |
+
}
|
318 |
+
|
319 |
+
$query_success = $wpdb->replace(
|
320 |
+
YASR_MULTI_SET_VALUES_TABLE,
|
321 |
+
array(
|
322 |
+
'id' => $new_id,
|
323 |
+
'post_id' => $post_id,
|
324 |
+
'field_id' => $name->id,
|
325 |
+
'votes' => '-1',
|
326 |
+
'set_type' => $set_id,
|
327 |
+
'number_of_votes' => '0',
|
328 |
+
'sum_votes' => '0'
|
329 |
+
),
|
330 |
+
array( "%d", "%d", "%d", "%s", "%d", "%d", "%d" )
|
331 |
+
);
|
332 |
+
|
333 |
+
|
334 |
+
$array_to_return[$index]['value_name'] = $name->name;
|
335 |
+
$array_to_return[$index]['value_rating'] = 0;
|
336 |
+
$array_to_return[$index]['value_id'] = $name->id;
|
337 |
+
|
338 |
+
$index++;
|
339 |
+
|
340 |
+
} //End foreach
|
341 |
+
|
342 |
+
} //
|
343 |
+
|
344 |
+
//else means that post already has vote and here I show it
|
345 |
+
else {
|
346 |
+
|
347 |
+
foreach ( $set_values as $set_content ) {
|
348 |
+
|
349 |
+
if($set_content->vote < 0) {
|
350 |
+
$set_content->vote = 0;
|
351 |
+
}
|
352 |
+
|
353 |
+
$integer_vote = floor( $set_content->vote );
|
354 |
+
if ( $set_content->vote < ( $integer_vote + 0.3 ) ) {
|
355 |
+
$set_content->vote = $integer_vote;
|
356 |
+
} elseif ( $set_content->vote >= ( $integer_vote + 0.3 ) AND $set_content->vote < ( $integer_vote + 0.7 ) ) {
|
357 |
+
$set_content->vote = $integer_vote + 0.5;
|
358 |
+
} elseif ( $set_content->vote >= ( $integer_vote + 0.7 ) ) {
|
359 |
+
$set_content->vote = $integer_vote + 1;
|
360 |
+
}
|
361 |
+
|
362 |
+
$array_to_return[$index]['value_name'] = $set_content->name;
|
363 |
+
$array_to_return[$index]['value_rating'] = $set_content->vote;
|
364 |
+
$array_to_return[$index]['value_id'] = $set_content->id;
|
365 |
+
|
366 |
+
$index++;
|
367 |
+
|
368 |
+
} //End foreach
|
369 |
+
|
370 |
+
|
371 |
+
}
|
372 |
+
|
373 |
+
echo json_encode($array_to_return);
|
374 |
+
|
375 |
+
die();
|
376 |
+
|
377 |
+
|
378 |
+
|
379 |
+
}
|
380 |
+
|
381 |
+
|
382 |
/****** Get multi set visitor votes ******/
|
383 |
function yasr_get_multi_set_visitor ($post_id, $set_type) {
|
384 |
|
414 |
}
|
415 |
|
416 |
|
|
|
417 |
/****** Get visitor votes ******/
|
418 |
function yasr_get_visitor_votes ($post_id=FALSE, $create_transient=TRUE) {
|
419 |
|
421 |
|
422 |
//if values it's not passed get the post id, most of cases and default one
|
423 |
if(!$post_id) {
|
|
|
424 |
$post_id=get_the_ID();
|
|
|
425 |
}
|
426 |
|
427 |
if (!$post_id) {
|
|
|
428 |
return;
|
|
|
429 |
}
|
430 |
|
431 |
$transient_name = 'yasr_visitor_votes_' . $post_id;
|
490 |
}
|
491 |
|
492 |
|
|
|
493 |
/****** Adding logs widget to the dashboard ******/
|
494 |
|
495 |
add_action( 'plugins_loaded', 'add_action_dashboard_widget_log' );
|
516 |
|
517 |
}
|
518 |
|
|
|
519 |
function yasr_widget_log_dashboard_callback () {
|
520 |
|
|
|
521 |
$limit = 8; //max number of row to echo
|
522 |
|
523 |
global $wpdb;
|
608 |
|
609 |
else {
|
610 |
echo "<button class=\"yasr-log-pagenum\" value=\"$i\">$i</button> ";
|
|
|
611 |
}
|
612 |
|
613 |
}
|
623 |
if ($i == 1) {
|
624 |
echo "<button class=\"button-primary\" value=\"$i\">$i</button> ";
|
625 |
}
|
|
|
626 |
else {
|
627 |
echo "<button class=\"yasr-log-pagenum\" value=\"$i\">$i</button> ";
|
628 |
}
|
645 |
|
646 |
} //End callback function
|
647 |
|
|
|
648 |
//This add a dashboard log for every users
|
649 |
//Add action is above
|
650 |
function yasr_add_dashboard_widget_user_log () {
|
826 |
|
827 |
|
828 |
|
|
|
|
|
829 |
/****** Function to get always the last id in the log table ******/
|
830 |
|
831 |
function yasr_count_logged_vote () {
|
835 |
$result = $wpdb->get_var("SELECT COUNT(id) FROM " . YASR_LOG_TABLE );
|
836 |
|
837 |
if ($result) {
|
|
|
838 |
return $result;
|
|
|
839 |
}
|
840 |
|
841 |
else {
|
|
|
842 |
return '0';
|
|
|
843 |
}
|
844 |
|
845 |
}
|
858 |
$post_id = get_the_ID();
|
859 |
|
860 |
if(isset($_POST['yasr_auto_insert_disabled'])) {
|
|
|
861 |
update_post_meta($post_id, 'yasr_auto_insert_disabled', 'yes');
|
|
|
862 |
}
|
863 |
|
864 |
else {
|
|
|
865 |
delete_post_meta($post_id, 'yasr_auto_insert_disabled');
|
|
|
866 |
}
|
867 |
|
868 |
|
lib/yasr-functions.php
CHANGED
@@ -29,7 +29,6 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
29 |
function yasr_add_scripts () {
|
30 |
|
31 |
wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', FALSE, NULL, 'all' );
|
32 |
-
|
33 |
wp_enqueue_style( 'dashicons' ); //dashicons
|
34 |
|
35 |
//Run after default css are loaded
|
@@ -48,18 +47,16 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
48 |
wp_add_inline_style( 'yasrcss', YASR_CUSTOM_CSS_RULES );
|
49 |
}
|
50 |
|
51 |
-
wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.22', TRUE );
|
52 |
-
|
53 |
//From version 1.7.4, always load rater
|
54 |
wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js.js' , '', '0.6.0', TRUE );
|
55 |
|
56 |
-
wp_enqueue_script( 'yasrfront', YASR_JS_DIR . 'yasr-front.js' , array('jquery', '
|
57 |
|
58 |
wp_enqueue_script('tippy', YASR_JS_DIR . 'tippy.all.min.js', '', '3.2.0', TRUE );
|
59 |
|
60 |
do_action('yasr_add_front_script_js');
|
61 |
|
62 |
-
$yasr_visitor_votes_loader = '<div id="loader-visitor-rating" > ' .
|
63 |
|
64 |
$tooltip_values = __("bad, poor, ok, good, super", 'yet-another-stars-rating');
|
65 |
$tooltip_values_exploded = explode(", ", $tooltip_values);
|
@@ -72,7 +69,6 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
72 |
'visitorStatsEnabled' => YASR_VISITORS_STATS,
|
73 |
'tooltipValues' => $tooltip_values_exploded,
|
74 |
'loaderHtml' => $yasr_visitor_votes_loader,
|
75 |
-
'jquery_disabled' => YASR_JQUERY_DISABLED
|
76 |
)
|
77 |
);
|
78 |
|
@@ -88,20 +84,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
88 |
do_action('yasr_add_admin_scripts_begin');
|
89 |
|
90 |
wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr-admin.css', FALSE, NULL, 'all' );
|
91 |
-
wp_enqueue_style( 'wp-jquery-ui-dialog' ); //style
|
92 |
-
|
93 |
-
wp_enqueue_script( 'rateit', YASR_JS_DIR . 'jquery.rateit.min.js' , array('jquery'), '1.0.22', TRUE );
|
94 |
-
|
95 |
-
//load rater if jquery is disabled
|
96 |
-
if (YASR_JQUERY_DISABLED === 'yes') {
|
97 |
-
|
98 |
-
wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js.js' , '', '0.6.0', TRUE );
|
99 |
-
|
100 |
-
|
101 |
-
}
|
102 |
-
|
103 |
-
wp_enqueue_script( 'jquery-ui-dialog' ); //script
|
104 |
|
|
|
105 |
wp_enqueue_script( 'yasradmin', YASR_JS_DIR . 'yasr-admin.js' , array('jquery'), '1.0.00', TRUE );
|
106 |
|
107 |
//this is for tinymce
|
@@ -109,6 +93,14 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
109 |
|
110 |
do_action('yasr_add_admin_scripts_end' );
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
|
114 |
|
@@ -124,70 +116,30 @@ add_action( 'yasr_add_admin_scripts_end', 'yasr_css_stars_set' );
|
|
124 |
|
125 |
function yasr_css_stars_set() {
|
126 |
|
127 |
-
//if is
|
128 |
-
if (YASR_STARS_SET
|
129 |
|
130 |
-
$
|
131 |
-
$
|
132 |
-
$stars_32 = YASR_IMG_DIR . 'stars32.png';
|
133 |
|
134 |
}
|
135 |
|
|
|
136 |
else {
|
137 |
|
138 |
-
$
|
139 |
-
$
|
140 |
-
$stars_32 = YASR_IMG_DIR . 'stars_32_flat.png';
|
141 |
|
142 |
}
|
143 |
|
144 |
|
145 |
$yasr_st_css = "
|
146 |
-
.
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
}
|
153 |
-
|
154 |
-
.rateit .rateit-selected {
|
155 |
-
background: url($stars_16) left -42px !important;
|
156 |
-
}
|
157 |
-
|
158 |
-
div.medium .rateit-range {
|
159 |
-
/*White*/
|
160 |
-
background: url($stars_24) left 0px !important;
|
161 |
-
}
|
162 |
-
|
163 |
-
div.medium .rateit-hover {
|
164 |
-
/*Red*/
|
165 |
-
background: url($stars_24) left -29px !important;
|
166 |
-
}
|
167 |
-
|
168 |
-
div.medium .rateit-selected {
|
169 |
-
/*Yellow*/
|
170 |
-
background: url($stars_24) left -58px !important;
|
171 |
-
}
|
172 |
-
|
173 |
-
/* Creating set 32 */
|
174 |
-
|
175 |
-
div.bigstars .rateit-range {
|
176 |
-
/*White*/
|
177 |
-
background: url($stars_32) left 0px !important;
|
178 |
-
}
|
179 |
-
|
180 |
-
div.bigstars .rateit-hover{
|
181 |
-
/*red*/
|
182 |
-
background: url($stars_32) left -37px !important;
|
183 |
-
}
|
184 |
-
|
185 |
-
div.bigstars .rateit-selected
|
186 |
-
{
|
187 |
-
/*Gold*/
|
188 |
-
background: url($stars_32) left -74px !important;
|
189 |
-
}
|
190 |
-
|
191 |
";
|
192 |
|
193 |
wp_add_inline_style( 'yasrcss', $yasr_st_css );
|
@@ -204,6 +156,13 @@ function yasr_css_stars_set() {
|
|
204 |
load_plugin_textdomain('yet-another-stars-rating', FALSE, YASR_LANG_DIR);
|
205 |
}
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
|
208 |
/****** Create a new Page in Administration Menu ******/
|
209 |
|
@@ -796,21 +755,15 @@ function yasr_stars_size ($size) {
|
|
796 |
$stars_attribute = array();
|
797 |
|
798 |
if ($size === 'small') {
|
799 |
-
|
800 |
-
$stars_attribute['class'] = 'rateit yasr_visitor_votes_stars_div';
|
801 |
$stars_attribute['px_size'] = '16';
|
802 |
}
|
803 |
|
804 |
elseif ($size === 'medium') {
|
805 |
-
|
806 |
-
$stars_attribute['class'] = 'rateit medium yasr_visitor_votes_stars_div';
|
807 |
$stars_attribute['px_size'] = '24';
|
808 |
}
|
809 |
|
810 |
//default values
|
811 |
else {
|
812 |
-
|
813 |
-
$stars_attribute['class'] = 'rateit bigstars yasr_visitor_votes_stars_div';
|
814 |
$stars_attribute['px_size'] = '32';
|
815 |
}
|
816 |
|
@@ -886,13 +839,10 @@ function yasr_get_ip() {
|
|
886 |
if (YASR_ENABLE_IP === 'yes') {
|
887 |
|
888 |
$ip = null;
|
889 |
-
|
890 |
$ip = apply_filters( 'yasr_filter_ip', $ip );
|
891 |
|
892 |
if ( isset( $ip ) ) {
|
893 |
-
|
894 |
return $ip;
|
895 |
-
|
896 |
}
|
897 |
|
898 |
|
@@ -926,9 +876,7 @@ function yasr_get_ip() {
|
|
926 |
}
|
927 |
|
928 |
else {
|
929 |
-
|
930 |
return ('X.X.X.X');
|
931 |
-
|
932 |
}
|
933 |
|
934 |
|
@@ -974,4 +922,18 @@ function yasr_unique_multidim_array($array, $key) {
|
|
974 |
|
975 |
}
|
976 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
977 |
?>
|
29 |
function yasr_add_scripts () {
|
30 |
|
31 |
wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', FALSE, NULL, 'all' );
|
|
|
32 |
wp_enqueue_style( 'dashicons' ); //dashicons
|
33 |
|
34 |
//Run after default css are loaded
|
47 |
wp_add_inline_style( 'yasrcss', YASR_CUSTOM_CSS_RULES );
|
48 |
}
|
49 |
|
|
|
|
|
50 |
//From version 1.7.4, always load rater
|
51 |
wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js.js' , '', '0.6.0', TRUE );
|
52 |
|
53 |
+
wp_enqueue_script( 'yasrfront', YASR_JS_DIR . 'yasr-front.js' , array('jquery', 'rater'), '1.0.0', TRUE );
|
54 |
|
55 |
wp_enqueue_script('tippy', YASR_JS_DIR . 'tippy.all.min.js', '', '3.2.0', TRUE );
|
56 |
|
57 |
do_action('yasr_add_front_script_js');
|
58 |
|
59 |
+
$yasr_visitor_votes_loader = '<div id="loader-visitor-rating" style="display: inline"> ' . ' <img src=' . YASR_IMG_DIR . 'loader.gif title="yasr-loader" alt="yasr-loader"></div>';
|
60 |
|
61 |
$tooltip_values = __("bad, poor, ok, good, super", 'yet-another-stars-rating');
|
62 |
$tooltip_values_exploded = explode(", ", $tooltip_values);
|
69 |
'visitorStatsEnabled' => YASR_VISITORS_STATS,
|
70 |
'tooltipValues' => $tooltip_values_exploded,
|
71 |
'loaderHtml' => $yasr_visitor_votes_loader,
|
|
|
72 |
)
|
73 |
);
|
74 |
|
84 |
do_action('yasr_add_admin_scripts_begin');
|
85 |
|
86 |
wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr-admin.css', FALSE, NULL, 'all' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
+
wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js.js' , '', '0.6.0', TRUE );
|
89 |
wp_enqueue_script( 'yasradmin', YASR_JS_DIR . 'yasr-admin.js' , array('jquery'), '1.0.00', TRUE );
|
90 |
|
91 |
//this is for tinymce
|
93 |
|
94 |
do_action('yasr_add_admin_scripts_end' );
|
95 |
|
96 |
+
$yasr_loader = YASR_IMG_DIR . 'loader.gif';
|
97 |
+
|
98 |
+
wp_localize_script ('yasradmin', 'yasrCommonDataAdmin',
|
99 |
+
array(
|
100 |
+
'loaderHtml' => $yasr_loader
|
101 |
+
)
|
102 |
+
);
|
103 |
+
|
104 |
}
|
105 |
|
106 |
|
116 |
|
117 |
function yasr_css_stars_set() {
|
118 |
|
119 |
+
//if star selected is "rater", select the images
|
120 |
+
if (YASR_STARS_SET === 'rater') {
|
121 |
|
122 |
+
$star_grey = YASR_IMG_DIR . 'star_0.svg';
|
123 |
+
$star_yellow = YASR_IMG_DIR . 'star_1.svg';
|
|
|
124 |
|
125 |
}
|
126 |
|
127 |
+
//by default, use the one provided by Yasr
|
128 |
else {
|
129 |
|
130 |
+
$star_grey = YASR_IMG_DIR . 'star_2.svg';
|
131 |
+
$star_yellow = YASR_IMG_DIR . 'star_3.svg';
|
|
|
132 |
|
133 |
}
|
134 |
|
135 |
|
136 |
$yasr_st_css = "
|
137 |
+
.star-rating {
|
138 |
+
background-image: url(\"$star_grey\");
|
139 |
+
}
|
140 |
+
.star-rating .star-value {
|
141 |
+
background: url(\"$star_yellow\") ;
|
142 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
";
|
144 |
|
145 |
wp_add_inline_style( 'yasrcss', $yasr_st_css );
|
156 |
load_plugin_textdomain('yet-another-stars-rating', FALSE, YASR_LANG_DIR);
|
157 |
}
|
158 |
|
159 |
+
/****** Translating YASR PRO ******/
|
160 |
+
add_action('plugins_loaded', 'yasr_pro_translate_option', 1);
|
161 |
+
|
162 |
+
function yasr_pro_translate_option() {
|
163 |
+
load_plugin_textdomain('yasr-pro', FALSE, basename( dirname( __FILE__ ) ) . '/languages');
|
164 |
+
}
|
165 |
+
|
166 |
|
167 |
/****** Create a new Page in Administration Menu ******/
|
168 |
|
755 |
$stars_attribute = array();
|
756 |
|
757 |
if ($size === 'small') {
|
|
|
|
|
758 |
$stars_attribute['px_size'] = '16';
|
759 |
}
|
760 |
|
761 |
elseif ($size === 'medium') {
|
|
|
|
|
762 |
$stars_attribute['px_size'] = '24';
|
763 |
}
|
764 |
|
765 |
//default values
|
766 |
else {
|
|
|
|
|
767 |
$stars_attribute['px_size'] = '32';
|
768 |
}
|
769 |
|
839 |
if (YASR_ENABLE_IP === 'yes') {
|
840 |
|
841 |
$ip = null;
|
|
|
842 |
$ip = apply_filters( 'yasr_filter_ip', $ip );
|
843 |
|
844 |
if ( isset( $ip ) ) {
|
|
|
845 |
return $ip;
|
|
|
846 |
}
|
847 |
|
848 |
|
876 |
}
|
877 |
|
878 |
else {
|
|
|
879 |
return ('X.X.X.X');
|
|
|
880 |
}
|
881 |
|
882 |
|
922 |
|
923 |
}
|
924 |
|
925 |
+
|
926 |
+
//Delete caches for wp_super_Cache and wp_rocket
|
927 |
+
add_action('yasr_action_on_visitor_vote', 'yasr_delete_cache' );
|
928 |
+
add_action('yasr_action_on_update_visitor_vote', 'yasr_delete_cache');
|
929 |
+
|
930 |
+
|
931 |
+
function yasr_delete_cache($post_id) {
|
932 |
+
|
933 |
+
yasr_wp_super_cache_support($post_id);
|
934 |
+
yasr_wp_rocket_support($post_id);
|
935 |
+
yasr_litespeed_cache_support($post_id);
|
936 |
+
|
937 |
+
}
|
938 |
+
|
939 |
?>
|
lib/yasr-settings-functions.php
DELETED
@@ -1,1829 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
|
5 |
-
Copyright 2014 Dario Curvino (email : d.curvino@tiscali.it)
|
6 |
-
|
7 |
-
This program is free software: you can redistribute it and/or modify
|
8 |
-
it under the terms of the GNU General Public License as published by
|
9 |
-
the Free Software Foundation, either version 2 of the License, or
|
10 |
-
(at your option) any later version.
|
11 |
-
|
12 |
-
This program is distributed in the hope that it will be useful,
|
13 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
-
GNU General Public License for more details.
|
16 |
-
|
17 |
-
You should have received a copy of the GNU General Public License
|
18 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>
|
19 |
-
*/
|
20 |
-
|
21 |
-
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
|
22 |
-
|
23 |
-
function yasr_settings_tabs($active_tab) {
|
24 |
-
|
25 |
-
?>
|
26 |
-
|
27 |
-
<h2 class="nav-tab-wrapper yasr-no-underline">
|
28 |
-
|
29 |
-
<a href="?page=yasr_settings_page&tab=general_settings" class="nav-tab <?php if ($active_tab == 'general_settings') echo 'nav-tab-active'; ?>" > <?php _e("General Settings", 'yet-another-stars-rating'); ?> </a>
|
30 |
-
<a href="?page=yasr_settings_page&tab=manage_multi" class="nav-tab <?php if ($active_tab == 'manage_multi') echo 'nav-tab-active'; ?>" > <?php _e("Multi Sets", 'yet-another-stars-rating'); ?> </a>
|
31 |
-
<a href="?page=yasr_settings_page&tab=style_options" class="nav-tab <?php if ($active_tab == 'style_options') echo 'nav-tab-active'; ?>" > <?php _e("Aspect & Styles", 'yet-another-stars-rating'); ?> </a>
|
32 |
-
<?php do_action( 'yasr_add_settings_tab', $active_tab ); ?>
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
</h2>
|
37 |
-
|
38 |
-
<?php
|
39 |
-
}
|
40 |
-
|
41 |
-
/************ Add yasr general options ***********/
|
42 |
-
|
43 |
-
add_action( 'admin_init', 'yasr_general_options_init' ); //This is for general options
|
44 |
-
|
45 |
-
function yasr_general_options_init() {
|
46 |
-
|
47 |
-
register_setting(
|
48 |
-
'yasr_general_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
|
49 |
-
'yasr_general_options', //The name of an option to sanitize and save.
|
50 |
-
'yasr_general_options_sanitize'
|
51 |
-
);
|
52 |
-
|
53 |
-
$option = get_option( 'yasr_general_options' );
|
54 |
-
|
55 |
-
//This is to avoid undefined offset
|
56 |
-
if ($option && $option['auto_insert_enabled']==0) {
|
57 |
-
$option['auto_insert_what'] = 'overall_rating';
|
58 |
-
$option['auto_insert_where'] = 'top';
|
59 |
-
$option['auto_insert_exclude_pages'] = 'yes';
|
60 |
-
$option['auto_insert_size'] = 'large';
|
61 |
-
$option['auto_insert_custom_post_only'] = 'no';
|
62 |
-
}
|
63 |
-
|
64 |
-
//This is to avoid undefined offset
|
65 |
-
if ($option && $option['text_before_stars']==0) {
|
66 |
-
$option['text_before_overall'] = '';
|
67 |
-
$option['text_before_visitor_rating'] = '';
|
68 |
-
$option['text_after_visitor_rating'] = '';
|
69 |
-
$option['custom_text_user_voted'] = '';
|
70 |
-
}
|
71 |
-
|
72 |
-
//if it's not blogposting avoid undefined variable
|
73 |
-
if (!isset($option['blogposting_organization_name'])) {
|
74 |
-
|
75 |
-
$option['blogposting_organization_name'] = get_bloginfo('name');
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
if (!isset($option['blogposting_organization_logo'])) {
|
80 |
-
|
81 |
-
$option['blogposting_organization_logo'] = get_site_icon_url();
|
82 |
-
|
83 |
-
}
|
84 |
-
|
85 |
-
if(!isset($option['disable_jquery'])) {
|
86 |
-
|
87 |
-
$option['disable_jquery'] = 'no';
|
88 |
-
|
89 |
-
}
|
90 |
-
|
91 |
-
|
92 |
-
add_settings_section( 'yasr_general_options_section_id', __('General settings', 'yet-another-stars-rating'), 'yasr_section_callback', 'yasr_general_settings_tab' );
|
93 |
-
add_settings_field( 'yasr_use_auto_insert_id', __('Auto insert options', 'yet-another-stars-rating'), 'yasr_auto_insert_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
94 |
-
add_settings_field( 'yasr_show_overall_in_loop', __('Show "Overall Rating" in Archive Page?', 'yet-another-stars-rating'), 'yasr_show_overall_in_loop_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
95 |
-
add_settings_field( 'yasr_show_visitor_votes_in_loop', __('Show "Visitor Votes" in Archive Page?', 'yet-another-stars-rating'), 'yasr_show_visitor_votes_in_loop_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
96 |
-
add_settings_field( 'yasr_custom_text', __('Insert custom text to show before / after stars', 'yet-another-stars-rating'), 'yasr_custom_text_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
97 |
-
add_settings_field( 'yasr_visitors_stats', __('Do you want show stats for visitors votes?', 'yet-another-stars-rating'), 'yasr_visitors_stats_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
98 |
-
add_settings_field( 'yasr_allow_only_logged_in_id', __('Allow only logged in user to vote?', 'yet-another-stars-rating'), 'yasr_allow_only_logged_in_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
99 |
-
add_settings_field( 'yasr_enable_ip', __('Do you want to save ip address?', 'yet-another-stars-rating'), 'yasr_enable_ip_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option);
|
100 |
-
add_settings_field( 'yasr_choose_snippet_id', __('Rich snippet options', 'yet-another-stars-rating'), 'yasr_choose_snippet_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
101 |
-
add_settings_field( 'yasr_choose_overall_rating_method', __('How do you want to rate "Overall Rating"?', 'yet-another-stars-rating'), 'yasr_choose_overall_rating_method_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
102 |
-
add_settings_field( 'yasr_rater', __('Do you want disable jQuery?', 'yet-another-stars-rating'), 'yasr_rater_callback', 'yasr_general_settings_tab', 'yasr_general_options_section_id', $option );
|
103 |
-
|
104 |
-
}
|
105 |
-
|
106 |
-
|
107 |
-
function yasr_section_callback() {
|
108 |
-
//_e('Manage auto insert', 'yet-another-stars-rating');
|
109 |
-
}
|
110 |
-
|
111 |
-
function yasr_auto_insert_callback($option) {
|
112 |
-
|
113 |
-
?>
|
114 |
-
|
115 |
-
<strong><?php _e('Use Auto Insert?', 'yet-another-stars-rating'); ?></strong>
|
116 |
-
|
117 |
-
|
118 |
-
<div class="yasr-onoffswitch-big">
|
119 |
-
<input type="checkbox" name="yasr_general_options[auto_insert_enabled]" class="yasr-onoffswitch-checkbox" value="1" id="yasr_auto_insert_switch" <?php if ($option['auto_insert_enabled']==1) echo " checked='checked' "; ?> >
|
120 |
-
<label class="yasr-onoffswitch-label" for="yasr_auto_insert_switch">
|
121 |
-
<span class="yasr-onoffswitch-inner"></span>
|
122 |
-
<span class="yasr-onoffswitch-switch"></span>
|
123 |
-
</label>
|
124 |
-
</div>
|
125 |
-
|
126 |
-
<p> </p>
|
127 |
-
|
128 |
-
<strong><?php _e('What?', 'yet-another-stars-rating'); ?></strong>
|
129 |
-
|
130 |
-
<div class="yasr-indented-answer">
|
131 |
-
|
132 |
-
<input type="radio" name="yasr_general_options[auto_insert_what]" value="overall_rating" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_what']==='overall_rating') echo " checked=\"checked\" "; ?> >
|
133 |
-
<?php _e('Overall Rating / Author Rating', 'yet-another-stars-rating') ?>
|
134 |
-
<br />
|
135 |
-
|
136 |
-
<input type="radio" name="yasr_general_options[auto_insert_what]" value="visitor_rating" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_what']==='visitor_rating') echo " checked=\"checked\" "; ?> >
|
137 |
-
<?php _e('Visitor Votes', 'yet-another-stars-rating')?>
|
138 |
-
<br />
|
139 |
-
|
140 |
-
<input type="radio" name="yasr_general_options[auto_insert_what]" value="both" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_what']==='both') echo " checked=\"checked\" "; ?> >
|
141 |
-
<?php _e('Both', 'yet-another-stars-rating')?>
|
142 |
-
|
143 |
-
<p> </p>
|
144 |
-
|
145 |
-
</div>
|
146 |
-
|
147 |
-
<strong><?php _e('Where?', 'yet-another-stars-rating'); ?></strong>
|
148 |
-
|
149 |
-
<div class="yasr-indented-answer">
|
150 |
-
|
151 |
-
<input type="radio" name="yasr_general_options[auto_insert_where]" value="top" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_where']==='top' ) echo " checked=\"checked\" "; ?> >
|
152 |
-
<?php _e('Before the post', 'yet-another-stars-rating')?>
|
153 |
-
<br />
|
154 |
-
|
155 |
-
<input type="radio" name="yasr_general_options[auto_insert_where]" value="bottom" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_where']==='bottom') echo " checked=\"checked\" "; ?> >
|
156 |
-
<?php _e('After the post', 'yet-another-stars-rating')?>
|
157 |
-
<br />
|
158 |
-
|
159 |
-
<p> </p>
|
160 |
-
|
161 |
-
</div>
|
162 |
-
|
163 |
-
<strong><?php _e('Size', 'yet-another-stars-rating'); ?></strong>
|
164 |
-
|
165 |
-
<div class="yasr-indented-answer">
|
166 |
-
|
167 |
-
<div class="yasr-option-size">
|
168 |
-
<input type="radio" name="yasr_general_options[auto_insert_size]" value="small" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_size']==='small' ) echo " checked=\"checked\" "; ?> >
|
169 |
-
<img src="<?php echo YASR_IMG_DIR . "yasr-stars-small.png" ?>" class="yasr-img-option-size"><span class="yasr-text-options-size"><?php _e('Small', 'yet-another-stars-rating')?></span>
|
170 |
-
</div>
|
171 |
-
|
172 |
-
<div class="yasr-option-size">
|
173 |
-
<input type="radio" name="yasr_general_options[auto_insert_size]" value="medium" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_size']==='medium' ) echo " checked=\"checked\" "; ?> >
|
174 |
-
<img src="<?php echo YASR_IMG_DIR . "yasr-stars-medium.png" ?>" class="yasr-img-option-size"><span class="yasr-text-options-size"><?php _e('Medium', 'yet-another-stars-rating')?></span>
|
175 |
-
</div>
|
176 |
-
|
177 |
-
<div class="yasr-option-size">
|
178 |
-
<input type="radio" name="yasr_general_options[auto_insert_size]" value="large" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_size']==='large' ) echo " checked=\"checked\" "; ?> >
|
179 |
-
<img src="<?php echo YASR_IMG_DIR . "yasr-stars-large.png" ?>" class="yasr-img-option-size"><span class="yasr-text-options-size"><?php _e('Large', 'yet-another-stars-rating')?></span>
|
180 |
-
</div>
|
181 |
-
|
182 |
-
<p> </p>
|
183 |
-
|
184 |
-
</div>
|
185 |
-
|
186 |
-
<strong><?php _e('Exclude Pages?', 'yet-another-stars-rating'); ?></strong>
|
187 |
-
|
188 |
-
<div class="yasr-indented-answer">
|
189 |
-
<input type="radio" name="yasr_general_options[auto_insert_exclude_pages]" value="yes" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_exclude_pages']==='yes' ) echo " checked=\"checked\" "; ?> >
|
190 |
-
<?php _e('Yes', 'yet-another-stars-rating'); ?>
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
<input type="radio" name="yasr_general_options[auto_insert_exclude_pages]" value="no" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_exclude_pages']==='no') echo " checked=\"checked\" "; ?> >
|
195 |
-
<?php _e('No', 'yet-another-stars-rating'); ?>
|
196 |
-
<br />
|
197 |
-
|
198 |
-
<p> </p>
|
199 |
-
|
200 |
-
</div>
|
201 |
-
|
202 |
-
<?php
|
203 |
-
|
204 |
-
$custom_post_types = yasr_get_custom_post_type('bool');
|
205 |
-
|
206 |
-
if ($custom_post_types) { ?>
|
207 |
-
<strong><?php _e('Use only in custom post types?', 'yet-another-stars-rating'); ?></strong>
|
208 |
-
<div class="yasr-indented-answer">
|
209 |
-
<input type="radio" name="yasr_general_options[auto_insert_custom_post_only]" value="yes" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_custom_post_only']==='yes' ) echo " checked=\"checked\" "; ?> >
|
210 |
-
<?php _e('Yes', 'yet-another-stars-rating'); ?>
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
<input type="radio" name="yasr_general_options[auto_insert_custom_post_only]" value="no" class="yasr-auto-insert-options-class" <?php if ($option['auto_insert_custom_post_only']==='no') echo " checked=\"checked\" "; ?> >
|
215 |
-
<?php _e('No', 'yet-another-stars-rating'); ?>
|
216 |
-
|
217 |
-
<p>
|
218 |
-
|
219 |
-
<?php _e("You see this because you use custom post types.", 'yet-another-stars-rating'); ?>
|
220 |
-
<br/>
|
221 |
-
<?php _e("If you want to use auto insert only in custom post types, choose Yes", 'yet-another-stars-rating'); ?>
|
222 |
-
|
223 |
-
<p> </p>
|
224 |
-
|
225 |
-
</div>
|
226 |
-
|
227 |
-
<?php
|
228 |
-
}
|
229 |
-
|
230 |
-
else {
|
231 |
-
|
232 |
-
?>
|
233 |
-
|
234 |
-
<input type="hidden" name="yasr_general_options[auto_insert_custom_post_only]" value="no" ?>
|
235 |
-
|
236 |
-
<?php
|
237 |
-
|
238 |
-
}
|
239 |
-
|
240 |
-
?>
|
241 |
-
|
242 |
-
|
243 |
-
<?php
|
244 |
-
|
245 |
-
submit_button( __('Save Settings') );
|
246 |
-
|
247 |
-
|
248 |
-
} //End yasr_auto_insert_callback
|
249 |
-
|
250 |
-
|
251 |
-
function yasr_show_overall_in_loop_callback($option) {
|
252 |
-
|
253 |
-
?>
|
254 |
-
|
255 |
-
<div class="yasr-onoffswitch-big">
|
256 |
-
<input type="checkbox" name="yasr_general_options[show_overall_in_loop]" class="yasr-onoffswitch-checkbox" id="yasr-show-overall-in-loop-switch" <?php if ($option['show_overall_in_loop']==='enabled') echo " checked='checked' "; ?> >
|
257 |
-
<label class="yasr-onoffswitch-label" for="yasr-show-overall-in-loop-switch">
|
258 |
-
<span class="yasr-onoffswitch-inner"></span>
|
259 |
-
<span class="yasr-onoffswitch-switch"></span>
|
260 |
-
</label>
|
261 |
-
</div>
|
262 |
-
|
263 |
-
<br />
|
264 |
-
<br />
|
265 |
-
|
266 |
-
<?php _e('If you enable this, "Overall Rating" will be showed not only in the single article or page, but also in pages like Home Page, category pages or archives.', 'yet-another-stars-rating')?>
|
267 |
-
|
268 |
-
<p> </p>
|
269 |
-
|
270 |
-
<br />
|
271 |
-
|
272 |
-
<hr>
|
273 |
-
|
274 |
-
<?php
|
275 |
-
|
276 |
-
}
|
277 |
-
|
278 |
-
function yasr_show_visitor_votes_in_loop_callback ($option) {
|
279 |
-
|
280 |
-
?>
|
281 |
-
|
282 |
-
<div class="yasr-onoffswitch-big">
|
283 |
-
<input type="checkbox" name="yasr_general_options[show_visitor_votes_in_loop]" class="yasr-onoffswitch-checkbox" id="yasr-show-visitor-votes-in-loop-switch" <?php if ($option['show_visitor_votes_in_loop']==='enabled') echo " checked='checked' "; ?> >
|
284 |
-
<label class="yasr-onoffswitch-label" for="yasr-show-visitor-votes-in-loop-switch">
|
285 |
-
<span class="yasr-onoffswitch-inner"></span>
|
286 |
-
<span class="yasr-onoffswitch-switch"></span>
|
287 |
-
</label>
|
288 |
-
</div>
|
289 |
-
|
290 |
-
<br />
|
291 |
-
<br />
|
292 |
-
|
293 |
-
<?php _e('If you enable this, "Visitor Votes" will be showed not only in the single article or page, but also in pages like Home Page, category pages or archives.', 'yet-another-stars-rating')?>
|
294 |
-
|
295 |
-
<p> </p>
|
296 |
-
|
297 |
-
<br />
|
298 |
-
|
299 |
-
<hr>
|
300 |
-
|
301 |
-
<?php
|
302 |
-
|
303 |
-
}
|
304 |
-
|
305 |
-
function yasr_custom_text_callback($option) {
|
306 |
-
|
307 |
-
$text_before_overall = htmlspecialchars("$option[text_before_overall]");
|
308 |
-
|
309 |
-
$text_before_visitor_rating = htmlspecialchars("$option[text_before_visitor_rating]");
|
310 |
-
|
311 |
-
$text_after_visitor_rating = htmlspecialchars("$option[text_after_visitor_rating]");
|
312 |
-
|
313 |
-
$custom_text_user_votes = htmlentities("$option[custom_text_user_voted]");
|
314 |
-
|
315 |
-
?>
|
316 |
-
|
317 |
-
<div class="yasr-onoffswitch-big">
|
318 |
-
<input type="checkbox" name="yasr_general_options[text_before_stars]" class="yasr-onoffswitch-checkbox" id="yasr-general-options-text-before-stars-switch" <?php if ($option['text_before_stars']==1) echo " checked='checked' "; ?> >
|
319 |
-
<label class="yasr-onoffswitch-label" for="yasr-general-options-text-before-stars-switch">
|
320 |
-
<span class="yasr-onoffswitch-inner"></span>
|
321 |
-
<span class="yasr-onoffswitch-switch"></span>
|
322 |
-
</label>
|
323 |
-
</div>
|
324 |
-
|
325 |
-
<br /> <br />
|
326 |
-
|
327 |
-
<input type='text' name='yasr_general_options[text_before_overall]' id="yasr-general-options-custom-text-before-overall" class='yasr-general-options-text-before' <?php printf('value="%s"', $text_before_overall); ?> maxlength="40"/>
|
328 |
-
<?php _e('Custom text to display before Overall Rating', 'yet-another-stars-rating')?>
|
329 |
-
|
330 |
-
<br /> <br /> <br />
|
331 |
-
|
332 |
-
<input type='text' name='yasr_general_options[text_before_visitor_rating]' id="yasr-general-options-custom-text-before-visitor" class='yasr-general-options-text-before' <?php printf('value="%s"', $text_before_visitor_rating); ?> maxlength="80"/>
|
333 |
-
<?php _e('Custom text to display BEFORE Visitor Rating', 'yet-another-stars-rating')?>
|
334 |
-
|
335 |
-
<br /> <br />
|
336 |
-
|
337 |
-
|
338 |
-
<input type='text' name='yasr_general_options[text_after_visitor_rating]' id="yasr-general-options-custom-text-after-visitor" class='yasr-general-options-text-before' <?php printf('value="%s"', $text_after_visitor_rating); ?> maxlength="80"/>
|
339 |
-
<?php _e('Custom text to display AFTER Visitor Rating', 'yet-another-stars-rating')?>
|
340 |
-
|
341 |
-
<br /> <br /> <br />
|
342 |
-
|
343 |
-
<input type='text' name='yasr_general_options[custom_text_user_voted]' id="yasr-general-options-custom-text-already-rated" class='yasr-general-options-text-before' <?php printf('value="%s"', $custom_text_user_votes); ?> maxlength="60"/>
|
344 |
-
<?php _e('Custom text to display when a non logged user has already rated', 'yet-another-stars-rating')?>
|
345 |
-
|
346 |
-
|
347 |
-
<br /> <br />
|
348 |
-
|
349 |
-
<a href="#" id="yasr-doc-custom-text-link"><?php _e('Help', 'yet-another-stars-rating'); ?></a>
|
350 |
-
|
351 |
-
<div id="yasr-doc-custom-text-div" class="yasr-help-box-settings">
|
352 |
-
|
353 |
-
<?php _e('In the first field you can use %overall_rating% pattern to show the overall rating.', 'yet-another-stars-rating');?>
|
354 |
-
|
355 |
-
<br /> <br />
|
356 |
-
|
357 |
-
<?php _e('In the Second and Third fields you can use %total_count% pattern to show the total count, and %average% pattern to show the average', 'yet-another-stars-rating');?>
|
358 |
-
|
359 |
-
</div>
|
360 |
-
|
361 |
-
<p> </p>
|
362 |
-
|
363 |
-
<?php
|
364 |
-
|
365 |
-
submit_button( __('Save Settings') );
|
366 |
-
|
367 |
-
}
|
368 |
-
|
369 |
-
function yasr_visitors_stats_callback($option) {
|
370 |
-
|
371 |
-
?>
|
372 |
-
|
373 |
-
<div class="yasr-onoffswitch-big">
|
374 |
-
<input type="checkbox" name="yasr_general_options[visitors_stats]" class="yasr-onoffswitch-checkbox" id="yasr-general-options-visitors-stats-switch" <?php if ($option['visitors_stats']==='yes') echo " checked='checked' "; ?> >
|
375 |
-
<label class="yasr-onoffswitch-label" for="yasr-general-options-visitors-stats-switch">
|
376 |
-
<span class="yasr-onoffswitch-inner"></span>
|
377 |
-
<span class="yasr-onoffswitch-switch"></span>
|
378 |
-
</label>
|
379 |
-
</div>
|
380 |
-
|
381 |
-
<br />
|
382 |
-
|
383 |
-
<br />
|
384 |
-
|
385 |
-
<p> </p>
|
386 |
-
|
387 |
-
<hr>
|
388 |
-
|
389 |
-
<?php
|
390 |
-
|
391 |
-
}
|
392 |
-
|
393 |
-
function yasr_allow_only_logged_in_callback($option) {
|
394 |
-
|
395 |
-
?>
|
396 |
-
|
397 |
-
<input type='radio' name='yasr_general_options[allowed_user]' value='logged_only' class='yasr_auto_insert_loggedonly' <?php if ($option['allowed_user']==='logged_only') echo " checked=\"checked\" "; ?> />
|
398 |
-
<?php _e('Allow only logged-in users', 'yet-another-stars-rating')?>
|
399 |
-
<br />
|
400 |
-
|
401 |
-
<input type='radio' name='yasr_general_options[allowed_user]' value='allow_anonymous' class='yasr_auto_insert_loggedonly' <?php if ($option['allowed_user']==='allow_anonymous') echo " checked=\"checked\" "; ?> />
|
402 |
-
<?php _e('Allow everybody (logged in and anonymous)', 'yet-another-stars-rating')?>
|
403 |
-
<br />
|
404 |
-
|
405 |
-
<p> </p>
|
406 |
-
|
407 |
-
<hr>
|
408 |
-
|
409 |
-
<?php
|
410 |
-
|
411 |
-
} //End function
|
412 |
-
|
413 |
-
function yasr_enable_ip_callback($option) {
|
414 |
-
|
415 |
-
?>
|
416 |
-
|
417 |
-
|
418 |
-
<div class="yasr-onoffswitch-big">
|
419 |
-
<input type="checkbox" name="yasr_general_options[enable_ip]" class="yasr-onoffswitch-checkbox" id="yasr-general-options-enable-ip-switch" <?php if ($option['enable_ip']==='yes') echo " checked='checked' "; ?> >
|
420 |
-
<label class="yasr-onoffswitch-label" for="yasr-general-options-enable-ip-switch">
|
421 |
-
<span class="yasr-onoffswitch-inner"></span>
|
422 |
-
<span class="yasr-onoffswitch-switch"></span>
|
423 |
-
</label>
|
424 |
-
</div>
|
425 |
-
|
426 |
-
<br />
|
427 |
-
|
428 |
-
<?php
|
429 |
-
|
430 |
-
$string = sprintf(__('Please note that to comply with the %s EU law, you must warn your users that you\'re storing their ip', 'yet-another-stars-rating'), '<a href="https://en.wikipedia.org/wiki/General_Data_Protection_Regulation">GDPR</a>');
|
431 |
-
|
432 |
-
echo $string;
|
433 |
-
|
434 |
-
?>
|
435 |
-
|
436 |
-
<br />
|
437 |
-
|
438 |
-
<hr>
|
439 |
-
|
440 |
-
<?php
|
441 |
-
|
442 |
-
} //End function
|
443 |
-
|
444 |
-
function yasr_choose_snippet_callback($option) {
|
445 |
-
|
446 |
-
$blogposting_organization_name = htmlspecialchars("$option[blogposting_organization_name]");
|
447 |
-
|
448 |
-
$blogposting_organization_logo = htmlspecialchars("$option[blogposting_organization_logo]");
|
449 |
-
|
450 |
-
?>
|
451 |
-
|
452 |
-
<strong><?php _e('Which rich snippet do you want to use?', 'yet-another-stars-rating'); ?></strong>
|
453 |
-
|
454 |
-
<div class="yasr-indented-answer">
|
455 |
-
<input type="radio" name="yasr_general_options[snippet]" value="overall_rating" class="yasr_choose_snippet" <?php if ($option['snippet']==='overall_rating') echo " checked=\"checked\" "; ?> >
|
456 |
-
<?php _e('Review Rating', 'yet-another-stars-rating') ?>
|
457 |
-
<br />
|
458 |
-
|
459 |
-
<input type="radio" name="yasr_general_options[snippet]" value="visitor_rating" class="yasr_choose_snippet" <?php if ($option['snippet']==='visitor_rating') echo " checked=\"checked\" "; ?> >
|
460 |
-
<?php _e('Aggregate Rating', 'yet-another-stars-rating')?>
|
461 |
-
<br />
|
462 |
-
|
463 |
-
<p> </p>
|
464 |
-
|
465 |
-
<a href="#" id="yasr-snippet-explained-link"><?php _e("What is this?", 'yet-another-stars-rating') ?></a>
|
466 |
-
|
467 |
-
<div id="yasr-snippet-explained" class="yasr-help-box-settings">
|
468 |
-
<?php
|
469 |
-
|
470 |
-
_e("If you select \"Review Rating\", your site will be indexed from search engines like this: ", 'yet-another-stars-rating');
|
471 |
-
echo "<br /><br /><img src=" . YASR_IMG_DIR . "yasr_review.png>";
|
472 |
-
|
473 |
-
echo "<br /> <br />";
|
474 |
-
|
475 |
-
_e("If, instead, you choose \"Aggregate Rating\", your site will be indexed like this", 'yet-another-stars-rating');
|
476 |
-
echo "<br /><br /><img src=" . YASR_IMG_DIR . "yasr_aggregate.jpg>";
|
477 |
-
?>
|
478 |
-
</div>
|
479 |
-
|
480 |
-
</div>
|
481 |
-
|
482 |
-
<br />
|
483 |
-
|
484 |
-
<br />
|
485 |
-
|
486 |
-
<strong><?php _e('Select default item type for all post or pages', 'yet-another-stars-rating'); ?></strong>
|
487 |
-
|
488 |
-
<div class="yasr-indented-answer" id="yasr-choose-snippet-type">
|
489 |
-
|
490 |
-
<input type="radio" name="yasr_general_options[snippet_itemtype]" value="Product" class="yasr_choose_snippet" <?php if ($option['snippet_itemtype']==='Product') echo " checked=\"checked\" "; ?> >
|
491 |
-
<?php _e('Product', 'yet-another-stars-rating') ?>
|
492 |
-
<br />
|
493 |
-
|
494 |
-
<input type="radio" name="yasr_general_options[snippet_itemtype]" value="Place" class="yasr_choose_snippet" <?php if ($option['snippet_itemtype']==='Place') echo " checked=\"checked\" "; ?> >
|
495 |
-
<?php _e('Place', 'yet-another-stars-rating')?>
|
496 |
-
<br />
|
497 |
-
|
498 |
-
<input type="radio" name="yasr_general_options[snippet_itemtype]" value="Recipe" class="yasr_choose_snippet" <?php if ($option['snippet_itemtype']==='Recipe') echo " checked=\"checked\" "; ?> >
|
499 |
-
<?php _e('Recipe', 'yet-another-stars-rating')?>
|
500 |
-
<br />
|
501 |
-
|
502 |
-
<input type="radio" name="yasr_general_options[snippet_itemtype]" value="Other" class="yasr_choose_snippet" id="yasr_choose_snippet_blogposting" <?php if ($option['snippet_itemtype']==='Other') echo " checked=\"checked\" "; ?> >
|
503 |
-
<?php _e('BlogPosting')?>
|
504 |
-
<br />
|
505 |
-
|
506 |
-
|
507 |
-
<div class="yasr-help-box-settings" id="yasr-blogPosting-additional-info" style="display:block">
|
508 |
-
|
509 |
-
<?php _e("If you need to use BlogPosting as item type, even for just one post or page, please fill these forms", "yet-another-stars-rating"); ?>
|
510 |
-
|
511 |
-
<br /> <br />
|
512 |
-
|
513 |
-
<input type='text' name='yasr_general_options[blogposting_organization_name]' id="yasr-general-options-blogposting-organization-name" class="yasr-blogPosting-additional-info-inputs" <?php printf('value="%s"', $blogposting_organization_name); ?> maxlength="180"/>
|
514 |
-
<?php _e('Publisher name (e.g. Google)', 'yet-another-stars-rating')?>
|
515 |
-
|
516 |
-
<br /> <br />
|
517 |
-
|
518 |
-
<input type='text' name='yasr_general_options[blogposting_organization_logo]' id="yasr-general-options-blogposting-organization-logo" class="yasr-blogPosting-additional-info-inputs" <?php printf('value="%s"', $blogposting_organization_logo); ?> maxlength="300"/>
|
519 |
-
<?php _e('Logo Url (if empty siteicon will be used instead)', 'yet-another-stars-rating')?>
|
520 |
-
|
521 |
-
</div>
|
522 |
-
|
523 |
-
|
524 |
-
<br />
|
525 |
-
|
526 |
-
<small><?php _e('You can always change it in the single post or page.', 'yet-another-stars-rating'); ?></small>
|
527 |
-
<br />
|
528 |
-
<small><?php _e('This will affect only the post/page where you didn\'t change manually the itemtype yet.', 'yet-another-stars-rating'); ?> </small>
|
529 |
-
|
530 |
-
<p> </p>
|
531 |
-
|
532 |
-
</div>
|
533 |
-
|
534 |
-
|
535 |
-
<p> </p>
|
536 |
-
|
537 |
-
<hr>
|
538 |
-
|
539 |
-
<?php
|
540 |
-
|
541 |
-
} //End function yasr_choose_snippet_callback
|
542 |
-
|
543 |
-
function yasr_choose_overall_rating_method_callback($option) {
|
544 |
-
|
545 |
-
?>
|
546 |
-
|
547 |
-
<input type="radio" name="yasr_general_options[metabox_overall_rating]" value="stars" class="yasr_choose_overall_rating_method" <?php if ($option['metabox_overall_rating']==='stars') echo " checked=\"checked\" "; ?> >
|
548 |
-
<?php _e('Stars', 'yet-another-stars-rating') ?>
|
549 |
-
<br />
|
550 |
-
|
551 |
-
<input type="radio" name="yasr_general_options[metabox_overall_rating]" value="numbers" class="yasr_choose_overall_rating_method" <?php if ($option['metabox_overall_rating']==='numbers') echo " checked=\"checked\" "; ?> >
|
552 |
-
<?php _e('Numbers', 'yet-another-stars-rating')?>
|
553 |
-
<br />
|
554 |
-
|
555 |
-
<p> </p>
|
556 |
-
|
557 |
-
<hr>
|
558 |
-
|
559 |
-
<?php
|
560 |
-
|
561 |
-
}
|
562 |
-
|
563 |
-
function yasr_rater_callback($option) {
|
564 |
-
|
565 |
-
?>
|
566 |
-
|
567 |
-
<div class="yasr-onoffswitch-big">
|
568 |
-
<input type="checkbox" name="yasr_general_options[disable_jquery]" class="yasr-onoffswitch-checkbox" id="yasr-general-options-disable-query" <?php if ($option['disable_jquery']==='yes') echo " checked='checked' "; ?> >
|
569 |
-
<label class="yasr-onoffswitch-label" for="yasr-general-options-disable-query">
|
570 |
-
<span class="yasr-onoffswitch-inner"></span>
|
571 |
-
<span class="yasr-onoffswitch-switch"></span>
|
572 |
-
</label>
|
573 |
-
</div>
|
574 |
-
|
575 |
-
<br />
|
576 |
-
|
577 |
-
<?php
|
578 |
-
|
579 |
-
$string = sprintf(__('If you disable jQuery, YASR will work on vanilla javascript. %s
|
580 |
-
Please note this feature is still in beta. %s
|
581 |
-
For now, this works with all shortcodes except yasr_visitor_multiset. %s
|
582 |
-
For Pro users, you will not able to change star set colors %s
|
583 |
-
Please report any bug %s', 'yet-another-stars-rating'),
|
584 |
-
'<br />', '<br />', '<br />', '<br />', '<a href="https://wordpress.org/plugins/yet-another-stars-rating/">here</a>');
|
585 |
-
|
586 |
-
echo $string;
|
587 |
-
|
588 |
-
}
|
589 |
-
|
590 |
-
|
591 |
-
function yasr_general_options_sanitize($option) {
|
592 |
-
|
593 |
-
//Array to return
|
594 |
-
$output = array();
|
595 |
-
|
596 |
-
|
597 |
-
// Loop through each of the incoming options
|
598 |
-
foreach( $option as $key => $value ) {
|
599 |
-
|
600 |
-
// Check to see if the current option has a value. If so, process it.
|
601 |
-
if( isset( $option[$key] ) ) {
|
602 |
-
|
603 |
-
// Strip all HTML and PHP tags and properly handle quoted strings
|
604 |
-
$output[$key] = strip_tags( stripslashes( $option[ $key ] ) );
|
605 |
-
|
606 |
-
if ($key=='blogposting_organization_logo') {
|
607 |
-
|
608 |
-
//if is not a valid url get_site_icon_url instead
|
609 |
-
if (filter_var($value, FILTER_VALIDATE_URL) === FALSE) {
|
610 |
-
$output[$key] = get_site_icon_url();
|
611 |
-
}
|
612 |
-
|
613 |
-
}
|
614 |
-
|
615 |
-
} // end if
|
616 |
-
|
617 |
-
} // end foreach
|
618 |
-
|
619 |
-
//if in array doesn't exists [auto_insert_enabled] key, create it and set to 0
|
620 |
-
if(!array_key_exists('auto_insert_enabled', $output)) {
|
621 |
-
|
622 |
-
$output['auto_insert_enabled'] = 0;
|
623 |
-
|
624 |
-
}
|
625 |
-
//if exists value must be 1
|
626 |
-
else {
|
627 |
-
|
628 |
-
$output['auto_insert_enabled'] = 1;
|
629 |
-
|
630 |
-
}
|
631 |
-
|
632 |
-
|
633 |
-
//Same as above but for [show_overall_in_loop] key
|
634 |
-
if(!array_key_exists('show_overall_in_loop', $output)) {
|
635 |
-
|
636 |
-
$output['show_overall_in_loop'] = 'disabled';
|
637 |
-
|
638 |
-
}
|
639 |
-
//if exists must be string 'enabled'
|
640 |
-
else {
|
641 |
-
|
642 |
-
$output['show_overall_in_loop'] = 'enabled';
|
643 |
-
|
644 |
-
}
|
645 |
-
|
646 |
-
|
647 |
-
//Same as above but for [show_visitor_votes_in_loop] key
|
648 |
-
if(!array_key_exists('show_visitor_votes_in_loop', $output)) {
|
649 |
-
|
650 |
-
$output['show_visitor_votes_in_loop'] = 'disabled';
|
651 |
-
|
652 |
-
}
|
653 |
-
//if exists must be string 'enabled'
|
654 |
-
else {
|
655 |
-
|
656 |
-
$output['show_visitor_votes_in_loop'] = 'enabled';
|
657 |
-
|
658 |
-
}
|
659 |
-
|
660 |
-
//Same as above but for text_before_stars key
|
661 |
-
if(!array_key_exists('text_before_stars', $output)) {
|
662 |
-
|
663 |
-
$output['text_before_stars'] = 0;
|
664 |
-
|
665 |
-
}
|
666 |
-
//if exists must be 1
|
667 |
-
else {
|
668 |
-
|
669 |
-
$output['text_before_stars'] = 1;
|
670 |
-
|
671 |
-
}
|
672 |
-
|
673 |
-
|
674 |
-
//Same as above but for visitors_stats key
|
675 |
-
if(!array_key_exists('visitors_stats', $output)) {
|
676 |
-
|
677 |
-
$output['visitors_stats'] = 'no';
|
678 |
-
|
679 |
-
}
|
680 |
-
//if exists must be string 'yes'
|
681 |
-
else {
|
682 |
-
|
683 |
-
$output['visitors_stats'] = 'yes';
|
684 |
-
|
685 |
-
}
|
686 |
-
|
687 |
-
//Same as above but for enable_ip key
|
688 |
-
if(!array_key_exists('enable_ip', $output)) {
|
689 |
-
|
690 |
-
$output['enable_ip'] = 'no';
|
691 |
-
|
692 |
-
}
|
693 |
-
//if exists must be string 'yes'
|
694 |
-
else {
|
695 |
-
|
696 |
-
$output['enable_ip'] = 'yes';
|
697 |
-
|
698 |
-
}
|
699 |
-
|
700 |
-
//Same as above but for enable_ip key
|
701 |
-
if(!array_key_exists('disable_jquery', $output)) {
|
702 |
-
|
703 |
-
$output['disable_jquery'] = 'no';
|
704 |
-
|
705 |
-
}
|
706 |
-
//if exists must be string 'yes'
|
707 |
-
else {
|
708 |
-
|
709 |
-
$output['disable_jquery'] = 'yes';
|
710 |
-
|
711 |
-
}
|
712 |
-
|
713 |
-
return $output;
|
714 |
-
|
715 |
-
}
|
716 |
-
|
717 |
-
|
718 |
-
/************ End Yasr General Settings ************/
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
/**************** Add yasr multiset options and settings ************/
|
723 |
-
|
724 |
-
add_action( 'admin_init', 'yasr_multiset_options_init' ); //This is for general options
|
725 |
-
|
726 |
-
function yasr_multiset_options_init() {
|
727 |
-
register_setting(
|
728 |
-
'yasr_multiset_options_group', // A settings group name. Must exist prior to the register_setting call. This must match the group name in settings_fields()
|
729 |
-
'yasr_multiset_options', //The name of an option to sanitize and save.
|
730 |
-
'yasr_sanitize_multiset_options'
|
731 |
-
);
|
732 |
-
|
733 |
-
$option_multiset = get_option( 'yasr_multiset_options' );
|
734 |
-
|
735 |
-
if ($option_multiset === FALSE) {
|
736 |
-
|
737 |
-
$option_multiset = array();
|
738 |
-
|
739 |
-
}
|
740 |
-
|
741 |
-
if (!isset($option_multiset['show_average'])) {
|
742 |
-
|
743 |
-
$option_multiset['show_average'] = 'yes';
|
744 |
-
|
745 |
-
}
|
746 |
-
|
747 |
-
add_settings_section( 'yasr_multiset_options_section_id', '', 'yasr_multiset_section_callback', 'yasr_multiset_tab' );
|
748 |
-
add_settings_field( 'yasr_multiset_hide_average_id', __('Show average?', 'yet-another-stars-rating'), 'yasr_multiset_hide_average_callback', 'yasr_multiset_tab', 'yasr_multiset_options_section_id', $option_multiset );
|
749 |
-
|
750 |
-
}
|
751 |
-
|
752 |
-
function yasr_multiset_section_callback () {
|
753 |
-
|
754 |
-
//Silence
|
755 |
-
|
756 |
-
}
|
757 |
-
|
758 |
-
function yasr_multiset_hide_average_callback ($option_multiset) {
|
759 |
-
|
760 |
-
?>
|
761 |
-
|
762 |
-
<div class="yasr-onoffswitch-big">
|
763 |
-
<input type="checkbox" name="yasr_multiset_options[show_average]" class="yasr-onoffswitch-checkbox" id="yasr-multiset-options-show-average-switch" <?php if ($option_multiset['show_average']==='yes') echo " checked='checked' "; ?> >
|
764 |
-
<label class="yasr-onoffswitch-label" for="yasr-multiset-options-show-average-switch">
|
765 |
-
<span class="yasr-onoffswitch-inner"></span>
|
766 |
-
<span class="yasr-onoffswitch-switch"></span>
|
767 |
-
</label>
|
768 |
-
</div>
|
769 |
-
|
770 |
-
<br />
|
771 |
-
|
772 |
-
<br />
|
773 |
-
|
774 |
-
<?php
|
775 |
-
|
776 |
-
_e("If you select no, the \"Average\" row will not be displayed. You can override this in the single multi set by using the parameter \"show_average\"", "yasr");
|
777 |
-
|
778 |
-
}
|
779 |
-
|
780 |
-
|
781 |
-
function yasr_sanitize_multiset_options ($option_multiset) {
|
782 |
-
|
783 |
-
if (!array_key_exists('show_average', $option_multiset)) {
|
784 |
-
|
785 |
-
$option_multiset['show_average'] = 'no';
|
786 |
-
|
787 |
-
}
|
788 |
-
|
789 |
-
else {
|
790 |
-
|
791 |
-
$option_multiset['show_average'] = 'yes';
|
792 |
-
|
793 |
-
}
|
794 |
-
|
795 |
-
return $option_multiset;
|
796 |
-
|
797 |
-
}
|
798 |
-
|
799 |
-
|
800 |
-
/****** Create a form for settings page to create new multi set ******/
|
801 |
-
function yasr_display_multi_set_form() {
|
802 |
-
|
803 |
-
?>
|
804 |
-
|
805 |
-
<h4 class="yasr-multi-set-form-headers"><?php _e("Add New Multiple Set", 'yet-another-stars-rating'); ?></h4>
|
806 |
-
<em><?php _e('Name, Element#1 and Element#2 MUST be filled and must be long at least 3 characters', 'yet-another-stars-rating') ?></em>
|
807 |
-
<p>
|
808 |
-
<form action="<?php echo admin_url('options-general.php?page=yasr_settings_page&tab=manage_multi') ?>" id="form_add_multi_set" method="post">
|
809 |
-
<strong><?php _e("Name", 'yet-another-stars-rating')?></strong>
|
810 |
-
<input type="text" name="multi-set-name" id="new-multi-set-name" class="input-text-multi-set">
|
811 |
-
<!--input type="hidden" name="action" value="yasr_new_multi_set_form" />-->
|
812 |
-
|
813 |
-
<p></p>
|
814 |
-
<?php _e("You can insert up to nine elements", 'yet-another-stars-rating') ?>
|
815 |
-
<br />
|
816 |
-
|
817 |
-
<?php for($i=1; $i<=9; $i++) {
|
818 |
-
|
819 |
-
echo "<strong>" . __("Element ", 'yet-another-stars-rating') . "#$i" . "</strong>";
|
820 |
-
?>
|
821 |
-
<input type="text" name="multi-set-name-element-<?php echo $i ?>" id="multi-set-name-element-<?php echo $i ?>" class="input-text-multi-set">
|
822 |
-
<br />
|
823 |
-
|
824 |
-
<?php } //End foreach
|
825 |
-
|
826 |
-
wp_nonce_field( 'add-multi-set', 'add-nonce-new-multi-set' ) ?><!-- a little security to process on submission -->
|
827 |
-
|
828 |
-
<br />
|
829 |
-
<input type="submit" value="<?php _e("Create New Set", 'yet-another-stars-rating') ?>" class="button-primary"/>
|
830 |
-
</form>
|
831 |
-
|
832 |
-
<?php
|
833 |
-
} //End function
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
function yasr_edit_multi_form() {
|
838 |
-
|
839 |
-
global $wpdb;
|
840 |
-
|
841 |
-
$multi_set=yasr_get_multi_set();
|
842 |
-
|
843 |
-
$n_multi_set = $wpdb->num_rows; //wpdb->num_rows always store the last of the last query
|
844 |
-
|
845 |
-
if ($n_multi_set > 1) {
|
846 |
-
?>
|
847 |
-
|
848 |
-
<div class="yasr-manage-multiset">
|
849 |
-
|
850 |
-
<h4 class="yasr-multi-set-form-headers"><?php _e("Manage Multiple Set" , 'yet-another-stars-rating'); ?></h4>
|
851 |
-
|
852 |
-
<?php _e('Wich set do you want to edit or remove?', 'yet-another-stars-rating')?>
|
853 |
-
|
854 |
-
<select id ="yasr_select_edit_set">
|
855 |
-
<?php foreach ($multi_set as $name) { ?>
|
856 |
-
<option value="<?php echo $name->set_id ?>"><?php echo $name->set_name ?></option>
|
857 |
-
<?php } //End foreach ?>
|
858 |
-
</select>
|
859 |
-
|
860 |
-
<button href="#" class="button-delete" id="yasr-button-select-set-edit-form"><?php _e("Select"); ?></button>
|
861 |
-
|
862 |
-
|
863 |
-
</div>
|
864 |
-
|
865 |
-
<?php
|
866 |
-
|
867 |
-
} //End if n_multi_set >1
|
868 |
-
|
869 |
-
elseif ($n_multi_set == 1) {
|
870 |
-
|
871 |
-
$set_name=$wpdb->get_results("SELECT field_name AS name, field_id AS id, parent_set_id AS set_id
|
872 |
-
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
873 |
-
ORDER BY field_id ASC");
|
874 |
-
|
875 |
-
foreach ($multi_set as $find_set_id) {
|
876 |
-
$set_type = $find_set_id->set_id;
|
877 |
-
}
|
878 |
-
|
879 |
-
?>
|
880 |
-
|
881 |
-
<div class="yasr-manage-multiset-single">
|
882 |
-
|
883 |
-
<h4 class="yasr-multi-set-form-headers"><?php _e("Manage Multiple Set", 'yet-another-stars-rating'); ?></h4>
|
884 |
-
|
885 |
-
<form action=" <?php echo admin_url('options-general.php?page=yasr_settings_page&tab=manage_multi') ?>" id="form_edit_multi_set" method="post">
|
886 |
-
|
887 |
-
<input type="hidden" name="yasr_edit_multi_set_form" value="<?php echo $set_type ?>" />
|
888 |
-
|
889 |
-
<table id="yasr-table-form-edit-multi-set">
|
890 |
-
<tr>
|
891 |
-
|
892 |
-
<td id="yasr-table-form-edit-multi-set-header">
|
893 |
-
<?php _e('Field name', 'yet-another-stars-rating') ?>
|
894 |
-
</td>
|
895 |
-
|
896 |
-
<td id="yasr-table-form-edit-multi-set-remove">
|
897 |
-
<?php _e('Remove', 'yet-another-stars-rating') ?>
|
898 |
-
</td>
|
899 |
-
|
900 |
-
</tr>
|
901 |
-
|
902 |
-
<?php
|
903 |
-
|
904 |
-
$i=1;
|
905 |
-
|
906 |
-
foreach ($set_name as $name) {
|
907 |
-
|
908 |
-
echo "
|
909 |
-
<tr>
|
910 |
-
|
911 |
-
<td width=\"80%\">
|
912 |
-
Element #$i <input type=\"text\" value=\"$name->name\" name=\"edit-multi-set-element-$i\">
|
913 |
-
<input type=\"hidden\" value=\"$name->id\" name=\"db-id-for-element-$i\">
|
914 |
-
</td>
|
915 |
-
|
916 |
-
<td width=\"20%\" style=\"text-align:center\">
|
917 |
-
<input type=\"checkbox\" value=\"$name->id\" name=\"remove-element-$i\">
|
918 |
-
</td>
|
919 |
-
|
920 |
-
</tr>
|
921 |
-
";
|
922 |
-
|
923 |
-
$i++;
|
924 |
-
|
925 |
-
}
|
926 |
-
|
927 |
-
|
928 |
-
$i = $i-1; //This is the number of the fields
|
929 |
-
|
930 |
-
echo "
|
931 |
-
|
932 |
-
<input type=\"hidden\" name=\"yasr-edit-form-number-elements\" id=\"yasr-edit-form-number-elements\" value=\"$i\">
|
933 |
-
|
934 |
-
</table>
|
935 |
-
|
936 |
-
<table width=\"100%\" class=\"yasr-edit-form-remove-entire-set\">
|
937 |
-
<tr>
|
938 |
-
|
939 |
-
<td width=\"80%\">" . __("Remove whole set?", 'yet-another-stars-rating') . "</td>
|
940 |
-
|
941 |
-
<td width=\"20%\" style=\"text-align:center\">
|
942 |
-
<input type=\"checkbox\" name=\"yasr-remove-multi-set\" value=\"$set_type\">
|
943 |
-
</td>
|
944 |
-
|
945 |
-
</tr>
|
946 |
-
|
947 |
-
</table>
|
948 |
-
|
949 |
-
";
|
950 |
-
|
951 |
-
echo "<p>";
|
952 |
-
_e("If you remove something you will remove all the votes for that set or field. This operation CAN'T BE undone." , 'yet-another-stars-rating');
|
953 |
-
echo "</p>";
|
954 |
-
|
955 |
-
wp_nonce_field( 'edit-multi-set', 'add-nonce-edit-multi-set' )
|
956 |
-
|
957 |
-
?>
|
958 |
-
|
959 |
-
<div id="yasr-element-limit" style="display:none; color:red"><?php _e("You can use up to 9 elements" , 'yet-another-stars-rating') ?></div>
|
960 |
-
|
961 |
-
<input type="button" class="button-delete" id="yasr-add-field-edit-multiset" value="<?php _e('Add element', 'yet-another-stars-rating'); ?>">
|
962 |
-
|
963 |
-
<input type="submit" value="<?php _e('Save changes', 'yet-another-stars-rating') ?>" class="button-primary" >
|
964 |
-
|
965 |
-
</form>
|
966 |
-
|
967 |
-
</div>
|
968 |
-
|
969 |
-
<?php
|
970 |
-
}
|
971 |
-
|
972 |
-
else {
|
973 |
-
_e("No Multiple Set were found", 'yet-another-stars-rating');
|
974 |
-
}
|
975 |
-
|
976 |
-
}//End function
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
/****** Get and output multiple set in a form and table, used in settings page ******/
|
981 |
-
|
982 |
-
add_action( 'wp_ajax_yasr_get_multi_set', 'yasr_get_multi_set_callback' );
|
983 |
-
|
984 |
-
function yasr_get_multi_set_callback() {
|
985 |
-
if (isset($_POST['set_id']) && $_POST['set_id'] != '' ) {
|
986 |
-
$set_type = $_POST['set_id'];
|
987 |
-
}
|
988 |
-
else {
|
989 |
-
exit ();
|
990 |
-
}
|
991 |
-
|
992 |
-
global $wpdb;
|
993 |
-
|
994 |
-
$set_name=$wpdb->get_results($wpdb->prepare("SELECT field_name AS name, field_id AS id
|
995 |
-
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
996 |
-
WHERE parent_set_id=%d
|
997 |
-
ORDER BY field_id ASC", $set_type));
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
?>
|
1002 |
-
|
1003 |
-
<form action=" <?php echo admin_url('options-general.php?page=yasr_settings_page&tab=manage_multi') ?>" id="form_edit_multi_set" method="post">
|
1004 |
-
<input type="hidden" name="yasr_edit_multi_set_form" value="<?php echo $set_type ?>" />
|
1005 |
-
|
1006 |
-
|
1007 |
-
<table id="yasr-table-form-edit-multi-set">
|
1008 |
-
<tr>
|
1009 |
-
|
1010 |
-
<td id="yasr-table-form-edit-multi-set-header">
|
1011 |
-
<?php _e('Field name', 'yet-another-stars-rating') ?>
|
1012 |
-
</td>
|
1013 |
-
|
1014 |
-
<td id="yasr-table-form-edit-multi-set-remove">
|
1015 |
-
<?php _e('Remove', 'yet-another-stars-rating') ?>
|
1016 |
-
</td>
|
1017 |
-
|
1018 |
-
</tr>
|
1019 |
-
|
1020 |
-
<?php
|
1021 |
-
|
1022 |
-
$i=1;
|
1023 |
-
|
1024 |
-
foreach ($set_name as $name) {
|
1025 |
-
|
1026 |
-
echo "
|
1027 |
-
<tr>
|
1028 |
-
|
1029 |
-
<td width=\"80%\">
|
1030 |
-
Element #$i <input type=\"text\" value=\"$name->name\" name=\"edit-multi-set-element-$i\">
|
1031 |
-
<input type=\"hidden\" value=\"$name->id\" name=\"db-id-for-element-$i\">
|
1032 |
-
</td>
|
1033 |
-
|
1034 |
-
<td width=\"20%\" style=\"text-align:center\">
|
1035 |
-
<input type=\"checkbox\" value=\"$name->id\" name=\"remove-element-$i\">
|
1036 |
-
</td>
|
1037 |
-
|
1038 |
-
</tr>
|
1039 |
-
";
|
1040 |
-
|
1041 |
-
$i++;
|
1042 |
-
|
1043 |
-
}
|
1044 |
-
|
1045 |
-
|
1046 |
-
$i = $i-1; //This is the number of the fields
|
1047 |
-
|
1048 |
-
echo "
|
1049 |
-
|
1050 |
-
<input type=\"hidden\" name=\"yasr-edit-form-number-elements\" id=\"yasr-edit-form-number-elements\" value=\"$i\">
|
1051 |
-
|
1052 |
-
</table>
|
1053 |
-
|
1054 |
-
<table width=\"100%\" class=\"yasr-edit-form-remove-entire-set\">
|
1055 |
-
<tr>
|
1056 |
-
|
1057 |
-
<td width=\"80%\">" . __("Remove whole set?", 'yet-another-stars-rating') . "</td>
|
1058 |
-
|
1059 |
-
<td width=\"20%\" style=\"text-align:center\">
|
1060 |
-
<input type=\"checkbox\" name=\"yasr-remove-multi-set\" value=\"$set_type\">
|
1061 |
-
</td>
|
1062 |
-
|
1063 |
-
</tr>
|
1064 |
-
|
1065 |
-
</table>
|
1066 |
-
|
1067 |
-
";
|
1068 |
-
|
1069 |
-
echo "<p>";
|
1070 |
-
_e("If you remove something you will remove all the votes for that set or field. This operation CAN'T BE undone." , 'yet-another-stars-rating');
|
1071 |
-
echo "</p>";
|
1072 |
-
|
1073 |
-
wp_nonce_field( 'edit-multi-set', 'add-nonce-edit-multi-set' )
|
1074 |
-
|
1075 |
-
?>
|
1076 |
-
|
1077 |
-
<div id="yasr-element-limit" style="display:none; color:red"><?php _e("You can use up to 9 elements" , 'yet-another-stars-rating') ?></div>
|
1078 |
-
|
1079 |
-
<input type="button" class="button-delete" id="yasr-add-field-edit-multiset" value="<?php _e('Add element', 'yet-another-stars-rating'); ?>">
|
1080 |
-
|
1081 |
-
<input type="submit" value="<?php _e('Save changes', 'yet-another-stars-rating') ?>" class="button-primary" >
|
1082 |
-
|
1083 |
-
</form>
|
1084 |
-
|
1085 |
-
<?php
|
1086 |
-
|
1087 |
-
die();
|
1088 |
-
|
1089 |
-
} //End function
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
/****** Validate new multi set form ******/
|
1095 |
-
function yasr_process_new_multi_set_form() {
|
1096 |
-
|
1097 |
-
if ( isset( $_POST['multi-set-name'])) {
|
1098 |
-
|
1099 |
-
global $wpdb;
|
1100 |
-
|
1101 |
-
if ( !current_user_can( 'manage_options' ) ) {
|
1102 |
-
wp_die( 'You are not allowed to be on this page.' );
|
1103 |
-
}
|
1104 |
-
|
1105 |
-
// Check nonce field
|
1106 |
-
check_admin_referer( 'add-multi-set', 'add-nonce-new-multi-set' );
|
1107 |
-
|
1108 |
-
$array_errors = array();
|
1109 |
-
$error = FALSE;
|
1110 |
-
|
1111 |
-
//IF thes fields are not empty go ahed
|
1112 |
-
if ($_POST['multi-set-name']!='' && $_POST['multi-set-name-element-1']!='' && $_POST['multi-set-name-element-2']!='' ) {
|
1113 |
-
|
1114 |
-
$multi_set_name = ucfirst(strtolower($_POST['multi-set-name']));
|
1115 |
-
|
1116 |
-
$multi_set_name_element_=array();
|
1117 |
-
|
1118 |
-
$multi_set_name_element_[1]=$_POST['multi-set-name-element-1'];
|
1119 |
-
$multi_set_name_element_[2]=$_POST['multi-set-name-element-2'];
|
1120 |
-
|
1121 |
-
//If multi set name is shorter than 3 characher come back
|
1122 |
-
if (mb_strlen($multi_set_name) < 3 || mb_strlen($multi_set_name_element_[1]) <3 || mb_strlen($multi_set_name_element_[2]) < 3 ) {
|
1123 |
-
$array_errors[] = "Content field must be longer than 3 chars";
|
1124 |
-
$error=TRUE;
|
1125 |
-
}
|
1126 |
-
|
1127 |
-
|
1128 |
-
if (mb_strlen($multi_set_name) > 40 || mb_strlen($multi_set_name_element_[1]) > 40 || mb_strlen($multi_set_name_element_[2]) > 40 ) {
|
1129 |
-
$array_errors[] = "Content field must be shorter than 40 chars";
|
1130 |
-
$error=TRUE;
|
1131 |
-
}
|
1132 |
-
|
1133 |
-
//Check if a set with that name already exists
|
1134 |
-
$check_name_exists=$wpdb->get_results("SELECT set_name FROM " . YASR_MULTI_SET_NAME_TABLE . " ORDER BY set_id ASC");
|
1135 |
-
|
1136 |
-
foreach ($check_name_exists as $set_name) {
|
1137 |
-
|
1138 |
-
if ($multi_set_name==$set_name->set_name) {
|
1139 |
-
$array_errors[] = "You already have a set with this name";
|
1140 |
-
$error=TRUE;
|
1141 |
-
}
|
1142 |
-
|
1143 |
-
}
|
1144 |
-
|
1145 |
-
$element_filled=2;
|
1146 |
-
|
1147 |
-
//If filled get the element from 3 to 9
|
1148 |
-
for($i=3; $i<=9; $i++) {
|
1149 |
-
|
1150 |
-
if (isset($_POST["multi-set-name-element-$i"]) && $_POST["multi-set-name-element-$i"]!='') {
|
1151 |
-
|
1152 |
-
$multi_set_name_element_[$i]=$_POST["multi-set-name-element-$i"];
|
1153 |
-
|
1154 |
-
if (mb_strlen($multi_set_name_element_[$i]) < 3) {
|
1155 |
-
$array_errors[] = "Field # $i must be at least 3 characters";
|
1156 |
-
$error=TRUE;
|
1157 |
-
}
|
1158 |
-
|
1159 |
-
if (mb_strlen($multi_set_name_element_[$i]) > 40) {
|
1160 |
-
$array_errors[] = "Field # $i must be shorter than 40 characters";
|
1161 |
-
$error=TRUE;
|
1162 |
-
}
|
1163 |
-
|
1164 |
-
$element_filled++;
|
1165 |
-
}
|
1166 |
-
|
1167 |
-
}
|
1168 |
-
|
1169 |
-
//If there isnt any error write in the table
|
1170 |
-
if (!$error) {
|
1171 |
-
|
1172 |
-
//get the highest id in table
|
1173 |
-
$highest_id=$wpdb->get_results("SELECT set_id FROM " . YASR_MULTI_SET_NAME_TABLE . " ORDER BY set_id DESC LIMIT 1 ");
|
1174 |
-
|
1175 |
-
if (!$highest_id) {
|
1176 |
-
$name_table_new_id=0;
|
1177 |
-
}
|
1178 |
-
|
1179 |
-
foreach ($highest_id as $id) {
|
1180 |
-
$name_table_new_id=$id->set_id + 1;
|
1181 |
-
}
|
1182 |
-
|
1183 |
-
$insert_multi_name_success = $wpdb->replace(
|
1184 |
-
YASR_MULTI_SET_NAME_TABLE,
|
1185 |
-
array(
|
1186 |
-
'set_id' =>$name_table_new_id,
|
1187 |
-
'set_name' =>$multi_set_name
|
1188 |
-
),
|
1189 |
-
array ('%d', '%s')
|
1190 |
-
);
|
1191 |
-
|
1192 |
-
//If multi set name hase been inserted, now we're going to insert elements
|
1193 |
-
if ($insert_multi_name_success) {
|
1194 |
-
|
1195 |
-
//get the highest id in table
|
1196 |
-
$highest_id=$wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_FIELDS_TABLE . " ORDER BY id DESC LIMIT 1 ");
|
1197 |
-
|
1198 |
-
if (!$highest_id) {
|
1199 |
-
$field_table_new_id=0;
|
1200 |
-
}
|
1201 |
-
|
1202 |
-
foreach ($highest_id as $id) {
|
1203 |
-
$field_table_new_id=$id->id + 1;
|
1204 |
-
}
|
1205 |
-
|
1206 |
-
for ($i=1; $i<=$element_filled; $i++) {
|
1207 |
-
$insert_set_value=$wpdb->replace(
|
1208 |
-
YASR_MULTI_SET_FIELDS_TABLE,
|
1209 |
-
array(
|
1210 |
-
'id' => $field_table_new_id,
|
1211 |
-
'parent_set_id' =>$name_table_new_id,
|
1212 |
-
'field_name' =>$multi_set_name_element_[$i],
|
1213 |
-
'field_id' =>$i
|
1214 |
-
),
|
1215 |
-
array ('%d', '%d', '%s', '%d')
|
1216 |
-
);
|
1217 |
-
$field_table_new_id++; //Avoid overwrite
|
1218 |
-
} //End for
|
1219 |
-
|
1220 |
-
if ($insert_set_value) {
|
1221 |
-
echo "<div class=\"updated\"><p><strong>";
|
1222 |
-
_e("Settings Saved", 'yet-another-stars-rating');
|
1223 |
-
echo "</strong></p></div> ";
|
1224 |
-
}
|
1225 |
-
|
1226 |
-
else {
|
1227 |
-
_e("Something goes wrong trying insert set field name. Please report it", 'yet-another-stars-rating');
|
1228 |
-
}
|
1229 |
-
|
1230 |
-
} //End if $insert_multi_name_success
|
1231 |
-
|
1232 |
-
else {
|
1233 |
-
_e("Something goes wrong trying insert Multi Set name. Please report it", 'yet-another-stars-rating');
|
1234 |
-
}
|
1235 |
-
|
1236 |
-
} //End if !$error
|
1237 |
-
|
1238 |
-
} //End if $_POST['multi-set-name']!=''
|
1239 |
-
|
1240 |
-
//Else multi set's name and first 2 elements are empty
|
1241 |
-
else {
|
1242 |
-
$array_errors[] = "Multi Set's name and first 2 elements can't be empty";
|
1243 |
-
$error=TRUE;
|
1244 |
-
}
|
1245 |
-
|
1246 |
-
if ($error) {
|
1247 |
-
return $array_errors;
|
1248 |
-
}
|
1249 |
-
|
1250 |
-
} //End if ( isset( $_POST['multi-set-name']) ) {
|
1251 |
-
|
1252 |
-
} //End yasr_process_new_multi_set_form() function
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
function yasr_process_edit_multi_set_form() {
|
1257 |
-
|
1258 |
-
$error = FALSE;
|
1259 |
-
|
1260 |
-
if ( isset( $_POST['yasr_edit_multi_set_form']) ) {
|
1261 |
-
|
1262 |
-
$set_id = $_POST['yasr_edit_multi_set_form'];
|
1263 |
-
|
1264 |
-
$number_of_stored_elements = $_POST['yasr-edit-form-number-elements'];
|
1265 |
-
|
1266 |
-
global $wpdb;
|
1267 |
-
|
1268 |
-
$array_errors = array();
|
1269 |
-
|
1270 |
-
if ( !current_user_can( 'manage_options' ) ) {
|
1271 |
-
wp_die( 'You are not allowed to be on this page.' );
|
1272 |
-
}
|
1273 |
-
|
1274 |
-
// Check nonce field
|
1275 |
-
check_admin_referer( 'edit-multi-set', 'add-nonce-edit-multi-set' );
|
1276 |
-
|
1277 |
-
|
1278 |
-
//Check if user want to delete entire set
|
1279 |
-
|
1280 |
-
if (isset($_POST["yasr-remove-multi-set"])) {
|
1281 |
-
|
1282 |
-
$remove_set = $wpdb->delete (
|
1283 |
-
YASR_MULTI_SET_NAME_TABLE,
|
1284 |
-
array(
|
1285 |
-
'set_id' => $set_id,
|
1286 |
-
),
|
1287 |
-
array ('%d')
|
1288 |
-
);
|
1289 |
-
|
1290 |
-
$remove_set_values = $wpdb->delete (
|
1291 |
-
YASR_MULTI_SET_FIELDS_TABLE,
|
1292 |
-
array(
|
1293 |
-
'parent_set_id' => $set_id,
|
1294 |
-
),
|
1295 |
-
array ('%d')
|
1296 |
-
);
|
1297 |
-
|
1298 |
-
$remove_set_votes = $wpdb->delete (
|
1299 |
-
YASR_MULTI_SET_VALUES_TABLE,
|
1300 |
-
array(
|
1301 |
-
'set_type' => $set_id,
|
1302 |
-
),
|
1303 |
-
array ('%d')
|
1304 |
-
);
|
1305 |
-
|
1306 |
-
if ($remove_set==FALSE) {
|
1307 |
-
$error = TRUE;
|
1308 |
-
$array_errors[] .= __("Something goes wrong trying to delete a Multi Set . Please report it", 'yet-another-stars-rating');
|
1309 |
-
}
|
1310 |
-
|
1311 |
-
|
1312 |
-
//Comment this out, if try to delete an empty set print error
|
1313 |
-
/*if ($remove_set_values==FALSE) {
|
1314 |
-
$error = TRUE;
|
1315 |
-
$array_errors[] .= __("Something goes wrong trying to delete data fields for a set. Please report it", 'yet-another-stars-rating');
|
1316 |
-
}
|
1317 |
-
*/
|
1318 |
-
|
1319 |
-
//Comment this out, will echo error even if the value for that field it's just empty
|
1320 |
-
/*if ($remove_set_votes==FALSE) {
|
1321 |
-
$error = TRUE;
|
1322 |
-
$array_errors[] .= __("Something goes wrong trying to delete data values for a set. Please report it", 'yet-another-stars-rating');
|
1323 |
-
}*/
|
1324 |
-
|
1325 |
-
}
|
1326 |
-
|
1327 |
-
for ($i = 0; $i <= 9; $i++) {
|
1328 |
-
|
1329 |
-
//Than, check if the user want to remove some field
|
1330 |
-
if (isset($_POST["remove-element-$i"]) && !isset($_POST["yasr-remove-multi-set"]) ) {
|
1331 |
-
|
1332 |
-
$field_to_remove = $_POST["remove-element-$i"];
|
1333 |
-
|
1334 |
-
$remove_field = $wpdb->delete (
|
1335 |
-
YASR_MULTI_SET_FIELDS_TABLE,
|
1336 |
-
array(
|
1337 |
-
'parent_set_id' => $set_id,
|
1338 |
-
'field_id' =>$field_to_remove
|
1339 |
-
),
|
1340 |
-
array ('%d', '%d')
|
1341 |
-
);
|
1342 |
-
|
1343 |
-
$remove_values = $wpdb->delete (
|
1344 |
-
YASR_MULTI_SET_VALUES_TABLE,
|
1345 |
-
array(
|
1346 |
-
'set_type' => $set_id,
|
1347 |
-
'field_id' =>$field_to_remove
|
1348 |
-
),
|
1349 |
-
array ('%d', '%d')
|
1350 |
-
);
|
1351 |
-
|
1352 |
-
if ($remove_field == FALSE) {
|
1353 |
-
$error = TRUE;
|
1354 |
-
$array_errors[] = __("Something goes wrong trying to delete a Multi Set's element. Please report it", 'yet-another-stars-rating');
|
1355 |
-
}
|
1356 |
-
|
1357 |
-
|
1358 |
-
//Comment this out, will echo error even if the value for that field it's just empty
|
1359 |
-
/*if ($remove_values == FALSE) {
|
1360 |
-
$error = TRUE;
|
1361 |
-
$array_errors[] = __("Something goes wrong trying to delete data value for an element. Please report it", 'yet-another-stars-rating');
|
1362 |
-
}*/
|
1363 |
-
|
1364 |
-
|
1365 |
-
} //End if isset $_POST['remove-element-$i']
|
1366 |
-
|
1367 |
-
|
1368 |
-
//update the stored elements with the new ones
|
1369 |
-
if (isset($_POST["edit-multi-set-element-$i"]) && !isset($_POST["yasr-remove-multi-set"]) && !isset($_POST["remove-element-$i"]) && $i <= $number_of_stored_elements ) {
|
1370 |
-
|
1371 |
-
$field_name = $_POST["edit-multi-set-element-$i"];
|
1372 |
-
|
1373 |
-
$field_id = $_POST["db-id-for-element-$i"];
|
1374 |
-
|
1375 |
-
//if elements name is shorter than 3 chars
|
1376 |
-
if (mb_strlen($field_name) <3) {
|
1377 |
-
$array_errors[] = __("Field # $i must be at least 3 characters", 'yet-another-stars-rating');
|
1378 |
-
$error=TRUE;
|
1379 |
-
}
|
1380 |
-
|
1381 |
-
if(mb_strlen($field_name) > 40) {
|
1382 |
-
$array_errors[] = __("Field # $i must be shorter than 40 characters", 'yet-another-stars-rating');
|
1383 |
-
$error=TRUE;
|
1384 |
-
}
|
1385 |
-
|
1386 |
-
else {
|
1387 |
-
|
1388 |
-
//Check if field name is changed
|
1389 |
-
$field_name_in_db = $wpdb->get_results($wpdb->prepare("SELECT field_name FROM " . YASR_MULTI_SET_FIELDS_TABLE . " WHERE field_id=%d AND parent_set_id=%d", $field_id, $set_id ) );
|
1390 |
-
|
1391 |
-
foreach ($field_name_in_db as $field_in_db) {
|
1392 |
-
$field_name_in_database = $field_in_db->field_name;
|
1393 |
-
}
|
1394 |
-
|
1395 |
-
//if field name in db is different from field name in form update it
|
1396 |
-
if ($field_name_in_database != $field_name) {
|
1397 |
-
|
1398 |
-
$insert_field_name=$wpdb->update(
|
1399 |
-
YASR_MULTI_SET_FIELDS_TABLE,
|
1400 |
-
|
1401 |
-
array(
|
1402 |
-
'field_name' =>$field_name,
|
1403 |
-
),
|
1404 |
-
|
1405 |
-
array(
|
1406 |
-
'parent_set_id' =>$set_id,
|
1407 |
-
'field_id' =>$field_id
|
1408 |
-
),
|
1409 |
-
|
1410 |
-
array ('%s'),
|
1411 |
-
|
1412 |
-
array ('%d', '%d')
|
1413 |
-
|
1414 |
-
);
|
1415 |
-
|
1416 |
-
if ($insert_field_name == FALSE) {
|
1417 |
-
$error = TRUE;
|
1418 |
-
$array_errors[] = __("Something goes wrong trying to update a Multi Set's element. Please report it", 'yet-another-stars-rating');
|
1419 |
-
}
|
1420 |
-
|
1421 |
-
} //End if ($field_name_in_database != $field_name) {
|
1422 |
-
|
1423 |
-
}
|
1424 |
-
|
1425 |
-
} //End if (isset($_POST["edit-multi-set-element-$i"]) && !isset($_POST["remove-element-$i"]) && $i<=$number_of_stored_elements )
|
1426 |
-
|
1427 |
-
|
1428 |
-
//If $i > number of stored elements, user is adding new elements, so we're going to insert the new ones
|
1429 |
-
if (isset($_POST["edit-multi-set-element-$i"]) && !isset($_POST["yasr-remove-multi-set"]) && !isset($_POST["remove-element-$i"]) && $i > $number_of_stored_elements ) {
|
1430 |
-
|
1431 |
-
$field_name = $_POST["edit-multi-set-element-$i"];
|
1432 |
-
|
1433 |
-
//if elements name is shorter than 3 chars return error. I use mb_strlen($field_name) > 1
|
1434 |
-
//because I don't wont return error if an user add an empty field. An empty field will be
|
1435 |
-
//just ignored
|
1436 |
-
if (mb_strlen($field_name) > 1 && mb_strlen($field_name) < 3) {
|
1437 |
-
$array_errors[] = __("Field # $i must be at least 3 characters", 'yet-another-stars-rating');
|
1438 |
-
$error=TRUE;
|
1439 |
-
}
|
1440 |
-
|
1441 |
-
if(mb_strlen($field_name) > 40) {
|
1442 |
-
$array_errors[] = __("Field # $i must be shorter than 40 characters", 'yet-another-stars-rating');
|
1443 |
-
$error=TRUE;
|
1444 |
-
}
|
1445 |
-
|
1446 |
-
//if field is not empty
|
1447 |
-
elseif ($field_name != '') {
|
1448 |
-
|
1449 |
-
$highest_id=$wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_FIELDS_TABLE . " ORDER BY id DESC LIMIT 1 ");
|
1450 |
-
|
1451 |
-
$highest_field_id = $wpdb->get_results("SELECT field_id FROM " . YASR_MULTI_SET_FIELDS_TABLE . " ORDER BY field_id DESC LIMIT 1 ");
|
1452 |
-
|
1453 |
-
foreach ($highest_id as $id) {
|
1454 |
-
$field_table_new_id=$id->id + 1;
|
1455 |
-
}
|
1456 |
-
|
1457 |
-
foreach ($highest_field_id as $id) {
|
1458 |
-
$new_field_id = $id->field_id+1;
|
1459 |
-
}
|
1460 |
-
|
1461 |
-
$insert_set_value=$wpdb->replace(
|
1462 |
-
YASR_MULTI_SET_FIELDS_TABLE,
|
1463 |
-
array(
|
1464 |
-
'id' => $field_table_new_id,
|
1465 |
-
'parent_set_id' =>$set_id,
|
1466 |
-
'field_name' =>$field_name,
|
1467 |
-
'field_id' =>$new_field_id
|
1468 |
-
),
|
1469 |
-
array ('%d', '%d', '%s', '%d')
|
1470 |
-
);
|
1471 |
-
|
1472 |
-
//now, I've to find which post is using the edited multi set and add the new field with value 0
|
1473 |
-
|
1474 |
-
//get the highest id
|
1475 |
-
$highest_id_value_table = $wpdb->get_results("SELECT id FROM " . YASR_MULTI_SET_VALUES_TABLE . " ORDER BY id DESC LIMIT 1 ");
|
1476 |
-
|
1477 |
-
foreach ($highest_id_value_table as $id) {
|
1478 |
-
$field_value_table_new_id=$id->id + 1;
|
1479 |
-
}
|
1480 |
-
|
1481 |
-
//get all the post id that are using this multiset
|
1482 |
-
$array_post_id = $wpdb->get_results($wpdb->prepare("SELECT post_id
|
1483 |
-
FROM " . YASR_MULTI_SET_VALUES_TABLE .
|
1484 |
-
" WHERE set_type=%d
|
1485 |
-
GROUP BY post_id", $set_id));
|
1486 |
-
|
1487 |
-
//Insert the new fields
|
1488 |
-
foreach ($array_post_id as $postid) {
|
1489 |
-
|
1490 |
-
$insert_new_field_values_table = $wpdb->insert(
|
1491 |
-
YASR_MULTI_SET_VALUES_TABLE,
|
1492 |
-
array(
|
1493 |
-
'id' => $field_value_table_new_id,
|
1494 |
-
'set_type' => $set_id,
|
1495 |
-
'field_id' => $new_field_id,
|
1496 |
-
'post_id' => $postid->post_id
|
1497 |
-
),
|
1498 |
-
array ('%d', '%d', '%d', '%d')
|
1499 |
-
);
|
1500 |
-
|
1501 |
-
$field_value_table_new_id++;
|
1502 |
-
|
1503 |
-
}
|
1504 |
-
|
1505 |
-
if ($insert_set_value == FALSE) {
|
1506 |
-
$error = TRUE;
|
1507 |
-
$array_errors[] = __("Something goes wrong trying to insert set field name in edit form. Please report it", 'yet-another-stars-rating');
|
1508 |
-
}
|
1509 |
-
|
1510 |
-
} //end else
|
1511 |
-
}
|
1512 |
-
|
1513 |
-
|
1514 |
-
} //End for
|
1515 |
-
|
1516 |
-
|
1517 |
-
if ($error) {
|
1518 |
-
return $array_errors;
|
1519 |
-
}
|
1520 |
-
else {
|
1521 |
-
echo "<div class=\"updated\"><p><strong>";
|
1522 |
-
_e("Settings Saved", 'yet-another-stars-rating');
|
1523 |
-
echo "</strong></p></div> ";
|
1524 |
-
}
|
1525 |
-
|
1526 |
-
|
1527 |
-
} //End if isset( $_POST['yasr_edit_multi_set_form']
|
1528 |
-
|
1529 |
-
|
1530 |
-
} //End yasr_process_edit_multi_set_form() function
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
add_action( 'admin_init', 'yasr_style_options_init' ); //This is for auto insert options
|
1536 |
-
|
1537 |
-
function yasr_style_options_init() {
|
1538 |
-
|
1539 |
-
register_setting(
|
1540 |
-
'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()
|
1541 |
-
'yasr_style_options', //The name of an option to sanitize and save.
|
1542 |
-
'yasr_style_options_sanitize'
|
1543 |
-
);
|
1544 |
-
|
1545 |
-
$style_options = get_option( 'yasr_style_options' );
|
1546 |
-
|
1547 |
-
if (!$style_options || !isset($style_options['scheme_color_multiset']) || !isset($style_options['textarea'])) {
|
1548 |
-
|
1549 |
-
$style_options = array();
|
1550 |
-
$style_options['scheme_color_multiset'] = 'light';
|
1551 |
-
$style_options['textarea'] = NULL;
|
1552 |
-
|
1553 |
-
}
|
1554 |
-
|
1555 |
-
//filter $style_options
|
1556 |
-
$style_options = apply_filters('yasr_filter_style_options', $style_options);
|
1557 |
-
|
1558 |
-
add_settings_section( 'yasr_style_options_section_id', __('Style Options', 'yet-another-stars-rating'), 'yasr_style_section_callback', 'yasr_style_tab' );
|
1559 |
-
do_action('yasr_style_options_add_settings_field', $style_options);
|
1560 |
-
add_settings_field( 'yasr_color_scheme_multiset', __('Which color scheme do you want to use?', 'yet-another-stars-rating') , 'yasr_color_scheme_multiset_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options);
|
1561 |
-
add_settings_field( 'yasr_style_options_textarea', __('Custom CSS Styles', 'yet-another-stars-rating'), 'yasr_style_options_textarea_callback', 'yasr_style_tab', 'yasr_style_options_section_id', $style_options );
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
}
|
1566 |
-
|
1567 |
-
function yasr_style_section_callback () {
|
1568 |
-
|
1569 |
-
}
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
function yasr_color_scheme_multiset_callback($style_options) {
|
1574 |
-
|
1575 |
-
?>
|
1576 |
-
|
1577 |
-
<input type='radio' name='yasr_style_options[scheme_color_multiset]' value='light' class='yasr-general-options-scheme-color' <?php if ($style_options['scheme_color_multiset']==='light') echo " checked=\"checked\" "; ?> />
|
1578 |
-
<?php _e('Light', 'yet-another-stars-rating')?>
|
1579 |
-
|
1580 |
-
|
1581 |
-
|
1582 |
-
<input type='radio' name='yasr_style_options[scheme_color_multiset]' value='dark' class='yasr-general-options-scheme-color' <?php if ($style_options['scheme_color_multiset']==='dark') echo " checked=\"checked\" "; ?> />
|
1583 |
-
<?php _e('Dark', 'yet-another-stars-rating')?>
|
1584 |
-
<br />
|
1585 |
-
|
1586 |
-
<br />
|
1587 |
-
|
1588 |
-
<a href="#" id="yasr-color-scheme-preview-link"><?php _e("Preview", 'yet-another-stars-rating') ?></a>
|
1589 |
-
|
1590 |
-
<div id="yasr-color-scheme-preview" style="display:none">
|
1591 |
-
<?php
|
1592 |
-
|
1593 |
-
_e("Light theme", 'yet-another-stars-rating');
|
1594 |
-
echo "<br /><br /><img src=" . YASR_IMG_DIR . "yasr-multi-set.png>";
|
1595 |
-
|
1596 |
-
echo "<br /> <br />";
|
1597 |
-
|
1598 |
-
_e("Dark theme", 'yet-another-stars-rating');
|
1599 |
-
echo "<br /><br /><img src=" . YASR_IMG_DIR . "dark-multi-set.png>";
|
1600 |
-
?>
|
1601 |
-
</div>
|
1602 |
-
|
1603 |
-
<p>
|
1604 |
-
|
1605 |
-
<?php
|
1606 |
-
}
|
1607 |
-
|
1608 |
-
function yasr_style_options_textarea_callback ($style_options) {
|
1609 |
-
|
1610 |
-
_e("Please use text area below to write your own CSS styles to override the default ones.", 'yet-another-stars-rating');
|
1611 |
-
echo "<br /><strong>";
|
1612 |
-
_e("Leave it blank if you don't know what you're doing.", 'yet-another-stars-rating');
|
1613 |
-
echo "</strong><p>";
|
1614 |
-
|
1615 |
-
echo ("
|
1616 |
-
<textarea rows=\"17\" cols=\"40\" name=\"yasr_style_options[textarea]\" id=\"yasr_style_options_textarea\">$style_options[textarea]</textarea>
|
1617 |
-
");
|
1618 |
-
|
1619 |
-
|
1620 |
-
}
|
1621 |
-
|
1622 |
-
//sanitize
|
1623 |
-
function yasr_style_options_sanitize ($style_options) {
|
1624 |
-
|
1625 |
-
foreach ($style_options as $key => $value) {
|
1626 |
-
|
1627 |
-
$output[$key] = strip_tags( stripslashes( $style_options[$key] ) );
|
1628 |
-
|
1629 |
-
}
|
1630 |
-
|
1631 |
-
return $output;
|
1632 |
-
|
1633 |
-
|
1634 |
-
}
|
1635 |
-
|
1636 |
-
|
1637 |
-
/*** Facebook sdk, since version 0.8.8 ***/
|
1638 |
-
|
1639 |
-
function yasr_include_fb_sdk () {
|
1640 |
-
|
1641 |
-
$lang = get_locale();
|
1642 |
-
|
1643 |
-
$lang = json_encode("$lang");
|
1644 |
-
|
1645 |
-
?>
|
1646 |
-
|
1647 |
-
<div id="fb-root"></div>
|
1648 |
-
<script>
|
1649 |
-
(function(d, s, id) {
|
1650 |
-
var lang = <?php echo ($lang); ?>;
|
1651 |
-
var js, fjs = d.getElementsByTagName(s)[0];
|
1652 |
-
if (d.getElementById(id)) return;
|
1653 |
-
js = d.createElement(s); js.id = id;
|
1654 |
-
js.src = "//connect.facebook.net/"+lang+"/sdk.js#xfbml=1&version=v2.3&appId=113845018658519";
|
1655 |
-
fjs.parentNode.insertBefore(js, fjs);
|
1656 |
-
}
|
1657 |
-
(document, 'script', 'facebook-jssdk'));
|
1658 |
-
</script>
|
1659 |
-
|
1660 |
-
<?php
|
1661 |
-
|
1662 |
-
}
|
1663 |
-
|
1664 |
-
function yasr_upgrade_pro_box ($position=FALSE) {
|
1665 |
-
|
1666 |
-
if ( yasr_fs()->is_free_plan() ) {
|
1667 |
-
|
1668 |
-
if ( $position && $position == "bottom" ) {
|
1669 |
-
$yasr_upgrade_class = "yasr-donatedivbottom";
|
1670 |
-
}
|
1671 |
-
|
1672 |
-
else {
|
1673 |
-
$yasr_upgrade_class = "yasr-donatedivdx";
|
1674 |
-
}
|
1675 |
-
|
1676 |
-
?>
|
1677 |
-
|
1678 |
-
<div class="<?php echo $yasr_upgrade_class ?>" style="display: none">
|
1679 |
-
|
1680 |
-
<h2 style="color: #34A7C1">
|
1681 |
-
<?php _e( 'Upgrade to YASR Pro', 'yet-another-stars-rating' ); ?>
|
1682 |
-
</h2>
|
1683 |
-
|
1684 |
-
<div class="yasr-upgrade-to-pro">
|
1685 |
-
<ul>
|
1686 |
-
<li><strong><?php _e( ' User Reviews', 'yet-another-stars-rating' ); ?></strong></li>
|
1687 |
-
<li><strong><?php _e( ' Custom Rankings', 'yet-another-stars-rating' ); ?></strong></li>
|
1688 |
-
<li><strong><?php _e( ' 20 + ready to use themes', 'yet-another-stars-rating' ); ?></strong></li>
|
1689 |
-
<li><strong><?php _e( ' Upload your own theme', 'yet-another-stars-rating' ); ?></strong></li>
|
1690 |
-
<li><strong><?php _e( ' Dedicate support', 'yet-another-stars-rating' ); ?></strong></li>
|
1691 |
-
</ul>
|
1692 |
-
<a href="<?php echo yasr_fs()->get_upgrade_url(); ?>"><button class="button button-primary">Upgrade Now</button></a>
|
1693 |
-
|
1694 |
-
</div>
|
1695 |
-
|
1696 |
-
</div>
|
1697 |
-
|
1698 |
-
<?php
|
1699 |
-
|
1700 |
-
}
|
1701 |
-
|
1702 |
-
}
|
1703 |
-
|
1704 |
-
/****** Facebook box, since version 0.8.8 ******/
|
1705 |
-
|
1706 |
-
function yasr_fb_box ($position=FALSE) {
|
1707 |
-
|
1708 |
-
if ($position && $position == "bottom") {
|
1709 |
-
$yasr_fb_class = "yasr-donatedivbottom";
|
1710 |
-
}
|
1711 |
-
|
1712 |
-
else {
|
1713 |
-
$yasr_fb_class = "yasr-donatedivdx";
|
1714 |
-
}
|
1715 |
-
|
1716 |
-
?>
|
1717 |
-
|
1718 |
-
<div class="<?php echo $yasr_fb_class; ?>" style="display:none">
|
1719 |
-
|
1720 |
-
<h2><?php _e('Keep in touch!', 'yet-another-stars-rating'); ?></h2>
|
1721 |
-
|
1722 |
-
<div class="fb-page" data-href="https://www.facebook.com/yetanotherstarsrating" data-hide-cover="false" data-show-facepile="true" data-show-posts="false">
|
1723 |
-
<div class="fb-xfbml-parse-ignore">
|
1724 |
-
<blockquote cite="https://www.facebook.com/yetanotherstarsrating"><a href="https://www.facebook.com/yetanotherstarsrating">YASR - Yet Another Stars Rating</a></blockquote>
|
1725 |
-
</div>
|
1726 |
-
</div>
|
1727 |
-
|
1728 |
-
</div>
|
1729 |
-
|
1730 |
-
<?php
|
1731 |
-
|
1732 |
-
}
|
1733 |
-
|
1734 |
-
/** Add a box on the right for asking to rate 5 stars on Wordpress.org
|
1735 |
-
* It must be appear after 10 logged rating, after 100 and after 1000
|
1736 |
-
* Since version 0.9.0
|
1737 |
-
*/
|
1738 |
-
|
1739 |
-
function yasr_ask_rating ($position=FALSE) {
|
1740 |
-
|
1741 |
-
$transient = get_site_transient ('yasr_hide_ask_rating');
|
1742 |
-
|
1743 |
-
if (!$transient) {
|
1744 |
-
|
1745 |
-
if ($position && $position == "bottom") {
|
1746 |
-
$yasr_metabox_class = "yasr-donatedivbottom";
|
1747 |
-
}
|
1748 |
-
|
1749 |
-
else {
|
1750 |
-
$yasr_metabox_class = "yasr-donatedivdx";
|
1751 |
-
}
|
1752 |
-
|
1753 |
-
$n_stored_ratings = yasr_count_logged_vote ();
|
1754 |
-
|
1755 |
-
$div = "<div class=\"$yasr_metabox_class\" id=\"yasr-ask-five-stars\" style=\" display:none; border-left: 3px solid #7AD03A; font-size: 14px;\">";
|
1756 |
-
|
1757 |
-
if($n_stored_ratings > 20) {
|
1758 |
-
|
1759 |
-
$text = sprintf( __('Hey, seems like you reached %s votes on your site throught YASR! That\'s cool!', 'yet-another-stars-rating'),'<strong>'.$n_stored_ratings.'</strong>');
|
1760 |
-
$text .= "<br />";
|
1761 |
-
$text .= __('Can I ask a favor?', 'yet-another-stars-rating');
|
1762 |
-
$text .= "<br />";
|
1763 |
-
$text .= __('Can you please rate YASR 5 stars on', 'yet-another-stars-rating');
|
1764 |
-
$text .= ' <a href="https://wordpress.org/support/view/plugin-reviews/yet-another-stars-rating?filter=5">wordpress.org?</a>';
|
1765 |
-
$text .= __(' It will require just 1 min but it\'s a HUGE help for me. Thank you.' , 'yet-another-stars-rating');
|
1766 |
-
$text .= "<br /><br />";
|
1767 |
-
$text .= "<em>> Dario Curvino</em>";
|
1768 |
-
|
1769 |
-
$text .= "<ul>
|
1770 |
-
|
1771 |
-
<li><a href=\"https://wordpress.org/support/view/plugin-reviews/yet-another-stars-rating?filter=5\">" . __("Ok, I'm glad to help!" , 'yet-another-stars-rating') ."</a></li>
|
1772 |
-
<li><a href=\"#\" id=\"yasr-ask-five-star-later\">" . __("Remind me later!" , 'yet-another-stars-rating') ."</a></li>
|
1773 |
-
<li><a href=\"#\" id=\"yasr-ask-five-close\">" . __("Don't need to ask, I already did it!" , 'yet-another-stars-rating') ."</a></li>
|
1774 |
-
|
1775 |
-
</ul>";
|
1776 |
-
|
1777 |
-
|
1778 |
-
$div_and_text = $div . $text . '</div>';
|
1779 |
-
|
1780 |
-
echo $div_and_text;
|
1781 |
-
|
1782 |
-
}
|
1783 |
-
|
1784 |
-
} //End if (!transient)
|
1785 |
-
|
1786 |
-
|
1787 |
-
}
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
/** Change default admin footer on yasr settings pages
|
1792 |
-
* $text is the default wordpress text
|
1793 |
-
* Since 0.8.9
|
1794 |
-
*/
|
1795 |
-
|
1796 |
-
add_filter( 'admin_footer_text', 'yasr_custom_admin_footer' );
|
1797 |
-
|
1798 |
-
function yasr_custom_admin_footer ($text) {
|
1799 |
-
|
1800 |
-
if (isset($_GET['page'])) {
|
1801 |
-
$yasr_page = $_GET[ 'page' ];
|
1802 |
-
|
1803 |
-
if ($yasr_page == 'yasr_settings_page') {
|
1804 |
-
|
1805 |
-
$custom_text = ' | <i>';
|
1806 |
-
$custom_text .= sprintf( __( 'Thank you for using <a href="%s" target="_blank">Yet Another Stars Rating</a>. Please <a href="%s" target="_blank">rate it</a> 5 stars on <a href="%s" target="_blank">WordPress.org</a>', 'yet-another-stars-rating' ),
|
1807 |
-
'https://yetanotherstarsrating.com',
|
1808 |
-
'https://wordpress.org/support/view/plugin-reviews/yet-another-stars-rating?filter=5',
|
1809 |
-
'https://wordpress.org/support/view/plugin-reviews/yet-another-stars-rating?filter=5' );
|
1810 |
-
$custom_text .= '</i>';
|
1811 |
-
|
1812 |
-
return $text . $custom_text;
|
1813 |
-
|
1814 |
-
}
|
1815 |
-
|
1816 |
-
else {
|
1817 |
-
return $text;
|
1818 |
-
}
|
1819 |
-
|
1820 |
-
}
|
1821 |
-
|
1822 |
-
else {
|
1823 |
-
return $text;
|
1824 |
-
}
|
1825 |
-
|
1826 |
-
}
|
1827 |
-
|
1828 |
-
|
1829 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/yasr-shortcode-functions.php
CHANGED
@@ -52,20 +52,8 @@ add_shortcode ('yasr_overall_rating', 'shortcode_overall_rating_callback');
|
|
52 |
|
53 |
$stars_attribute = yasr_stars_size($size);
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
$overall_rating_html_id = 'yasr-overall-rating-rater-' . $postid;
|
59 |
-
$html_stars = "<div class=\"yasr-rater-stars\" id=\"$overall_rating_html_id\" data-rater-postid=\"$postid\" data-rating=\"$overall_rating\" data-rater-starsize=\"$stars_attribute[px_size]\" ></div>";
|
60 |
-
|
61 |
-
}
|
62 |
-
|
63 |
-
//by default, use jquery
|
64 |
-
else {
|
65 |
-
|
66 |
-
$html_stars = "<div class=\"$stars_attribute[class]\" id=\"yasr_rateit_overall\" data-rateit-starwidth=\"$stars_attribute[px_size]\" data-rateit-starheight=\"$stars_attribute[px_size]\" data-rateit-value=\"$overall_rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>";
|
67 |
-
|
68 |
-
}
|
69 |
|
70 |
if (YASR_TEXT_BEFORE_STARS == 1 && YASR_TEXT_BEFORE_OVERALL != '') {
|
71 |
|
@@ -158,15 +146,8 @@ add_shortcode ('yasr_visitor_votes', 'shortcode_visitor_votes_callback');
|
|
158 |
//if this come from yasr_visitor_votes_readonly...
|
159 |
if ($readonly === TRUE || $readonly === "yes") {
|
160 |
|
161 |
-
|
162 |
-
|
163 |
-
$htmlid = 'yasr-visitor-votes-readonly-rater-'.$post_id;
|
164 |
-
$shortcode_html = "<div class=\"yasr-rater-stars\" id=\"$htmlid\" data-rater-value=\"$medium_rating\" data-rater-starsize=\"$stars_attribute[px_size]\" data-rater-postid=\"$post_id\"></div>";
|
165 |
-
|
166 |
-
}
|
167 |
-
else {
|
168 |
-
$shortcode_html = "<div class=\"$stars_attribute[class]\" id=\"yasr_rateit_visitor_votes_$post_id\" data-postid=\"$post_id\" data-rateit-starwidth=\"$stars_attribute[px_size]\" data-rateit-starheight=\"$stars_attribute[px_size]\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>";
|
169 |
-
}
|
170 |
|
171 |
return $shortcode_html;
|
172 |
|
@@ -174,15 +155,6 @@ add_shortcode ('yasr_visitor_votes', 'shortcode_visitor_votes_callback');
|
|
174 |
|
175 |
$ajax_nonce_visitor = wp_create_nonce( "yasr_nonce_insert_visitor_rating" );
|
176 |
|
177 |
-
if (YASR_JQUERY_DISABLED !== 'yes') {
|
178 |
-
|
179 |
-
wp_localize_script( 'yasrfront', "yasrVisitorsVotesData", array(
|
180 |
-
'nonceVisitor' => $ajax_nonce_visitor
|
181 |
-
)
|
182 |
-
);
|
183 |
-
|
184 |
-
}
|
185 |
-
|
186 |
//name of cookie to check
|
187 |
$yasr_cookiename = 'yasr_visitor_vote_cookie';
|
188 |
|
@@ -222,7 +194,7 @@ add_shortcode ('yasr_visitor_votes', 'shortcode_visitor_votes_callback');
|
|
222 |
|
223 |
$shortcode_html = '<!--Yasr Visitor Votes Shortcode-->';
|
224 |
$shortcode_html .= "<div id=\"yasr_visitor_votes_$post_id\" class=\"yasr-visitor-votes\">";
|
225 |
-
$
|
226 |
|
227 |
//I've to check a logged in user that has already rated
|
228 |
if ( is_user_logged_in() ) {
|
@@ -234,7 +206,8 @@ add_shortcode ('yasr_visitor_votes', 'shortcode_visitor_votes_callback');
|
|
234 |
|
235 |
//If user has already rated
|
236 |
if ($vote_if_user_already_rated) {
|
237 |
-
$
|
|
|
238 |
}
|
239 |
|
240 |
} //End if user is logged
|
@@ -249,10 +222,11 @@ add_shortcode ('yasr_visitor_votes', 'shortcode_visitor_votes_callback');
|
|
249 |
if($cookie_value) {
|
250 |
$readonly = 'true';
|
251 |
if (YASR_TEXT_BEFORE_STARS == 1 && YASR_CUSTOM_TEXT_USER_VOTED!='') {
|
252 |
-
$
|
253 |
}
|
254 |
else {
|
255 |
-
$
|
|
|
256 |
}
|
257 |
}
|
258 |
|
@@ -272,7 +246,7 @@ add_shortcode ('yasr_visitor_votes', 'shortcode_visitor_votes_callback');
|
|
272 |
if(!is_user_logged_in()) {
|
273 |
|
274 |
$readonly = 'true'; //readonly is true if user isn't logged
|
275 |
-
$
|
276 |
|
277 |
}
|
278 |
|
@@ -305,30 +279,23 @@ add_shortcode ('yasr_visitor_votes', 'shortcode_visitor_votes_callback');
|
|
305 |
}
|
306 |
|
307 |
else {
|
308 |
-
|
309 |
$span_text_after_star = "<span class=\"yasr-total-average-container\" id=\"yasr-total-average-text_$post_id\">
|
310 |
[" . __("Total: ", 'yet-another-stars-rating') . "$votes_number " . __("Average: ",'yet-another-stars-rating') . "$medium_rating/5]
|
311 |
</span>";
|
312 |
|
313 |
}
|
314 |
|
315 |
-
|
316 |
|
317 |
-
|
318 |
-
$shortcode_html .= '<!--End Yasr Visitor Votes Shortcode-->';
|
319 |
-
|
320 |
-
}
|
321 |
-
|
322 |
-
else {
|
323 |
-
|
324 |
-
$shortcode_html .= "<div class=\"$stars_attribute[class]\" id=\"yasr_rateit_visitor_votes_$post_id\" data-postid=\"$post_id\" data-rateit-starwidth=\"$stars_attribute[px_size]\" data-rateit-starheight=\"$stars_attribute[px_size]\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"$readonly\"></div>";
|
325 |
-
|
326 |
-
}
|
327 |
|
|
|
328 |
$shortcode_html .= $span_dashicon;
|
329 |
$shortcode_html .= $span_text_after_star;
|
330 |
-
$shortcode_html .= $
|
331 |
-
$shortcode_html .=
|
|
|
332 |
$shortcode_html .= '<!--End Yasr Visitor Votes Shortcode-->';
|
333 |
|
334 |
//If overall rating in loop is enabled don't use is_singular && is main_query
|
@@ -438,20 +405,10 @@ add_shortcode ('yasr_multiset', 'shortcode_multi_set_callback');
|
|
438 |
|
439 |
$shortcode_html .= "<tr><td><span class=\"yasr-multi-set-name-field\">$set_content->name </span></td>";
|
440 |
|
441 |
-
|
442 |
-
|
443 |
-
$unique_id_identifier = $post_id . '_' . $setid . '_' . $set_content->id;
|
444 |
|
445 |
-
|
446 |
-
|
447 |
-
}
|
448 |
-
|
449 |
-
else {
|
450 |
-
|
451 |
-
$shortcode_html .= "<td><div class=\"rateit\" id=\"$set_content->id\" data-rateit-value=\"$set_content->vote\" data-rateit-step=\"0.5\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div></td>
|
452 |
-
</tr>";
|
453 |
-
|
454 |
-
}
|
455 |
|
456 |
$multiset_vote_sum = $multiset_vote_sum + $set_content->vote;
|
457 |
$multiset_rows_number++;
|
@@ -465,25 +422,15 @@ add_shortcode ('yasr_multiset', 'shortcode_multi_set_callback');
|
|
465 |
|
466 |
$average_txt = __("Average", "yet-another-stars-rating");
|
467 |
|
|
|
468 |
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
<span class='yasr-multiset-average-text'>$average_txt</span>
|
476 |
-
<div class='yasr-rater-stars' id=\"$average_unique_id_identifier\" data-rater-postid=\"$post_id\" data-rating=\"$multiset_average\" data-rater-starsize=\"24\"></div>
|
477 |
-
</td>
|
478 |
-
</tr>";
|
479 |
-
|
480 |
-
}
|
481 |
-
|
482 |
-
else {
|
483 |
-
|
484 |
-
$shortcode_html .= "<tr><td colspan=\"2\" class=\"yasr-multiset-average\">$average_txt<div class=\"rateit medium \" data-rateit-value=\"$multiset_average\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div></td></tr>";
|
485 |
|
486 |
-
}
|
487 |
|
488 |
}
|
489 |
|
@@ -526,7 +473,7 @@ add_shortcode ('yasr_visitor_multiset', 'yasr_visitor_multiset_callback');
|
|
526 |
|
527 |
$image = YASR_IMG_DIR . "/loader.gif";
|
528 |
$average_txt = __("Average", "yet-another-stars-rating");
|
529 |
-
$loader_html = "<span class=\"yasr-loader-multiset-visitor\" id=\"yasr-loader-multiset-visitor-$post_id-$setid\" > " .
|
530 |
$button_html = "<input type=\"submit\" name=\"submit\" id=\"yasr-send-visitor-multiset-$post_id-$setid\" class=\"button button-primary \" value=\"" . __('Submit!', 'yet-another-stars-rating') . " \" />";
|
531 |
$yasr_cookiename = 'yasr_multi_visitor_cookie';
|
532 |
|
@@ -607,15 +554,8 @@ add_shortcode ('yasr_visitor_multiset', 'yasr_visitor_multiset_callback');
|
|
607 |
$average_rating = 0;
|
608 |
}
|
609 |
|
610 |
-
|
611 |
-
|
612 |
-
$unique_id_identifier = 'yasr-visitor-multi-set-' . $post_id . '_' . $setid . '_' . $set_content->id;
|
613 |
-
$html_stars = "<div class=\"yasr-multiset-visitors-rater\" id=\"$unique_id_identifier\" data-rater-postid=\"$post_id\" data-rater-setid=\"$setid\" data-rater-set-field-id=\"$set_content->id\" data-rating=\"$average_rating\" data-rater-readonly=\"$star_readonly\" ></div>";
|
614 |
-
}
|
615 |
-
|
616 |
-
else{*/
|
617 |
-
$html_stars = "<div class=\"rateit yasr-visitor-multi-$post_id-$setid\" id=\"$set_content->id \" data-rateit-value=\"$average_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"$star_readonly\"></div>";
|
618 |
-
//}
|
619 |
|
620 |
$shortcode_html .= "<tr>
|
621 |
<td>
|
@@ -648,15 +588,8 @@ add_shortcode ('yasr_visitor_multiset', 'yasr_visitor_multiset_callback');
|
|
648 |
|
649 |
foreach ($set_name as $set_content) {
|
650 |
|
651 |
-
|
652 |
-
|
653 |
-
$unique_id_identifier = 'yasr-visitor-multi-set-' . $post_id . '_' . $setid . '_' . $set_content->id;
|
654 |
-
$html_stars = "<div class=\"yasr-multiset-visitors-rater\" id=\"$unique_id_identifier\" data-rater-postid=\"$post_id\" data-rater-setid=\"$setid\" data-rater-set-field-id=\"$set_content->id\" data-rating=0 data-rater-readonly=\"$star_readonly\" ></div>";
|
655 |
-
}
|
656 |
-
|
657 |
-
else{*/
|
658 |
-
$html_stars = "<div class=\"rateit yasr-visitor-multi-$post_id-$setid\" id=\"$set_content->id \" data-rateit-value=0 data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"$star_readonly\"></div>";
|
659 |
-
//}
|
660 |
|
661 |
$shortcode_html .= "<tr>
|
662 |
<td>
|
@@ -677,9 +610,11 @@ add_shortcode ('yasr_visitor_multiset', 'yasr_visitor_multiset_callback');
|
|
677 |
//Show average row
|
678 |
if ($show_average !== FALSE && $show_average !=='no'|| $show_average===FALSE && YASR_MULTI_SHOW_AVERAGE !== 'no') {
|
679 |
|
|
|
|
|
680 |
$shortcode_html .= "<tr>
|
681 |
<td colspan=\"2\" class=\"yasr-multiset-average\">
|
682 |
-
$average_txt<div class=\"
|
683 |
</td>
|
684 |
</tr>";
|
685 |
|
@@ -737,18 +672,9 @@ add_shortcode ('yasr_top_ten_highest_rated', 'yasr_top_ten_highest_rated_callbac
|
|
737 |
$post_title = get_the_title($result->post_id);
|
738 |
$link = get_permalink($result->post_id); //Get permalink from post it
|
739 |
|
740 |
-
|
741 |
-
|
742 |
-
$yasr_top_ten_html_id = 'yasr-top-ten-rater-' . $result->post_id;
|
743 |
-
$html_stars = "<div class=\"yasr-rater-stars\" id=\"$yasr_top_ten_html_id\" data-rater-postid=\"$result->post_id\" data-rater-starsize=\"24\" data-rating=\"$result->overall_rating\"></div>";
|
744 |
-
|
745 |
-
}
|
746 |
|
747 |
-
else {
|
748 |
-
|
749 |
-
$html_stars = "<div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$result->overall_rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>";
|
750 |
-
|
751 |
-
}
|
752 |
|
753 |
$shortcode_html .= "<tr>
|
754 |
<td width=\"60%\" class=\"yasr-top-10-overall-left\"><a href=\"$link\">$post_title</a></td>
|
@@ -831,19 +757,8 @@ add_shortcode ('yasr_most_or_highest_rated_posts', 'yasr_most_or_highest_rated_p
|
|
831 |
|
832 |
$link = get_permalink($result->post_id); //Get permalink from post it
|
833 |
|
834 |
-
|
835 |
-
|
836 |
-
$yasr_top_ten_html_id = 'yasr-10-most-rater' . $result->post_id;
|
837 |
-
|
838 |
-
$html_stars = "<div class=\"yasr-rater-stars\" id=\"$yasr_top_ten_html_id\" data-rater-postid=\"$result->post_id\" data-rater-starsize=\"24\" data-rating=\"$rating\"></div>";
|
839 |
-
|
840 |
-
}
|
841 |
-
|
842 |
-
else {
|
843 |
-
|
844 |
-
$html_stars ="<div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>";
|
845 |
-
|
846 |
-
}
|
847 |
|
848 |
$shortcode_html .= "<tr>
|
849 |
<td width=\"60%\" class=\"yasr-top-10-most-highest-left\"><a href=\"$link\">$post_title</a></td>
|
@@ -883,19 +798,8 @@ add_shortcode ('yasr_most_or_highest_rated_posts', 'yasr_most_or_highest_rated_p
|
|
883 |
|
884 |
$link = get_permalink($result->post_id); //Get permalink from post it
|
885 |
|
886 |
-
|
887 |
-
|
888 |
-
$yasr_top_ten_html_id = 'yasr-10-highest-rater-' . $result->post_id;
|
889 |
-
|
890 |
-
$html_stars = "<div class=\"yasr-rater-stars\" id=\"$yasr_top_ten_html_id\" data-rater-postid=\"$result->post_id\" data-rater-starsize=\"24\" data-rating=\"$rating\"></div>";
|
891 |
-
|
892 |
-
}
|
893 |
-
|
894 |
-
else {
|
895 |
-
|
896 |
-
$html_stars ="<div class=\"rateit medium\" data-rateit-starwidth=\"24\" data-rateit-starheight=\"24\" data-rateit-value=\"$rating\" data-rateit-step=\"0.1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"true\"></div>";
|
897 |
-
|
898 |
-
}
|
899 |
|
900 |
$shortcode_html .= "<tr>
|
901 |
<td width=\"60%\" class=\"yasr-top-10-most-highest-left\"><a href=\"$link\">$post_title</a></td>
|
@@ -918,12 +822,10 @@ add_shortcode ('yasr_most_or_highest_rated_posts', 'yasr_most_or_highest_rated_p
|
|
918 |
|
919 |
$shortcode_html .= '<!-- End Yasr Most Or Highest Rated Shortcode-->';
|
920 |
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
);
|
926 |
-
//}
|
927 |
|
928 |
return $shortcode_html;
|
929 |
|
52 |
|
53 |
$stars_attribute = yasr_stars_size($size);
|
54 |
|
55 |
+
$overall_rating_html_id = 'yasr-overall-rating-rater-' . $postid;
|
56 |
+
$html_stars = "<div class=\"yasr-rater-stars\" id=\"$overall_rating_html_id\" data-rater-postid=\"$postid\" data-rating=\"$overall_rating\" data-rater-starsize=\"$stars_attribute[px_size]\" ></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
if (YASR_TEXT_BEFORE_STARS == 1 && YASR_TEXT_BEFORE_OVERALL != '') {
|
59 |
|
146 |
//if this come from yasr_visitor_votes_readonly...
|
147 |
if ($readonly === TRUE || $readonly === "yes") {
|
148 |
|
149 |
+
$htmlid = 'yasr-visitor-votes-readonly-rater-'.$post_id;
|
150 |
+
$shortcode_html = "<div class=\"yasr-rater-stars-visitor-votes\" id=\"$htmlid\" data-rating=\"$medium_rating\" data-rater-starsize=\"$stars_attribute[px_size]\" data-rater-postid=\"$post_id\" data-rater-readonly=\"true\"></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
return $shortcode_html;
|
153 |
|
155 |
|
156 |
$ajax_nonce_visitor = wp_create_nonce( "yasr_nonce_insert_visitor_rating" );
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
//name of cookie to check
|
159 |
$yasr_cookiename = 'yasr_visitor_vote_cookie';
|
160 |
|
194 |
|
195 |
$shortcode_html = '<!--Yasr Visitor Votes Shortcode-->';
|
196 |
$shortcode_html .= "<div id=\"yasr_visitor_votes_$post_id\" class=\"yasr-visitor-votes\">";
|
197 |
+
$span_bottom_line = "";
|
198 |
|
199 |
//I've to check a logged in user that has already rated
|
200 |
if ( is_user_logged_in() ) {
|
206 |
|
207 |
//If user has already rated
|
208 |
if ($vote_if_user_already_rated) {
|
209 |
+
$span_bottom_line="<span class=\"yasr-small-block-bold yasr-already-voted-text \" id=\"yasr-user-vote-$post_id\" data-yasr-already-voted=\"$vote_if_user_already_rated\">"
|
210 |
+
. __("You've already voted this article with", 'yet-another-stars-rating') . " $vote_if_user_already_rated</span>";
|
211 |
}
|
212 |
|
213 |
} //End if user is logged
|
222 |
if($cookie_value) {
|
223 |
$readonly = 'true';
|
224 |
if (YASR_TEXT_BEFORE_STARS == 1 && YASR_CUSTOM_TEXT_USER_VOTED!='') {
|
225 |
+
$span_bottom_line="<span class=\"yasr-small-block-bold yasr-already-voted-text\">" . YASR_CUSTOM_TEXT_USER_VOTED . " </span>";;
|
226 |
}
|
227 |
else {
|
228 |
+
$span_bottom_line="<span class=\"yasr-small-block-bold yasr-already-voted-text \">"
|
229 |
+
. __("You've already voted this article with", 'yet-another-stars-rating') . " $cookie_value</span>";
|
230 |
}
|
231 |
}
|
232 |
|
246 |
if(!is_user_logged_in()) {
|
247 |
|
248 |
$readonly = 'true'; //readonly is true if user isn't logged
|
249 |
+
$span_bottom_line = "<span class=\"yasr-visitor-votes-must-sign-in\">" . __("You must sign in to vote", 'yet-another-stars-rating') . "</span>";
|
250 |
|
251 |
}
|
252 |
|
279 |
}
|
280 |
|
281 |
else {
|
282 |
+
|
283 |
$span_text_after_star = "<span class=\"yasr-total-average-container\" id=\"yasr-total-average-text_$post_id\">
|
284 |
[" . __("Total: ", 'yet-another-stars-rating') . "$votes_number " . __("Average: ",'yet-another-stars-rating') . "$medium_rating/5]
|
285 |
</span>";
|
286 |
|
287 |
}
|
288 |
|
289 |
+
$span_container_after_stars = "<span id=\"yasr-visitor-votes-container-after-stars-$post_id\" class='yasr-visitor-votes-after-stars-class'>";
|
290 |
|
291 |
+
$shortcode_html .= "<div id=\"yasr-visitor-votes-rater-$post_id\" class=\"yasr-rater-stars-visitor-votes\" data-rater-postid=\"$post_id\" data-rating=\"$medium_rating\" data-rater-starsize=\"$stars_attribute[px_size]\" data-rater-readonly=\"$readonly\" data-rater-nonce=\"$ajax_nonce_visitor\"></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
|
293 |
+
$shortcode_html .= $span_container_after_stars;
|
294 |
$shortcode_html .= $span_dashicon;
|
295 |
$shortcode_html .= $span_text_after_star;
|
296 |
+
$shortcode_html .= $span_bottom_line;
|
297 |
+
$shortcode_html .= '</span>'; //Close yasr-visitor-votes-after-stars and yasr_visitor_votes
|
298 |
+
$shortcode_html .= '</div>'; //close all
|
299 |
$shortcode_html .= '<!--End Yasr Visitor Votes Shortcode-->';
|
300 |
|
301 |
//If overall rating in loop is enabled don't use is_singular && is main_query
|
405 |
|
406 |
$shortcode_html .= "<tr><td><span class=\"yasr-multi-set-name-field\">$set_content->name </span></td>";
|
407 |
|
408 |
+
$unique_id_identifier = $post_id . '_' . $setid . '_' . $set_content->id;
|
|
|
|
|
409 |
|
410 |
+
$shortcode_html .= "<td><div class=\"yasr-rater-stars\" id=\"yasr-rater-multiset-$unique_id_identifier\" data-rater-postid=\"$post_id\" data-rating=\"$set_content->vote\" data-rater-starsize=\"16\"></div></td>
|
411 |
+
</tr>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
|
413 |
$multiset_vote_sum = $multiset_vote_sum + $set_content->vote;
|
414 |
$multiset_rows_number++;
|
422 |
|
423 |
$average_txt = __("Average", "yet-another-stars-rating");
|
424 |
|
425 |
+
$average_unique_id_identifier = 'yasr-multiset-average_' . $post_id . '_' . $setid;
|
426 |
|
427 |
+
$shortcode_html .= "<tr>
|
428 |
+
<td colspan='2' class='yasr-multiset-average'>
|
429 |
+
<span class='yasr-multiset-average-text'>$average_txt</span>
|
430 |
+
<div class='yasr-rater-stars' id=\"$average_unique_id_identifier\" data-rater-postid=\"$post_id\" data-rating=\"$multiset_average\" data-rater-starsize=\"24\"></div>
|
431 |
+
</td>
|
432 |
+
</tr>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
|
|
|
434 |
|
435 |
}
|
436 |
|
473 |
|
474 |
$image = YASR_IMG_DIR . "/loader.gif";
|
475 |
$average_txt = __("Average", "yet-another-stars-rating");
|
476 |
+
$loader_html = "<span class=\"yasr-loader-multiset-visitor\" id=\"yasr-loader-multiset-visitor-$post_id-$setid\" > " . ' <img src=' . "$image" .' title="yasr-loader" alt="yasr-loader"></span>';
|
477 |
$button_html = "<input type=\"submit\" name=\"submit\" id=\"yasr-send-visitor-multiset-$post_id-$setid\" class=\"button button-primary \" value=\"" . __('Submit!', 'yet-another-stars-rating') . " \" />";
|
478 |
$yasr_cookiename = 'yasr_multi_visitor_cookie';
|
479 |
|
554 |
$average_rating = 0;
|
555 |
}
|
556 |
|
557 |
+
$unique_id_identifier = 'yasr-visitor-multi-set-' . $post_id . '_' . $setid . '_' . $set_content->id;
|
558 |
+
$html_stars = "<div class=\"yasr-multiset-visitors-rater\" id=\"$unique_id_identifier\" data-rater-postid=\"$post_id\" data-rater-setid=\"$setid\" data-rater-set-field-id=\"$set_content->id\" data-rating=\"$average_rating\" data-rater-readonly=\"$star_readonly\" ></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
559 |
|
560 |
$shortcode_html .= "<tr>
|
561 |
<td>
|
588 |
|
589 |
foreach ($set_name as $set_content) {
|
590 |
|
591 |
+
$unique_id_identifier = 'yasr-visitor-multi-set-' . $post_id . '_' . $setid . '_' . $set_content->id;
|
592 |
+
$html_stars = "<div class=\"yasr-multiset-visitors-rater\" id=\"$unique_id_identifier\" data-rater-postid=\"$post_id\" data-rater-setid=\"$setid\" data-rater-set-field-id=\"$set_content->id\" data-rating=0 data-rater-readonly=\"$star_readonly\" ></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
|
594 |
$shortcode_html .= "<tr>
|
595 |
<td>
|
610 |
//Show average row
|
611 |
if ($show_average !== FALSE && $show_average !=='no'|| $show_average===FALSE && YASR_MULTI_SHOW_AVERAGE !== 'no') {
|
612 |
|
613 |
+
$unique_id_identifier = 'yasr-visitor-multi-set-average' . $post_id . '_' . $setid;
|
614 |
+
|
615 |
$shortcode_html .= "<tr>
|
616 |
<td colspan=\"2\" class=\"yasr-multiset-average\">
|
617 |
+
$average_txt<div class=\"yasr-multiset-visitors-rater\" id=\"$unique_id_identifier\" data-rater-postid=\"$post_id\" data-rater-setid=\"$setid\" data-rater-set-field-id=\"$set_content->id\" data-rating=\"$multiset_average\" data-rater-readonly=\"true\" ></div>
|
618 |
</td>
|
619 |
</tr>";
|
620 |
|
672 |
$post_title = get_the_title($result->post_id);
|
673 |
$link = get_permalink($result->post_id); //Get permalink from post it
|
674 |
|
675 |
+
$yasr_top_ten_html_id = 'yasr-top-ten-rater-' . $result->post_id;
|
676 |
+
$html_stars = "<div class=\"yasr-rater-stars\" id=\"$yasr_top_ten_html_id\" data-rater-postid=\"$result->post_id\" data-rater-starsize=\"24\" data-rating=\"$result->overall_rating\"></div>";
|
|
|
|
|
|
|
|
|
677 |
|
|
|
|
|
|
|
|
|
|
|
678 |
|
679 |
$shortcode_html .= "<tr>
|
680 |
<td width=\"60%\" class=\"yasr-top-10-overall-left\"><a href=\"$link\">$post_title</a></td>
|
757 |
|
758 |
$link = get_permalink($result->post_id); //Get permalink from post it
|
759 |
|
760 |
+
$yasr_top_ten_html_id = 'yasr-10-most-rater' . $result->post_id;
|
761 |
+
$html_stars = "<div class=\"yasr-rater-stars\" id=\"$yasr_top_ten_html_id\" data-rater-postid=\"$result->post_id\" data-rater-starsize=\"24\" data-rating=\"$rating\"></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
762 |
|
763 |
$shortcode_html .= "<tr>
|
764 |
<td width=\"60%\" class=\"yasr-top-10-most-highest-left\"><a href=\"$link\">$post_title</a></td>
|
798 |
|
799 |
$link = get_permalink($result->post_id); //Get permalink from post it
|
800 |
|
801 |
+
$yasr_top_ten_html_id = 'yasr-10-highest-rater-' . $result->post_id;
|
802 |
+
$html_stars = "<div class=\"yasr-rater-stars\" id=\"$yasr_top_ten_html_id\" data-rater-postid=\"$result->post_id\" data-rater-starsize=\"24\" data-rating=\"$rating\"></div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
803 |
|
804 |
$shortcode_html .= "<tr>
|
805 |
<td width=\"60%\" class=\"yasr-top-10-most-highest-left\"><a href=\"$link\">$post_title</a></td>
|
822 |
|
823 |
$shortcode_html .= '<!-- End Yasr Most Or Highest Rated Shortcode-->';
|
824 |
|
825 |
+
wp_localize_script( 'yasrfront', "yasrMostHighestRanking", array(
|
826 |
+
'enable' => 'yes'
|
827 |
+
)
|
828 |
+
);
|
|
|
|
|
829 |
|
830 |
return $shortcode_html;
|
831 |
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
3 |
Tags: ratings, rating, postrating, google rating, 5 star, review, reviews, star rating, vote, votes
|
4 |
Requires at least: 4.3.0
|
5 |
Contributors: Dudo
|
6 |
-
Tested up to: 5.0
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 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!
|
@@ -13,7 +13,7 @@ Boost the way people interact with your website, e-commerce or blog with an easy
|
|
13 |
== Description ==
|
14 |
Improving the user experience (UX) with your website is a top priority for everyone who cares about their online activity, as it promotes familiarity and loyalty with your brand, and enhances visibility of your activity.
|
15 |
|
16 |
-
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.
|
17 |
|
18 |
= How To use =
|
19 |
|
@@ -116,10 +116,14 @@ If doesn't, it's suggested to ask in a SEO oriented forum.
|
|
116 |
|
117 |
The full changelog can be found in the plugin's directory. Recent entries:
|
118 |
|
|
|
|
|
|
|
|
|
|
|
119 |
= 1.7.4 =
|
120 |
* Css fixes
|
121 |
|
122 |
-
|
123 |
= 1.7.3 =
|
124 |
* FIXED: Multi set's field name is now 40 chars long instead of 23
|
125 |
* TWEAKED: progress bars doesn't use jquery anymore, it's css only
|
@@ -183,8 +187,8 @@ You can enable/disable this in every moment in the settings
|
|
183 |
* FIXED: javascript noticies
|
184 |
|
185 |
= Additional Info =
|
186 |
-
External Libraries: [Rater](https://github.com/fredolss/rater-js)
|
187 |
[tippy](https://atomiks.github.io/tippyjs/)
|
188 |
|
189 |
Svg star icon made by [Freepik](http://www.freepik.com)
|
190 |
-
from [www.flaticon.com](https://www.flaticon.com/) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)
|
3 |
Tags: ratings, rating, postrating, google rating, 5 star, review, reviews, star rating, vote, votes
|
4 |
Requires at least: 4.3.0
|
5 |
Contributors: Dudo
|
6 |
+
Tested up to: 5.0.2
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 1.8.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!
|
13 |
== Description ==
|
14 |
Improving the user experience (UX) with your website is a top priority for everyone who cares about their online activity, as it promotes familiarity and loyalty with your brand, and enhances visibility of your activity.
|
15 |
|
16 |
+
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.
|
17 |
|
18 |
= How To use =
|
19 |
|
116 |
|
117 |
The full changelog can be found in the plugin's directory. Recent entries:
|
118 |
|
119 |
+
= 1.8.0 =
|
120 |
+
* This is a very important release. A lot of code has been cleaned up/rewritten. Images are not png anymore, but svg.
|
121 |
+
Everthing is now fresher and even more lightweight then before. If you customized your stars set, check it again in the settings.
|
122 |
+
|
123 |
+
|
124 |
= 1.7.4 =
|
125 |
* Css fixes
|
126 |
|
|
|
127 |
= 1.7.3 =
|
128 |
* FIXED: Multi set's field name is now 40 chars long instead of 23
|
129 |
* TWEAKED: progress bars doesn't use jquery anymore, it's css only
|
187 |
* FIXED: javascript noticies
|
188 |
|
189 |
= Additional Info =
|
190 |
+
External Libraries: [Rater](https://github.com/fredolss/rater-js)
|
191 |
[tippy](https://atomiks.github.io/tippyjs/)
|
192 |
|
193 |
Svg star icon made by [Freepik](http://www.freepik.com)
|
194 |
+
from [www.flaticon.com](https://www.flaticon.com/) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)
|
yasr-metabox-multiple-rating.php
CHANGED
@@ -20,7 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
20 |
|
21 |
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
|
22 |
|
23 |
-
$multi_set=yasr_get_multi_set();
|
|
|
|
|
24 |
|
25 |
$ajax_nonce_multi = wp_create_nonce( "yasr_nonce_insert_multi_rating" );
|
26 |
|
@@ -30,7 +32,7 @@ global $wpdb;
|
|
30 |
|
31 |
$n_multi_set = $wpdb->num_rows; //wpdb->num_rows always store the the count number of rows of the last query
|
32 |
|
33 |
-
if ($n_multi_set>1) {
|
34 |
|
35 |
_e("Choose wich set you want to use", 'yet-another-stars-rating');
|
36 |
|
@@ -52,52 +54,51 @@ if ($n_multi_set>1) {
|
|
52 |
|
53 |
} //End if if ($n_multi_set>1)
|
54 |
|
55 |
-
elseif ($n_multi_set
|
56 |
-
|
57 |
-
foreach ($multi_set as $set) {
|
58 |
-
|
59 |
-
$set_id = $set->set_id;
|
60 |
|
61 |
-
|
|
|
|
|
|
|
62 |
|
63 |
}
|
64 |
|
65 |
|
66 |
?>
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
jQuery(document).ready(function() {
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
var nonceMulti = <?php echo (json_encode("$ajax_nonce_multi")); ?>
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
|
|
|
|
83 |
|
84 |
-
|
|
|
|
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
89 |
|
90 |
-
|
91 |
|
|
|
92 |
|
93 |
-
|
|
|
|
|
|
|
94 |
|
95 |
-
|
96 |
|
97 |
-
|
98 |
-
<p>
|
99 |
-
<span id="yasr_rateit_multi_rating">
|
100 |
|
101 |
-
|
102 |
-
</p>
|
103 |
-
</div>
|
20 |
|
21 |
if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
|
22 |
|
23 |
+
$multi_set = yasr_get_multi_set();
|
24 |
+
|
25 |
+
$post_id = get_the_ID();
|
26 |
|
27 |
$ajax_nonce_multi = wp_create_nonce( "yasr_nonce_insert_multi_rating" );
|
28 |
|
32 |
|
33 |
$n_multi_set = $wpdb->num_rows; //wpdb->num_rows always store the the count number of rows of the last query
|
34 |
|
35 |
+
if ($n_multi_set > 1) {
|
36 |
|
37 |
_e("Choose wich set you want to use", 'yet-another-stars-rating');
|
38 |
|
54 |
|
55 |
} //End if if ($n_multi_set>1)
|
56 |
|
57 |
+
elseif ($n_multi_set === 1) {
|
|
|
|
|
|
|
|
|
58 |
|
59 |
+
//If multiset is only 1, array index will be always 0
|
60 |
+
//get the set_id
|
61 |
+
$set_id = $multi_set[0]->set_id;
|
62 |
+
$set_id = (int)$set_id;
|
63 |
|
64 |
}
|
65 |
|
66 |
|
67 |
?>
|
68 |
|
69 |
+
<div id="yasr_rateit_multi_rating">
|
|
|
|
|
70 |
|
71 |
+
<span id="yasr-multi-set-admin-choose-text">
|
72 |
+
<?php _e( 'Choose a vote for each element', 'yet-another-stars-rating' ); ?>
|
73 |
+
</span>
|
|
|
|
|
74 |
|
75 |
+
<table class="yasr_table_multi_set_admin" id="yasr-table-multi-set-admin">
|
76 |
|
77 |
+
</table>
|
78 |
|
79 |
+
<div id="yasr-multi-set-admin-explain">
|
80 |
+
<?php _e( "If you want to insert this multiset, paste this shortcode", 'yet-another-stars-rating' ); ?>
|
81 |
+
<span id="yasr-multi-set-admin-explain-with-id-readonly"></span>. <br />
|
82 |
|
83 |
+
<?php _e( "If, instead, you want allow your visitor to vote on this multiset, use this shortcode", 'yet-another-stars-rating' ); ?>
|
84 |
+
<span id='yasr-multi-set-admin-explain-with-id-visitor'></span>.
|
85 |
+
<?php _e('In this case, you don\'t need to vote here', 'yet-another-stars-rating');?> <br />
|
86 |
|
87 |
+
</div>
|
88 |
|
89 |
+
</div>
|
90 |
|
91 |
+
<script type="text/javascript">
|
92 |
|
93 |
+
document.addEventListener('DOMContentLoaded', function(event) {
|
94 |
|
95 |
+
var nMultiSet = <?php echo (json_encode("$n_multi_set")); ?>;
|
96 |
+
var postid = <?php echo (the_ID()); ?>;
|
97 |
+
var setId = <?php echo( json_encode( "$set_id" ) ); ?>;
|
98 |
+
var nonceMulti = <?php echo (json_encode("$ajax_nonce_multi")); ?>
|
99 |
|
100 |
+
yasrAdminMultiSet(nMultiSet, postid, setId, nonceMulti);
|
101 |
|
102 |
+
});
|
|
|
|
|
103 |
|
104 |
+
</script>
|
|
|
|
yasr-metabox-top-right.php
CHANGED
@@ -74,18 +74,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
74 |
<?php _e("Rate this article / item", 'yet-another-stars-rating'); ?>
|
75 |
</span>
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
<div id="yasr-rater-overall" >
|
80 |
-
</div>
|
81 |
-
|
82 |
-
<?php } else { ?>
|
83 |
-
|
84 |
-
<div class="rateit bigstars" id="yasr_rateit_overall" data-rateit-starwidth="32" data-rateit-starheight="32" data-rateit-value="<?php echo $overall_rating ?>" data-rateit-step="0.1" data-rateit-resetable="true" data-rateit-readonly="false">
|
85 |
-
</div>
|
86 |
-
|
87 |
-
<?php } ?>
|
88 |
-
|
89 |
|
90 |
<div id="loader-overall-rating" style="display:none;" > <?php _e("Loading, please wait",'yet-another-stars-rating'); ?><img src="<?php echo YASR_IMG_DIR . "/loader.gif" ?>">
|
91 |
</div>
|
@@ -268,9 +258,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
268 |
|
269 |
var overallRating = <?php echo (json_encode($overall_rating)); ?>
|
270 |
|
271 |
-
|
272 |
-
|
273 |
-
yasrDisplayTopRightMetabox(defaultbox, postid, nonceOverall, nonceSnippet, overallRating, jqueryDisabled);
|
274 |
|
275 |
}); //End document ready
|
276 |
|
74 |
<?php _e("Rate this article / item", 'yet-another-stars-rating'); ?>
|
75 |
</span>
|
76 |
|
77 |
+
<div id="yasr-rater-overall" >
|
78 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
<div id="loader-overall-rating" style="display:none;" > <?php _e("Loading, please wait",'yet-another-stars-rating'); ?><img src="<?php echo YASR_IMG_DIR . "/loader.gif" ?>">
|
81 |
</div>
|
258 |
|
259 |
var overallRating = <?php echo (json_encode($overall_rating)); ?>
|
260 |
|
261 |
+
yasrDisplayTopRightMetabox(defaultbox, postid, nonceOverall, nonceSnippet, overallRating);
|
|
|
|
|
262 |
|
263 |
}); //End document ready
|
264 |
|
yasr-settings-page.php
CHANGED
@@ -106,7 +106,7 @@ $n_multi_set = NULL; //Evoid undefined variable when printed outside multiset ta
|
|
106 |
} //End if tab 'general_settings'
|
107 |
|
108 |
|
109 |
-
if ($active_tab
|
110 |
|
111 |
global $wpdb;
|
112 |
|
106 |
} //End if tab 'general_settings'
|
107 |
|
108 |
|
109 |
+
if ($active_tab === 'manage_multi') {
|
110 |
|
111 |
global $wpdb;
|
112 |
|
yet-another-stars-rating.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
/**
|
4 |
* Plugin Name: Yet Another Stars Rating
|
5 |
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
|
6 |
-
* Description: Yet Another Stars Rating
|
7 |
-
* Version: 1.
|
8 |
* Author: Dario Curvino
|
9 |
* Author URI: https://yetanotherstarsrating.com/
|
10 |
* Text Domain: yet-another-stars-rating
|
@@ -77,7 +77,7 @@ if ( !function_exists( 'yasr_fs' ) ) {
|
|
77 |
yasr_fs();
|
78 |
// Signal that SDK was initiated.
|
79 |
do_action( 'yasr_fs_loaded' );
|
80 |
-
define( 'YASR_VERSION_NUM', '1.
|
81 |
//Plugin relative path
|
82 |
define( "YASR_ABSOLUTE_PATH", dirname( __FILE__ ) );
|
83 |
//Plugin RELATIVE PATH without slashes (just the directory's name)
|
@@ -140,9 +140,9 @@ if ( !function_exists( 'yasr_fs' ) ) {
|
|
140 |
}
|
141 |
}
|
142 |
define( "YASR_METABOX_OVERALL_RATING", $yasr_stored_options['metabox_overall_rating'] );
|
143 |
-
define( "YASR_JQUERY_DISABLED", $yasr_stored_options['disable_jquery'] );
|
144 |
//Get stored style options
|
145 |
$style_options = get_option( 'yasr_style_options' );
|
|
|
146 |
|
147 |
if ( $style_options ) {
|
148 |
|
@@ -186,15 +186,17 @@ if ( !function_exists( 'yasr_fs' ) ) {
|
|
186 |
/****** End Getting options ******/
|
187 |
// Include function file
|
188 |
require YASR_ABSOLUTE_PATH . '/lib/yasr-functions.php';
|
189 |
-
require YASR_ABSOLUTE_PATH . '/lib/yasr-admin-actions.php';
|
190 |
-
require YASR_ABSOLUTE_PATH . '/lib/yasr-settings-functions.php';
|
191 |
require YASR_ABSOLUTE_PATH . '/lib/yasr-db-functions.php';
|
192 |
require YASR_ABSOLUTE_PATH . '/lib/yasr-ajax-functions.php';
|
193 |
require YASR_ABSOLUTE_PATH . '/lib/yasr-shortcode-functions.php';
|
194 |
-
|
195 |
if ( is_admin() ) {
|
|
|
|
|
|
|
196 |
require YASR_ABSOLUTE_PATH . '/lib/class-wp-list-table.php';
|
197 |
}
|
|
|
198 |
global $wpdb ;
|
199 |
define( "YASR_VOTES_TABLE", $wpdb->prefix . 'yasr_votes' );
|
200 |
//Used in background
|
@@ -241,33 +243,6 @@ if ( !function_exists( 'yasr_fs' ) ) {
|
|
241 |
update_option( 'yasr_general_options', $yasr_stored_options );
|
242 |
}
|
243 |
|
244 |
-
//Remove end DECEMBER 2018
|
245 |
-
//This is a very important update: yasr_votes table will not be used anymore, using post meta instead
|
246 |
-
|
247 |
-
if ( $yasr_version_installed && $yasr_version_installed < '1.3.5' ) {
|
248 |
-
$overall_rating_array = $wpdb->get_results( "SELECT post_id, overall_rating, review_type\n FROM " . YASR_VOTES_TABLE . "\n WHERE overall_rating > 0\n OR review_type IS NOT NULL\n ORDER BY post_id ASC" );
|
249 |
-
foreach ( $overall_rating_array as $rating ) {
|
250 |
-
//add post meta only if overall rating is > 0
|
251 |
-
if ( $rating->overall_rating > 0 ) {
|
252 |
-
add_post_meta(
|
253 |
-
$rating->post_id,
|
254 |
-
'yasr_overall_rating',
|
255 |
-
$rating->overall_rating,
|
256 |
-
true
|
257 |
-
);
|
258 |
-
}
|
259 |
-
//add review type only if is not empty
|
260 |
-
if ( $rating->review_type != '' ) {
|
261 |
-
add_post_meta(
|
262 |
-
$rating->post_id,
|
263 |
-
'yasr_review_type',
|
264 |
-
$rating->review_type,
|
265 |
-
true
|
266 |
-
);
|
267 |
-
}
|
268 |
-
}
|
269 |
-
}
|
270 |
-
|
271 |
/****** End backward compatibility functions ******/
|
272 |
if ( $yasr_version_installed != YASR_VERSION_NUM ) {
|
273 |
update_option( 'yasr-version', YASR_VERSION_NUM );
|
3 |
/**
|
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: 1.8.0
|
8 |
* Author: Dario Curvino
|
9 |
* Author URI: https://yetanotherstarsrating.com/
|
10 |
* Text Domain: yet-another-stars-rating
|
77 |
yasr_fs();
|
78 |
// Signal that SDK was initiated.
|
79 |
do_action( 'yasr_fs_loaded' );
|
80 |
+
define( 'YASR_VERSION_NUM', '1.8.0' );
|
81 |
//Plugin relative path
|
82 |
define( "YASR_ABSOLUTE_PATH", dirname( __FILE__ ) );
|
83 |
//Plugin RELATIVE PATH without slashes (just the directory's name)
|
140 |
}
|
141 |
}
|
142 |
define( "YASR_METABOX_OVERALL_RATING", $yasr_stored_options['metabox_overall_rating'] );
|
|
|
143 |
//Get stored style options
|
144 |
$style_options = get_option( 'yasr_style_options' );
|
145 |
+
global $style_options ;
|
146 |
|
147 |
if ( $style_options ) {
|
148 |
|
186 |
/****** End Getting options ******/
|
187 |
// Include function file
|
188 |
require YASR_ABSOLUTE_PATH . '/lib/yasr-functions.php';
|
|
|
|
|
189 |
require YASR_ABSOLUTE_PATH . '/lib/yasr-db-functions.php';
|
190 |
require YASR_ABSOLUTE_PATH . '/lib/yasr-ajax-functions.php';
|
191 |
require YASR_ABSOLUTE_PATH . '/lib/yasr-shortcode-functions.php';
|
192 |
+
|
193 |
if ( is_admin() ) {
|
194 |
+
require YASR_ABSOLUTE_PATH . '/lib/yasr-admin-actions.php';
|
195 |
+
require YASR_ABSOLUTE_PATH . '/lib/settings/yasr-settings-functions.php';
|
196 |
+
require YASR_ABSOLUTE_PATH . '/lib/yasr-widgets.php';
|
197 |
require YASR_ABSOLUTE_PATH . '/lib/class-wp-list-table.php';
|
198 |
}
|
199 |
+
|
200 |
global $wpdb ;
|
201 |
define( "YASR_VOTES_TABLE", $wpdb->prefix . 'yasr_votes' );
|
202 |
//Used in background
|
243 |
update_option( 'yasr_general_options', $yasr_stored_options );
|
244 |
}
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
/****** End backward compatibility functions ******/
|
247 |
if ( $yasr_version_installed != YASR_VERSION_NUM ) {
|
248 |
update_option( 'yasr-version', YASR_VERSION_NUM );
|