Version Description
Revamp wp-admin styles: Crowdsignal dashboard
Download this release
Release Info
Developer | donncha |
Plugin | Crowdsignal Dashboard – Polls, Surveys & more |
Version | 3.0.6 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.0.6
- admin-styles.css +529 -0
- css/polldaddy.css +0 -9
- partials/html-admin-setup-footer.php +29 -0
- partials/html-admin-setup-header.php +53 -0
- partials/html-admin-setup-step-1.php +90 -0
- partials/html-admin-setup-step-2.php +25 -0
- partials/html-admin-setup-step-3.php +50 -0
- partials/html-admin-teaser.php +77 -0
- partials/polls-table.php +1 -1
- partials/settings-2.php +165 -0
- partials/settings.php +132 -219
- polldaddy-client.php +15 -17
- polldaddy-org.php +2 -8
- polldaddy.php +400 -24
- rating.php +9 -8
- readme.txt +41 -75
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
admin-styles.css
ADDED
@@ -0,0 +1,529 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@font-face {
|
2 |
+
font-family: Recoleta;
|
3 |
+
src: url( "https://s1.wp.com/i/fonts/recoleta/400.woff2" );
|
4 |
+
}
|
5 |
+
|
6 |
+
@font-face {
|
7 |
+
font-family: Recoleta;
|
8 |
+
src: url( "https://s1.wp.com/i/fonts/recoleta/500.woff2" );
|
9 |
+
font-weight: 500;
|
10 |
+
}
|
11 |
+
|
12 |
+
@font-face {
|
13 |
+
font-family: Recoleta;
|
14 |
+
src: url( "https://s1.wp.com/i/fonts/recoleta/700.woff2" );
|
15 |
+
font-weight: 700;
|
16 |
+
}
|
17 |
+
|
18 |
+
#cs-plugin-container {
|
19 |
+
min-height: 100vh;
|
20 |
+
}
|
21 |
+
|
22 |
+
#cs-plugin-container .wrap {
|
23 |
+
margin: 0 auto;
|
24 |
+
max-width:45rem;
|
25 |
+
padding: 0 1.5rem;
|
26 |
+
}
|
27 |
+
#cs-plugin-container.is-wide .wrap {
|
28 |
+
max-width: 1040px;
|
29 |
+
}
|
30 |
+
#cs-plugin-container .wrap .jetpack-wrap-container {
|
31 |
+
margin-top: 1em;
|
32 |
+
}
|
33 |
+
|
34 |
+
.cs-lower {
|
35 |
+
margin: 0 auto;
|
36 |
+
text-align: left;
|
37 |
+
max-width: 65rem;
|
38 |
+
padding: 1.5rem;
|
39 |
+
}
|
40 |
+
|
41 |
+
.cs-footer {
|
42 |
+
text-align: center;
|
43 |
+
margin: 1rem 0 2rem;
|
44 |
+
}
|
45 |
+
|
46 |
+
.cs-footer__a8c-attr-container {
|
47 |
+
margin-bottom: .5rem;
|
48 |
+
}
|
49 |
+
|
50 |
+
.cs-footer__a8c-attr {
|
51 |
+
width: 11.25rem;
|
52 |
+
}
|
53 |
+
|
54 |
+
.cs-footer__a8c-attr a {
|
55 |
+
color: #2271b1;
|
56 |
+
}
|
57 |
+
|
58 |
+
.cs-footer__links {
|
59 |
+
border-top: 1px #e1e1e1 solid;
|
60 |
+
border-bottom: 1px #e1e1e1 solid;
|
61 |
+
margin-top: 0;
|
62 |
+
margin-bottom: 1rem;
|
63 |
+
}
|
64 |
+
|
65 |
+
.cs-footer__link-item {
|
66 |
+
display: inline-block;
|
67 |
+
}
|
68 |
+
|
69 |
+
.cs-footer__link {
|
70 |
+
color: #888;
|
71 |
+
padding: 1rem .5rem;
|
72 |
+
color: #888;
|
73 |
+
display: inline-block;
|
74 |
+
cursor: pointer;
|
75 |
+
}
|
76 |
+
|
77 |
+
.cs-footer__link:hover, .cs-footer__link:active {
|
78 |
+
color: #272727;
|
79 |
+
}
|
80 |
+
|
81 |
+
.cs-footer__link:visited {
|
82 |
+
color: #888;
|
83 |
+
}
|
84 |
+
|
85 |
+
.wp-admin #dolly {
|
86 |
+
float: none;
|
87 |
+
position: relative;
|
88 |
+
right: 0;
|
89 |
+
left: 0;
|
90 |
+
top: 0;
|
91 |
+
padding: .625rem;
|
92 |
+
text-align: right;
|
93 |
+
background: #fff;
|
94 |
+
font-size: .75rem;
|
95 |
+
font-style: italic;
|
96 |
+
color: #87a6bc;
|
97 |
+
border-bottom: 1px #e9eff3 solid;
|
98 |
+
}
|
99 |
+
|
100 |
+
.crowdsignal-setup__header {
|
101 |
+
background-color: #fff;
|
102 |
+
text-align: center;
|
103 |
+
box-shadow: 0 1px 0 #ccd0d4,0 1px 1px 1px rgba(0,0,0,0.04);
|
104 |
+
margin-left: -20px;
|
105 |
+
margin-right: -20px;
|
106 |
+
margin-bottom: 8px;
|
107 |
+
}
|
108 |
+
|
109 |
+
.crowdsignal-setup__header-container {
|
110 |
+
display: flex;
|
111 |
+
flex-wrap: wrap;
|
112 |
+
padding-bottom: .375rem;
|
113 |
+
padding-left: 16px;
|
114 |
+
}
|
115 |
+
|
116 |
+
.crowdsignal-settings-wrap {
|
117 |
+
max-width: 960px;
|
118 |
+
margin: 0 auto;
|
119 |
+
}
|
120 |
+
|
121 |
+
.crowdsignal-setup__logo-container {
|
122 |
+
flex-grow: 0;
|
123 |
+
flex-shrink: 0;
|
124 |
+
padding: .6875rem 0 0;
|
125 |
+
display: inline-block;
|
126 |
+
}
|
127 |
+
|
128 |
+
.crowdsignal-setup__email-activation {
|
129 |
+
font-size: 16px !important;
|
130 |
+
font-style: italic;
|
131 |
+
}
|
132 |
+
|
133 |
+
.crowdsignal-setup__footer {
|
134 |
+
text-align: center;
|
135 |
+
margin: 100px -20px 2rem;
|
136 |
+
}
|
137 |
+
|
138 |
+
.crowdsignal-setup__footer-container {
|
139 |
+
margin-bottom: .5rem;
|
140 |
+
}
|
141 |
+
|
142 |
+
.crowdsignal-setup__footer-attr {
|
143 |
+
width: 11.25rem;
|
144 |
+
}
|
145 |
+
|
146 |
+
.crowdsignal-setup__footer-links {
|
147 |
+
border-top: 1px #e1e1e1 solid;
|
148 |
+
border-bottom: 1px #e1e1e1 solid;
|
149 |
+
margin-top: 0;
|
150 |
+
margin-bottom: 1rem;
|
151 |
+
}
|
152 |
+
|
153 |
+
.crowdsignal-setup__footer-item {
|
154 |
+
display: inline-block;
|
155 |
+
margin-bottom: 0;
|
156 |
+
}
|
157 |
+
|
158 |
+
.crowdsignal-setup__footer-link {
|
159 |
+
padding: 1rem .5rem;
|
160 |
+
color: #888;
|
161 |
+
display: inline-block;
|
162 |
+
cursor: pointer;
|
163 |
+
}
|
164 |
+
|
165 |
+
.crowdsignal-setup__main {
|
166 |
+
background-color: #fff;
|
167 |
+
display: flex;
|
168 |
+
flex-direction: column;
|
169 |
+
align-content: center;
|
170 |
+
margin: 24px auto 0;
|
171 |
+
border: 1px solid rgba(213, 213, 213, 0.5);
|
172 |
+
max-width: 960px;
|
173 |
+
}
|
174 |
+
|
175 |
+
.crowdsignal-setup__main img {
|
176 |
+
width: 100%;
|
177 |
+
height: auto;
|
178 |
+
max-height: 150px;
|
179 |
+
}
|
180 |
+
|
181 |
+
.crowdsignal-setup__content {
|
182 |
+
padding: 0 20px 20px;
|
183 |
+
text-align: center;
|
184 |
+
display: flex;
|
185 |
+
flex-direction: column;
|
186 |
+
justify-content: space-around;
|
187 |
+
min-height: 400px;
|
188 |
+
margin: 40px 0;
|
189 |
+
}
|
190 |
+
|
191 |
+
.crowdsignal-setup__content p {
|
192 |
+
font-size: 18px;
|
193 |
+
max-width: 800px;
|
194 |
+
margin: 0 auto;
|
195 |
+
}
|
196 |
+
|
197 |
+
.cs-card h3,
|
198 |
+
.cs-card h4 {
|
199 |
+
font-family: Recoleta, sans-serif;
|
200 |
+
font-weight: 700;
|
201 |
+
font-size: 20px;
|
202 |
+
line-height: 150%;
|
203 |
+
margin: 0;
|
204 |
+
margin: 0 0 10px 0;
|
205 |
+
}
|
206 |
+
|
207 |
+
.crowdsignal-setup__content h4 {
|
208 |
+
font-size: 34px;
|
209 |
+
line-height: 140%;
|
210 |
+
}
|
211 |
+
|
212 |
+
.crowdsignal-setup__button {
|
213 |
+
margin: 0 auto;
|
214 |
+
background-color: #c9356e;
|
215 |
+
border-color: #8c1749;
|
216 |
+
color: #ffffff;
|
217 |
+
font-weight: 500;
|
218 |
+
align-items: center;
|
219 |
+
border-radius: 5px;
|
220 |
+
border-style: solid;
|
221 |
+
border-width: 1px 1px 2px;
|
222 |
+
box-sizing: border-box;
|
223 |
+
cursor: pointer;
|
224 |
+
display: inline-flex;
|
225 |
+
font-size: 14px;
|
226 |
+
height: 32px;
|
227 |
+
justify-content: center;
|
228 |
+
line-height: 24px;
|
229 |
+
outline: 0;
|
230 |
+
padding: 3px 15px 2px;
|
231 |
+
text-align: center;
|
232 |
+
transition: background-color .1s ease-out, border-color .1s ease-out;
|
233 |
+
white-space: nowrap;
|
234 |
+
width: fit-content;
|
235 |
+
min-width: 200px;
|
236 |
+
}
|
237 |
+
|
238 |
+
.crowdsignal-setup__button:hover {
|
239 |
+
background-color: #eb6594;
|
240 |
+
}
|
241 |
+
|
242 |
+
.crowdsignal-setup__support {
|
243 |
+
font-size: 14px;
|
244 |
+
}
|
245 |
+
|
246 |
+
.crowdsignal-setup__top {
|
247 |
+
margin-top: 32px;
|
248 |
+
}
|
249 |
+
|
250 |
+
.crowdsignal-setup__middle {
|
251 |
+
min-height: 100px;
|
252 |
+
margin-right: auto;
|
253 |
+
margin-left: auto;
|
254 |
+
padding-left: 0px;
|
255 |
+
border: 1px none #000;
|
256 |
+
border-radius: 0px;
|
257 |
+
margin-top: 40px;
|
258 |
+
}
|
259 |
+
|
260 |
+
.crowdsignal-setup__middle p {
|
261 |
+
color: #838383;
|
262 |
+
}
|
263 |
+
|
264 |
+
.crowdsignal-setup__middle a {
|
265 |
+
|
266 |
+
}
|
267 |
+
|
268 |
+
.crowdsignal-setup__video-container {
|
269 |
+
display: block;
|
270 |
+
overflow: hidden;
|
271 |
+
position: relative;
|
272 |
+
margin-top: 64px;
|
273 |
+
margin-bottom: 120px;
|
274 |
+
padding-top: 56.25%;
|
275 |
+
width: 100%;
|
276 |
+
}
|
277 |
+
|
278 |
+
.crowdsignal-setup__video {
|
279 |
+
position: absolute;
|
280 |
+
top: 0;
|
281 |
+
left: 0;
|
282 |
+
bottom: 0;
|
283 |
+
right: 0;
|
284 |
+
width: 100%;
|
285 |
+
height: 100%;
|
286 |
+
background-color: #e2e2e2;
|
287 |
+
}
|
288 |
+
|
289 |
+
.crowdsignal-setup__video iframe {
|
290 |
+
width: 100%;
|
291 |
+
height: 100%;
|
292 |
+
}
|
293 |
+
|
294 |
+
|
295 |
+
div.crowdsignal-message {
|
296 |
+
margin: 24px auto 8px auto;
|
297 |
+
border: 0;
|
298 |
+
padding: 16px;
|
299 |
+
padding-left: 24px;
|
300 |
+
max-width: 1040px;
|
301 |
+
box-sizing: border-box;
|
302 |
+
}
|
303 |
+
|
304 |
+
div.updated.crowdsignal-message {
|
305 |
+
background-color: #eff9f1;
|
306 |
+
}
|
307 |
+
div.error.crowdsignal-message {
|
308 |
+
background-color: #fbcfd2;
|
309 |
+
}
|
310 |
+
div.updated.crowdsignal-message p,
|
311 |
+
div.error.crowdsignal-message p {
|
312 |
+
padding: 0;
|
313 |
+
color: black;
|
314 |
+
font-size: 14px;
|
315 |
+
line-height: 22px;
|
316 |
+
margin: 4px 0px;
|
317 |
+
}
|
318 |
+
|
319 |
+
.crowdsignal-message .crowdsignal-notification-icon {
|
320 |
+
display: inline-block;
|
321 |
+
vertical-align: text-bottom;
|
322 |
+
margin-right: 16px;
|
323 |
+
line-height: 0;
|
324 |
+
height: 22px;
|
325 |
+
}
|
326 |
+
|
327 |
+
.crowdsignal-settings__main-content {
|
328 |
+
}
|
329 |
+
|
330 |
+
.cs-card {
|
331 |
+
display: block;
|
332 |
+
position: relative;
|
333 |
+
margin: 0 auto 10px;
|
334 |
+
padding: 16px;
|
335 |
+
box-sizing: border-box;
|
336 |
+
background: #fff;
|
337 |
+
box-shadow: 0 0 0 1px #ccd0d4,0 1px 1px 1px rgba(0,0,0,.04);
|
338 |
+
}
|
339 |
+
|
340 |
+
.cs-card.is-compact {
|
341 |
+
margin-bottom: 1px;
|
342 |
+
padding: 16px 24px;
|
343 |
+
}
|
344 |
+
|
345 |
+
.cs-section-header.cs-card {
|
346 |
+
display: flex;
|
347 |
+
flex-wrap: wrap;
|
348 |
+
padding-top: .6875rem;
|
349 |
+
padding-bottom: .6875rem;
|
350 |
+
position: relative;
|
351 |
+
}
|
352 |
+
|
353 |
+
.cs-section-header__label {
|
354 |
+
line-height: 1.75rem;
|
355 |
+
color: #414141;
|
356 |
+
font-size: .875rem;
|
357 |
+
}
|
358 |
+
|
359 |
+
.cs-section-header__label-text {
|
360 |
+
position: relative;
|
361 |
+
margin-right: .5rem;
|
362 |
+
white-space: nowrap;
|
363 |
+
overflow: hidden;
|
364 |
+
width: 100%;
|
365 |
+
padding-right: .5rem;
|
366 |
+
min-width: 0;
|
367 |
+
font-weight: 400;
|
368 |
+
color: #3C434A;
|
369 |
+
}
|
370 |
+
|
371 |
+
.crowdsignal-settings__middle {
|
372 |
+
min-height: 100px;
|
373 |
+
padding-left: 0px;
|
374 |
+
border: 1px none #000;
|
375 |
+
border-radius: 0px;
|
376 |
+
}
|
377 |
+
|
378 |
+
.crowdsignal-settings__text {
|
379 |
+
margin-top: 40px;
|
380 |
+
line-height: 150%;
|
381 |
+
font-size: 14px;
|
382 |
+
line-height: 30px;
|
383 |
+
color: #444444;
|
384 |
+
}
|
385 |
+
|
386 |
+
.crowdsignal-settings__bottom {
|
387 |
+
margin-top: 80px;
|
388 |
+
}
|
389 |
+
|
390 |
+
.crowdsignal-settings__submit {
|
391 |
+
margin-top: 10px;
|
392 |
+
}
|
393 |
+
|
394 |
+
@media screen and (min-width: 782px) {
|
395 |
+
.crowdsignal-settings__submit {
|
396 |
+
margin-top: -45px;
|
397 |
+
display: block;
|
398 |
+
margin-left: 585px;
|
399 |
+
}
|
400 |
+
}
|
401 |
+
|
402 |
+
@media screen and (max-width: 782px) {
|
403 |
+
.crowdsignal-setup__header {
|
404 |
+
margin-left: -12px;
|
405 |
+
margin-right: -12px;
|
406 |
+
}
|
407 |
+
|
408 |
+
.crowdsignal-setup__footer {
|
409 |
+
margin-left: -12px;
|
410 |
+
margin-right: -12px;
|
411 |
+
}
|
412 |
+
}
|
413 |
+
|
414 |
+
.cs-form-settings-group p {
|
415 |
+
color: #838383;
|
416 |
+
font-style: italic;
|
417 |
+
font-size: .875rem;
|
418 |
+
font-weight: 400;
|
419 |
+
}
|
420 |
+
|
421 |
+
.cs-form-settings-group a {
|
422 |
+
}
|
423 |
+
|
424 |
+
.cs-form-settings-group h2 {
|
425 |
+
font-size: .875rem;
|
426 |
+
font-weight: 700;
|
427 |
+
}
|
428 |
+
|
429 |
+
#crowdsignal__teaser_img {
|
430 |
+
max-width:100%;
|
431 |
+
max-height:100%;
|
432 |
+
padding-bottom: 20px;
|
433 |
+
}
|
434 |
+
|
435 |
+
#crowdsignal__logo {
|
436 |
+
font-size: 1.5rem;
|
437 |
+
font-weight: 400;
|
438 |
+
margin: .67em 0;
|
439 |
+
color: #1d2327;
|
440 |
+
font-family: Recoleta, "Noto Serif", Georgia, Times New Roman, Times, serif;
|
441 |
+
font-style: normal;
|
442 |
+
line-height: 1.2em;
|
443 |
+
}
|
444 |
+
|
445 |
+
#crowdsignal__install_cta {
|
446 |
+
margin: 0;
|
447 |
+
max-width: 100%;
|
448 |
+
}
|
449 |
+
|
450 |
+
.crowdsignal__advanced_desc {
|
451 |
+
color: #838383;
|
452 |
+
font-style: italic;
|
453 |
+
font-size: .875rem;
|
454 |
+
font-weight: 400;
|
455 |
+
padding-top: 5px;
|
456 |
+
}
|
457 |
+
|
458 |
+
.crowdsignal__advanced_text {
|
459 |
+
font-style: normal;
|
460 |
+
}
|
461 |
+
|
462 |
+
#crowdsignal_advanced_link a {
|
463 |
+
text-decoration: none;
|
464 |
+
color: #8c8f94;
|
465 |
+
padding-left: 24px;
|
466 |
+
}
|
467 |
+
|
468 |
+
.cs-button {
|
469 |
+
background:#f6f7f7;
|
470 |
+
border:1px solid #2271b1;
|
471 |
+
color:#2271b1;
|
472 |
+
cursor:pointer;
|
473 |
+
display:inline-block;
|
474 |
+
margin:0;
|
475 |
+
outline:0;
|
476 |
+
overflow:hidden;
|
477 |
+
font-size:.875rem;
|
478 |
+
text-overflow:ellipsis;
|
479 |
+
text-decoration:none;
|
480 |
+
vertical-align:top;
|
481 |
+
box-sizing:border-box;
|
482 |
+
border-radius:3px;
|
483 |
+
padding:7px 14px 9px;
|
484 |
+
-webkit-appearance:none;
|
485 |
+
appearance:none
|
486 |
+
}
|
487 |
+
.cs-button:hover {
|
488 |
+
background:#f0f0f1;
|
489 |
+
border-color:#0a4b78;
|
490 |
+
color:#0a4b78
|
491 |
+
}
|
492 |
+
.cs-button:disabled,
|
493 |
+
.cs-button[disabled] {
|
494 |
+
color:#eee;
|
495 |
+
background:#fff;
|
496 |
+
border-color:#eee;
|
497 |
+
cursor:default
|
498 |
+
}
|
499 |
+
.cs-button:focus {
|
500 |
+
background:#fff;
|
501 |
+
border-color:#2271b1;
|
502 |
+
box-shadow:0 0 0 1px #2271b1
|
503 |
+
}
|
504 |
+
.cs-button.hidden {
|
505 |
+
display:none
|
506 |
+
}
|
507 |
+
.cs-button.is-primary {
|
508 |
+
background:#3582c4;
|
509 |
+
border-color:#3582c4;
|
510 |
+
color:#fff
|
511 |
+
}
|
512 |
+
.cs-button.is-primary:focus,
|
513 |
+
.cs-button.is-primary:hover {
|
514 |
+
border-color:#2271b1;
|
515 |
+
background:#2271b1;
|
516 |
+
color:#fff
|
517 |
+
}
|
518 |
+
.cs-button.is-primary:focus {
|
519 |
+
box-shadow:0 0 0 1px #fff,0 0 0 3px #2271b1
|
520 |
+
}
|
521 |
+
.cs-button.is-primary:disabled,
|
522 |
+
.cs-button.is-primary[disabled] {
|
523 |
+
color:#66c6e4!important;
|
524 |
+
background-color:#008ec2!important;
|
525 |
+
border-color:#008ec2!important;
|
526 |
+
box-shadow:none!important;
|
527 |
+
text-shadow:none!important;
|
528 |
+
cursor:default
|
529 |
+
}
|
css/polldaddy.css
CHANGED
@@ -27,7 +27,6 @@
|
|
27 |
}
|
28 |
|
29 |
#manage-polls {
|
30 |
-
height: 100%;
|
31 |
margin-left: -20px;
|
32 |
margin-right: 0;
|
33 |
margin-top: 0;
|
@@ -53,10 +52,6 @@ h2#polldaddy-header, h2#poll-list-header {
|
|
53 |
display: inline-block;
|
54 |
}
|
55 |
|
56 |
-
.cs-pre-wrap {
|
57 |
-
background: white;
|
58 |
-
height: 30px;
|
59 |
-
}
|
60 |
.cs-wrapper {
|
61 |
clear: both;
|
62 |
display: flex;
|
@@ -66,10 +61,6 @@ h2#polldaddy-header, h2#poll-list-header {
|
|
66 |
}
|
67 |
|
68 |
@media screen and (max-width: 782px) {
|
69 |
-
.cs-pre-wrap {
|
70 |
-
height: 60px;
|
71 |
-
}
|
72 |
-
|
73 |
.cs-wrapper {
|
74 |
min-height: calc(100% - 60px);
|
75 |
}
|
27 |
}
|
28 |
|
29 |
#manage-polls {
|
|
|
30 |
margin-left: -20px;
|
31 |
margin-right: 0;
|
32 |
margin-top: 0;
|
52 |
display: inline-block;
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
55 |
.cs-wrapper {
|
56 |
clear: both;
|
57 |
display: flex;
|
61 |
}
|
62 |
|
63 |
@media screen and (max-width: 782px) {
|
|
|
|
|
|
|
|
|
64 |
.cs-wrapper {
|
65 |
min-height: calc(100% - 60px);
|
66 |
}
|
partials/html-admin-setup-footer.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File containing the view used in the footer of the setup pages.
|
4 |
+
*
|
5 |
+
* @package Crowdsignal_Forms\Admin
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
?>
|
12 |
+
|
13 |
+
<div class="cs-footer">
|
14 |
+
<div class="cs-footer__a8c-attr-container">
|
15 |
+
<a href="https://automattic.com/">
|
16 |
+
<svg role="img" class="cs-footer__a8c-attr" x="0" y="0" viewBox="0 0 935 38.2" enable-background="new 0 0 935 38.2" aria-labelledby="a8c-svg-title">
|
17 |
+
<title id="a8c-svg-title">An Automattic Adventure</title>
|
18 |
+
<path d="M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"></path>
|
19 |
+
</svg>
|
20 |
+
</a>
|
21 |
+
</div>
|
22 |
+
<ul class="cs-footer__links">
|
23 |
+
<li class="cs-footer__link-item"><a href="https://crowdsignal.com" target="_blank" rel="noopener noreferrer" class="cs-footer__link" title="Crowdsignal">Crowdsignal.com</a></li>
|
24 |
+
<li class="cs-footer__link-item"><a href="https://crowdsignal.com/support" target="_blank" rel="noopener noreferrer" class="cs-footer__link" title="<?php esc_html_e( 'Crowdsignal Support', 'crowdsignal-forms' ); ?>"><?php esc_html_e( 'Support', 'crowdsignal-forms' ); ?></a></li>
|
25 |
+
<li class="cs-footer__link-item"><a href="https://crowdsignal.com/terms/" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e( 'Terms of Service', 'crowdsignal-forms' ); ?>" class="cs-footer__link"><?php esc_html_e( 'Terms', 'crowdsignal-forms' ); ?></a></li>
|
26 |
+
<li class="cs-footer__link-item"><a href="https://automattic.com/privacy/" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e( 'Privacy Policy', 'crowdsignal-forms' ); ?>" class="cs-footer__link"><?php esc_html_e( 'Privacy', 'crowdsignal-forms' ); ?></a></li>
|
27 |
+
</ul>
|
28 |
+
</div>
|
29 |
+
</div> <!--.wrap-->
|
partials/html-admin-setup-header.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File containing the view used in the header of the setup pages.
|
4 |
+
*
|
5 |
+
* @package Crowdsignal_Forms\Admin
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
?>
|
12 |
+
<div>
|
13 |
+
<div id="cs-plugin-container">
|
14 |
+
<div class='cs-lower'>
|
15 |
+
<h1 id='crowdsignal__logo'><?php esc_html_e( 'Crowdsignal Settings', 'crowdsignal-forms' ); ?></h1>
|
16 |
+
<?php
|
17 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
18 |
+
if ( isset( $_GET['msg'] ) ) {
|
19 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
20 |
+
switch ( $_GET['msg'] ) {
|
21 |
+
case 'disconnect-fail':
|
22 |
+
echo '<div class="error fade crowdsignal-message"><p>' .
|
23 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib
|
24 |
+
esc_html__( 'Could not disconnect. Please try again.', 'crowdsignal-forms' ) .
|
25 |
+
'</p></div>';
|
26 |
+
break;
|
27 |
+
case 'disconnected':
|
28 |
+
echo '<div class="updated fade crowdsignal-message"><p>' .
|
29 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib
|
30 |
+
esc_html__( 'Successfully disconnected from Crowdsignal.', 'crowdsignal-forms' ) .
|
31 |
+
'</p></div>';
|
32 |
+
break;
|
33 |
+
case 'connected':
|
34 |
+
echo '<div class="updated crowdsignal-message"><p>' .
|
35 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib
|
36 |
+
esc_html__( 'Success! Your Crowdsignal account is successfully connected! You are ready!', 'crowdsignal-forms' ) .
|
37 |
+
'</p></div>';
|
38 |
+
break;
|
39 |
+
case 'api-key-added':
|
40 |
+
echo '<div class="updated crowdsignal-message"><p>' .
|
41 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib
|
42 |
+
esc_html__( 'You have been connected to Crowdsignal.', 'crowdsignal-forms' ) .
|
43 |
+
'</p></div>';
|
44 |
+
break;
|
45 |
+
case 'api-key-not-added':
|
46 |
+
echo '<div class="error fade crowdsignal-message"><p>' .
|
47 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib
|
48 |
+
esc_html__( 'Your API key has not been updated, please try again.', 'crowdsignal-forms' ) .
|
49 |
+
'</p></div>';
|
50 |
+
break;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
?>
|
partials/html-admin-setup-step-1.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File containing the view for step 1 of the setup wizard.
|
4 |
+
*
|
5 |
+
* @package Crowdsignal_Forms\Admin
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
?>
|
12 |
+
<br />
|
13 |
+
<div class='cs-settings-container'>
|
14 |
+
<div class="cs-card cs-section-header is-compact">
|
15 |
+
<div class="cs-section-header__label">
|
16 |
+
<span class="cs-section-header__label-text"><?php esc_html_e( 'Getting Started', 'crowdsignal-forms' ); ?></span>
|
17 |
+
</div>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
<div class="cs-card cs-section-header is-compact">
|
21 |
+
|
22 |
+
<div class="cs-form-settings-group crowdsignal-forms" style='text-align: center; width: 100%'>
|
23 |
+
<div class="crowdsignal-setup__content">
|
24 |
+
<div class="crowdsignal-setup__description">
|
25 |
+
<h1><?php esc_html_e( 'Welcome to Crowdsignal', 'crowdsignal-forms' ); ?></h1>
|
26 |
+
<p><?php echo wp_kses_post( 'To collect and manage responses you need to connect the plugin to <a href="https://crowdsignal.com">Crowdsignal</a>. <br />It will take less than a minute and it’s free.', 'polldaddy' ); ?></p>
|
27 |
+
</div>
|
28 |
+
|
29 |
+
<div class="wrap crowdsignal-settings-wrap">
|
30 |
+
<form id="cs-connect-form" class="crowdsignal-options" method="post" action="https://app.crowdsignal.com/get-api-key/" target="CSCONNECT">
|
31 |
+
<input type="hidden" name="get_api_key" value="<?php echo esc_attr( get_option( 'crowdsignal_api_key_secret' ) ); ?>" />
|
32 |
+
<input type="hidden" name="ref" value="<?php echo esc_attr( admin_url( 'options-general.php?page=crowdsignal-settings' ) ); ?>" />
|
33 |
+
<input type="submit" value="<?php esc_html_e( 'Let’s get started', 'polldaddy' ); ?>" class="cs-button is-primary" />
|
34 |
+
</form>
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
<script>
|
42 |
+
let CSCONNECT = null;
|
43 |
+
const showConnect = ( title ) => {
|
44 |
+
// window size, match standard iPhone screen size
|
45 |
+
const widthRatio = 1/2;
|
46 |
+
const heightRatio = 3/4;
|
47 |
+
|
48 |
+
// Fixes dual-screen position
|
49 |
+
const dualScreenLeft = window.screenLeft !== undefined
|
50 |
+
? window.screenLeft // Most browsers
|
51 |
+
: window.screenX; // Firefox
|
52 |
+
const dualScreenTop = window.screenTop !== undefined
|
53 |
+
? window.screenTop // Most browsers
|
54 |
+
: window.screenY; // Firefox
|
55 |
+
|
56 |
+
const width = window.innerWidth
|
57 |
+
? window.innerWidth
|
58 |
+
: document.documentElement.clientWidth
|
59 |
+
? document.documentElement.clientWidth
|
60 |
+
: screen.width;
|
61 |
+
const height = window.innerHeight
|
62 |
+
? window.innerHeight
|
63 |
+
: document.documentElement.clientHeight
|
64 |
+
? document.documentElement.clientHeight
|
65 |
+
: screen.height;
|
66 |
+
|
67 |
+
const popupWidth = width * widthRatio;
|
68 |
+
const popupHeight = height * heightRatio;
|
69 |
+
|
70 |
+
const left = ( (width / 2 ) - ( popupWidth / 2 ) ) + dualScreenLeft;
|
71 |
+
const top = ( (height / 2 ) - ( popupHeight / 2 ) ) + dualScreenTop;
|
72 |
+
|
73 |
+
CSCONNECT = window.open( 'about:blank', title,
|
74 |
+
`
|
75 |
+
location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,
|
76 |
+
width=${ parseInt( popupWidth, 10 ) },
|
77 |
+
height=${ parseInt( popupHeight, 10 ) },
|
78 |
+
top=${ parseInt( top, 10 ) },
|
79 |
+
left=${ parseInt( left, 10 ) }
|
80 |
+
`
|
81 |
+
)
|
82 |
+
|
83 |
+
if ( window.focus ) CSCONNECT.focus();
|
84 |
+
}
|
85 |
+
( function( form ) {
|
86 |
+
form.onsubmit = function() {
|
87 |
+
showConnect( 'CSCONNECT' );
|
88 |
+
}
|
89 |
+
} )( document.getElementById( 'cs-connect-form' ) );
|
90 |
+
</script>
|
partials/html-admin-setup-step-2.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File containing the view for step 2 of the setup wizard.
|
4 |
+
*
|
5 |
+
* @package Crowdsignal_Forms\Admin
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
if ( $is_connected ) {
|
12 |
+
$crowdsignal_forms_msg = 'connected';
|
13 |
+
} else {
|
14 |
+
$crowdsignal_forms_msg = 'api-key-not-added';
|
15 |
+
}
|
16 |
+
?>
|
17 |
+
<script type='text/javascript'>
|
18 |
+
window.close();
|
19 |
+
if (window.opener && !window.opener.closed) {
|
20 |
+
var querystring = window.opener.location.search;
|
21 |
+
querystring += ( querystring ? '&' : '?' ) + 'message=<?php echo esc_js( $crowdsignal_forms_msg ); ?>';
|
22 |
+
window.opener.location.search = querystring;
|
23 |
+
}
|
24 |
+
</script>
|
25 |
+
<noscript><h3><?php esc_html_e( "You're ready to start using Crowdsignal!", 'polldaddy' ); ?></h3></noscript>
|
partials/html-admin-setup-step-3.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File containing the view for step 3 of the setup wizard.
|
4 |
+
*
|
5 |
+
* @package Crowdsignal_Forms\Admin
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
?>
|
12 |
+
<br />
|
13 |
+
<div class='cs-settings-container'>
|
14 |
+
<div class="cs-card cs-section-header is-compact">
|
15 |
+
<div class="cs-section-header__label">
|
16 |
+
<span class="cs-section-header__label-text"><?php esc_html_e( 'Getting Started', 'polldaddy' ); ?></span>
|
17 |
+
</div>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
<div class="cs-card cs-section-header is-compact">
|
21 |
+
<div class="cs-form-settings-group" style='width: 100%'>
|
22 |
+
<h2><?php echo wp_kses_post( __( 'First time using Crowdsignal?', 'polldaddy' ) ); ?></h2>
|
23 |
+
<div class="crowdsignal-setup__middle">
|
24 |
+
<p>
|
25 |
+
<?php echo wp_kses_post( __( 'You can use Crowdsignal blocks right in your editor. Search for Crowdsignal in the blocks library and add the blocks to your page. Here is a short video to get you started:', 'polldaddy' ) ); ?>
|
26 |
+
</p>
|
27 |
+
|
28 |
+
<div class="crowdsignal-setup__video-container">
|
29 |
+
<div class="crowdsignal-setup__video">
|
30 |
+
<iframe src="https://videopress.com/v/jWTs90Dg?autoplay=0&hd=1" frameborder="0" allowfullscreen></iframe>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
<p>
|
34 |
+
<?php
|
35 |
+
echo wp_kses_post(
|
36 |
+
sprintf(
|
37 |
+
// translators: Argument is a link to Crowdsignal's support page.
|
38 |
+
__(
|
39 |
+
'Do you want to know more about Crowdsignal and our blocks? <a href="%1s" target="_blank">Learn more</a>.',
|
40 |
+
'polldaddy'
|
41 |
+
),
|
42 |
+
'https://crowdsignal.com/support/'
|
43 |
+
)
|
44 |
+
);
|
45 |
+
?>
|
46 |
+
</p>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
</div>
|
partials/html-admin-teaser.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* File containing the view for the teaser
|
4 |
+
*
|
5 |
+
* @package Crowdsignal_Forms\Admin
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
?>
|
12 |
+
<br />
|
13 |
+
<div class='cs-settings-container'>
|
14 |
+
<div class="cs-card cs-section-header is-compact">
|
15 |
+
<div class="cs-section-header__label">
|
16 |
+
<span class="cs-section-header__label-text"><?php esc_html_e( 'Crowdsignal Blocks', 'polldaddy' ); ?></span>
|
17 |
+
</div>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
<div class="cs-card cs-section-header is-compact">
|
21 |
+
<div class="cs-form-settings-group" style='width: 100%'>
|
22 |
+
<h2><?php echo wp_kses_post( __( 'First time using Crowdsignal?', 'polldaddy' ) ); ?></h2>
|
23 |
+
<div class="crowdsignal-setup__middle">
|
24 |
+
<p>
|
25 |
+
<?php
|
26 |
+
printf(
|
27 |
+
/* translators: Placeholder is the text "second plugin" and "Install the plugin". */
|
28 |
+
esc_html__( 'We have a %1$s called Crowdsignal Forms that allows you to create Crowdsignal blocks right inside of your WordPress editor. %2$s, then search for Crowdsignal in the blocks library and add Crowdsignal blocks, like a Poll block or Feedback button.', 'polldaddy' ),
|
29 |
+
sprintf(
|
30 |
+
'<a href="https://wordpress.org/plugins/crowdsignal-forms/">%s</a>',
|
31 |
+
esc_html__( 'second plugin', 'polldaddy' )
|
32 |
+
),
|
33 |
+
sprintf(
|
34 |
+
'<a href="' . admin_url( 'plugin-install.php?s=crowdsignal+forms&tab=search&type=term' ) . '">%s</a>',
|
35 |
+
esc_html__( 'Install the plugin', 'polldaddy' )
|
36 |
+
)
|
37 |
+
);
|
38 |
+
?>
|
39 |
+
</p>
|
40 |
+
<p><?php _e( 'Here is a short video to get you started:', 'polldaddy' ); ?></p>
|
41 |
+
|
42 |
+
|
43 |
+
<div class="crowdsignal-setup__video-container">
|
44 |
+
<div class="crowdsignal-setup__video">
|
45 |
+
<iframe src="https://videopress.com/v/jWTs90Dg?autoplay=0&hd=1" frameborder="0" allowfullscreen></iframe>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
|
49 |
+
|
50 |
+
<p>
|
51 |
+
<?php
|
52 |
+
echo wp_kses_post(
|
53 |
+
sprintf(
|
54 |
+
'<a href="' . admin_url( 'admin.php?page=polls&action=landing-page' ) . '">%s</a>',
|
55 |
+
__(
|
56 |
+
'See an overview of our Crowdsignal blocks.',
|
57 |
+
'polldaddy'
|
58 |
+
)
|
59 |
+
)
|
60 |
+
);
|
61 |
+
?>
|
62 |
+
</p>
|
63 |
+
<p>
|
64 |
+
<?php
|
65 |
+
printf(
|
66 |
+
/* translators: Placeholder is the text "website plugins page". */
|
67 |
+
esc_html__( 'Install the Crowdsignal Forms plugin directly from your %s.', 'polldaddy' ),
|
68 |
+
sprintf(
|
69 |
+
'<a href="' . admin_url( 'plugin-install.php?s=crowdsignal+forms&tab=search&type=term' ) . '">%s</a>',
|
70 |
+
esc_html__( 'website plugins page', 'polldaddy' )
|
71 |
+
)
|
72 |
+
);
|
73 |
+
?>
|
74 |
+
</p>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
+
</div>
|
partials/polls-table.php
CHANGED
@@ -341,7 +341,7 @@ jQuery( document ).ready(function(){
|
|
341 |
icon: 'arrow-down',
|
342 |
controls: [
|
343 |
{ title: 'My Account', onClick: () => window.open( 'https://app.crowdsignal.com/account', '_blank' ) },
|
344 |
-
{ title: 'Settings', onClick: () => window.open( 'options-general.php?page=
|
345 |
{ title: 'Crowdsignal Blog', onClick: () => window.open( 'https://crowdsignal.com/blog', '_blank' ) },
|
346 |
{ title: 'Help', onClick: () => window.open( 'https://crowdsignal.com/support', '_blank' ) },
|
347 |
{ title: 'crowdsignal.com', onClick: () => window.open( 'https://crowdsignal.com/', '_blank' ) },
|
341 |
icon: 'arrow-down',
|
342 |
controls: [
|
343 |
{ title: 'My Account', onClick: () => window.open( 'https://app.crowdsignal.com/account', '_blank' ) },
|
344 |
+
{ title: 'Settings', onClick: () => window.open( 'options-general.php?page=crowdsignal-settings', '_self' ) },
|
345 |
{ title: 'Crowdsignal Blog', onClick: () => window.open( 'https://crowdsignal.com/blog', '_blank' ) },
|
346 |
{ title: 'Help', onClick: () => window.open( 'https://crowdsignal.com/support', '_blank' ) },
|
347 |
{ title: 'crowdsignal.com', onClick: () => window.open( 'https://crowdsignal.com/', '_blank' ) },
|
partials/settings-2.php
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Crowdsignal legacy plugin
|
4 |
+
*
|
5 |
+
* @package polldaddy
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<br />
|
10 |
+
<div id='crowdsignal_advanced_link'><a href="#" id='toggle_advanced_setting_link'><?php _e( 'Advanced Settings' ); ?></a></div>
|
11 |
+
<br />
|
12 |
+
|
13 |
+
<script>
|
14 |
+
jQuery(document).ready( function() {
|
15 |
+
jQuery( '#toggle_advanced_setting_link' ).click( function() {
|
16 |
+
jQuery( '#crowdsignal__advanced_page' ).toggle( 100 );
|
17 |
+
return false;
|
18 |
+
})
|
19 |
+
});
|
20 |
+
</script>
|
21 |
+
|
22 |
+
<div style='display:none' id="crowdsignal__advanced_page">
|
23 |
+
|
24 |
+
<?php if ( $controller->multiple_accounts ) { ?>
|
25 |
+
<div class='cs-settings-container'>
|
26 |
+
<div class="cs-card cs-section-header is-compact">
|
27 |
+
<div class="cs-form-settings-group" style='width: 100%'>
|
28 |
+
<h2><?php echo wp_kses_post( __( 'Multiuser Account', 'polldaddy' ) ); ?></h2>
|
29 |
+
<div class="crowdsignal-setup__middle">
|
30 |
+
<form action="" method="post">
|
31 |
+
<p><input type='checkbox' name='crowdsignal_multiuser' value='1' <?php echo $controller->multiple_accounts ? 'checked' : ''; ?> /> <span class='crowdsignal__advanced_text'><?php _e( 'You have granted authors, editors and admin users of this site access to your Crowdsignal account.', 'polldaddy' ); ?></span></p>
|
32 |
+
<p class='crowdsignal__advanced_desc'><?php _e( 'Warning: This is a deprecated feature and wont’t be supported in future. If you disable the Multi-User-Access feature, you won’t be able to activate it again.', 'polldaddy' ); ?></p>
|
33 |
+
<p class="submit">
|
34 |
+
<?php wp_nonce_field( 'polldaddy-reset' . $current_user->ID ); ?>
|
35 |
+
<input type="hidden" name="action" value="multi-account" />
|
36 |
+
<input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Save', 'polldaddy' ) ); ?>" />
|
37 |
+
</p>
|
38 |
+
</form>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
<br />
|
44 |
+
<?php } ?>
|
45 |
+
|
46 |
+
<?php
|
47 |
+
global $current_user;
|
48 |
+
$fields = array( 'polldaddy_api_key', 'pd-rating-comments', 'pd-rating-comments-id', 'pd-rating-comments-pos', 'pd-rating-exclude-post-ids', 'pd-rating-pages', 'pd-rating-pages-id', 'pd-rating-posts', 'pd-rating-posts-id', 'pd-rating-posts-index', 'pd-rating-posts-index-id', 'pd-rating-posts-index-pos', 'pd-rating-posts-pos', 'pd-rating-title-filter', 'pd-rating-usercode', 'pd-rich-snippets', 'pd-usercode-' . $current_user->ID );
|
49 |
+
$show_reset_form = false;
|
50 |
+
foreach( $fields as $field ) {
|
51 |
+
$value = get_option( $field );
|
52 |
+
if ( $value != false ) {
|
53 |
+
$show_reset_form = true;
|
54 |
+
}
|
55 |
+
$settings[ $field ] = $value;
|
56 |
+
}
|
57 |
+
$previous_settings = get_option( 'polldaddy_settings' );
|
58 |
+
if ( ! $show_reset_form && empty( $previous_settings ) ) {
|
59 |
+
return;
|
60 |
+
}
|
61 |
+
?>
|
62 |
+
|
63 |
+
<div class='cs-settings-container'>
|
64 |
+
<div class="cs-card cs-section-header is-compact">
|
65 |
+
<div class="" style='width: 100%'>
|
66 |
+
<h2><?php echo wp_kses_post( __( 'Reset Connection Settings', 'polldaddy' ) ); ?></h2>
|
67 |
+
<div class="crowdsignal-setup__middle">
|
68 |
+
<p class='crowdsignal__advanced_text'><?php _e( 'If you are experiencing problems connecting to the Crowdsignal website resetting your connection settings may help. A backup will be made. After resetting, link your account again with the same API key.', 'polldaddy' ); ?></p>
|
69 |
+
<p class='crowdsignal__advanced_text'><?php _e( 'The following settings will be reset:', 'polldaddy' ); ?></p>
|
70 |
+
<?php if ( $show_reset_form ) { ?>
|
71 |
+
<table>
|
72 |
+
<?php
|
73 |
+
foreach( $settings as $key => $value ) {
|
74 |
+
if ( $value != '' ) {
|
75 |
+
if ( strpos( $key, 'usercode' ) ) {
|
76 |
+
$value = "***********" . substr( $value, -4 );
|
77 |
+
} elseif ( in_array( $key, array( 'pd-rating-pages-id', 'pd-rating-comments-id', 'pd-rating-posts-id' ) ) ) {
|
78 |
+
$value = "$value (<a href='https://app.crowdsignal.com/ratings/{$value}/edit/'>" . __( 'Edit', 'polldaddy' ) . "</a>)";
|
79 |
+
}
|
80 |
+
?>
|
81 |
+
<tr>
|
82 |
+
<th style="text-align: left"><?php echo esc_html( $key ); ?>:</th>
|
83 |
+
<td><?php echo $value; ?></td>
|
84 |
+
</tr>
|
85 |
+
<?php
|
86 |
+
}
|
87 |
+
}
|
88 |
+
?>
|
89 |
+
</table>
|
90 |
+
<p><?php _e( "* The usercode is like a password, keep it secret.", 'polldaddy' ); ?></p>
|
91 |
+
<form action="" method="post">
|
92 |
+
<p class="submit">
|
93 |
+
<?php wp_nonce_field( 'polldaddy-reset' . $current_user->ID ); ?>
|
94 |
+
<input type="hidden" name="action" value="reset-account" />
|
95 |
+
<input type="hidden" name="account" value="import" />
|
96 |
+
<p><input type="checkbox" name="email" value="1" /> <?php _e( 'Send me an email with the connection settings for future reference' ); ?></p>
|
97 |
+
<input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Reset API Connection', 'polldaddy' ) ); ?>" />
|
98 |
+
</p>
|
99 |
+
</form>
|
100 |
+
<br />
|
101 |
+
<?php
|
102 |
+
}
|
103 |
+
if ( is_array( $previous_settings ) && !empty( $previous_settings ) ) {
|
104 |
+
?>
|
105 |
+
<h2><?php _e( 'Restore Previous Settings', 'polldaddy' ); ?></h2>
|
106 |
+
<p><?php _e( 'The connection settings for this site were reset but a backup was made. The following settings can be restored:', 'polldaddy' ); ?></p>
|
107 |
+
<table>
|
108 |
+
<?php
|
109 |
+
foreach( $previous_settings as $key => $value ) {
|
110 |
+
if ( $value != '' ) {
|
111 |
+
if ( strpos( $key, 'usercode' ) ) {
|
112 |
+
$value = "***********" . substr( $value, -4 );
|
113 |
+
} elseif ( in_array( $key, array( 'pd-rating-pages-id', 'pd-rating-comments-id', 'pd-rating-posts-id' ) ) ) {
|
114 |
+
$value = "$value (<a href='https://app.crowdsignal.com/ratings/{$value}/edit/'>" . __( 'Edit', 'polldaddy' ) . "</a>)";
|
115 |
+
}
|
116 |
+
?>
|
117 |
+
<tr>
|
118 |
+
<th style="text-align: left"><?php echo esc_html( $key ); ?>:</th>
|
119 |
+
<td><?php echo $value; ?></td>
|
120 |
+
</tr>
|
121 |
+
<?php
|
122 |
+
}
|
123 |
+
}
|
124 |
+
?>
|
125 |
+
</table>
|
126 |
+
<p><?php _e( "* The usercode is like a password, keep it secret.", 'polldaddy' ); ?></p>
|
127 |
+
<form action="" method="post">
|
128 |
+
<p class="submit">
|
129 |
+
<?php wp_nonce_field( 'polldaddy-restore' . $current_user->ID ); ?>
|
130 |
+
<input type="hidden" name="action" value="restore-account" />
|
131 |
+
<input type="hidden" name="account" value="import" />
|
132 |
+
<input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Restore API Settings', 'polldaddy' ) ); ?>" />
|
133 |
+
</p>
|
134 |
+
</form>
|
135 |
+
<br />
|
136 |
+
<?php
|
137 |
+
if (
|
138 |
+
$show_reset_form
|
139 |
+
&& isset( $settings[ 'pd-rating-posts-id' ] )
|
140 |
+
&& isset( $previous_settings[ 'pd-rating-posts-id' ] )
|
141 |
+
&& $settings[ 'pd-rating-posts-id' ] != $previous_settings[ 'pd-rating-posts-id' ]
|
142 |
+
) {
|
143 |
+
?>
|
144 |
+
<h2><?php _e( 'Restore Ratings Settings', 'polldaddy' ); ?></h2>
|
145 |
+
<p><?php _e( 'Different rating settings detected. If you are missing ratings on your posts, pages or comments you can restore the original rating settings by clicking the button below.', 'polldaddy' ); ?></p>
|
146 |
+
<p><?php _e( 'This tells the plugin to look for this data in a different rating in your Crowdsignal account.', 'polldaddy' ); ?></p>
|
147 |
+
<form action="" method="post">
|
148 |
+
<p class="submit">
|
149 |
+
<?php wp_nonce_field( 'polldaddy-restore-ratings' . $current_user->ID ); ?>
|
150 |
+
<input type="hidden" name="action" value="restore-ratings" />
|
151 |
+
<input type="hidden" name="account" value="import" />
|
152 |
+
<input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Restore Ratings Only', 'polldaddy' ) ); ?>" />
|
153 |
+
</p>
|
154 |
+
</form>
|
155 |
+
<br />
|
156 |
+
<?php
|
157 |
+
}
|
158 |
+
}
|
159 |
+
?>
|
160 |
+
</div>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
|
partials/settings.php
CHANGED
@@ -7,228 +7,141 @@
|
|
7 |
|
8 |
?>
|
9 |
<?php // phpcs:ignoreFile -- too many legacy warnings, needs full linter ?>
|
10 |
-
<div
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
<h3><?php _e( 'Account Info', 'polldaddy' ); ?></h3>
|
17 |
-
<p><?php _e( '<em>Crowdsignal</em> and <em>WordPress.com</em> are now connected using <a href="http://en.support.wordpress.com/wpcc-faq/">WordPress.com Connect</a>. If you have a WordPress.com account you can use it to login to <a href="https://app.crowdsignal.com/">Crowdsignal.com</a>. Click on the Crowdsignal "sign in" button, authorize the connection and create your new Crowdsignal account.', 'polldaddy' ); ?></p>
|
18 |
-
<p><?php _e( 'Login to the Crowdsignal website and scroll to the end of your <a href="https://app.crowdsignal.com/account/#apikey">account page</a> to create or retrieve an API key.', 'polldaddy' ); ?></p>
|
19 |
-
<?php if ( isset( $account_email ) && $account_email != false ) { ?>
|
20 |
-
<p><?php printf( __( 'Your account is currently linked to this API key: <strong>%s</strong>', 'polldaddy' ), WP_POLLDADDY__PARTNERGUID ); ?></p>
|
21 |
-
<br />
|
22 |
-
<h3><?php _e( 'Link to a different Crowdsignal account', 'polldaddy' ); ?></h3>
|
23 |
-
<?php } else { ?>
|
24 |
-
<br />
|
25 |
-
<h3><?php _e( 'Link to your Crowdsignal account', 'polldaddy' ); ?></h3>
|
26 |
-
<?php } ?>
|
27 |
-
<form action="" method="post">
|
28 |
-
<table class="form-table">
|
29 |
-
<tbody>
|
30 |
-
<tr class="form-field form-required">
|
31 |
-
<th valign="top" scope="row">
|
32 |
-
<label for="polldaddy-key">
|
33 |
-
<?php _e( 'Crowdsignal.com API Key', 'polldaddy' ); ?>
|
34 |
-
</label>
|
35 |
-
</th>
|
36 |
-
<td>
|
37 |
-
<input type="text" name="polldaddy_key" id="polldaddy-key" aria-required="true" size="20" value="<?php if ( isset( $_POST[ 'polldaddy_key' ] ) ) echo esc_attr( $_POST[ 'polldaddy_key' ] ); ?>" />
|
38 |
-
</td>
|
39 |
-
</tr>
|
40 |
-
</tbody>
|
41 |
-
</table>
|
42 |
-
<p class="submit">
|
43 |
-
<?php wp_nonce_field( 'polldaddy-account' ); ?>
|
44 |
-
<input type="hidden" name="action" value="import-account" />
|
45 |
-
<input type="hidden" name="account" value="import" />
|
46 |
-
<input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Link Account', 'polldaddy' ) ); ?>" />
|
47 |
-
</p>
|
48 |
-
</form>
|
49 |
-
<?php
|
50 |
-
}
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
<td>
|
63 |
-
<fieldset>
|
64 |
-
<legend class="screen-reader-text"><span>poll-defaults</span></legend>
|
65 |
-
<?php
|
66 |
-
foreach ( array( 'randomiseAnswers' => __( 'Randomize answer order', 'polldaddy' ), 'otherAnswer' => __( 'Allow other answers', 'polldaddy' ), 'multipleChoice' => __( 'Multiple choice', 'polldaddy' ), 'sharing' => __( 'Sharing', 'polldaddy' ) ) as $option => $label ) :
|
67 |
-
$checked = 'yes' === $poll->$option ? ' checked="checked"' : '';
|
68 |
-
?>
|
69 |
-
<label for="<?php echo $option; ?>"><input type="checkbox"<?php echo $checked; ?> value="1" id="<?php echo $option; ?>" name="<?php echo $option; ?>" /> <?php echo esc_html( $label ); ?></label><br />
|
70 |
-
<?php endforeach; ?>
|
71 |
-
<br class="clear" />
|
72 |
-
<br class="clear" />
|
73 |
-
<div class="field">
|
74 |
-
<label for="resultsType" class="pd-label">
|
75 |
-
<?php _e( 'Results Display', 'polldaddy' ); ?>
|
76 |
-
</label>
|
77 |
-
<select id="resultsType" name="resultsType">
|
78 |
-
<option <?php echo $poll->resultsType == 'show' ? 'selected="selected"':''; ?> value="show"><?php _e( 'Show', 'polldaddy' ); ?></option>
|
79 |
-
<option <?php echo $poll->resultsType == 'hide' ? 'selected="selected"':''; ?> value="hide"><?php _e( 'Hide', 'polldaddy' ); ?></option>
|
80 |
-
<option <?php echo $poll->resultsType == 'percent' ? 'selected="selected"':''; ?> value="percent"><?php _e( 'Percentages', 'polldaddy' ); ?></option>
|
81 |
-
</select>
|
82 |
-
</div>
|
83 |
-
<br class="clear" />
|
84 |
-
<div class="field">
|
85 |
-
<label for="styleID" class="pd-label"><?php _e( 'Poll style', 'polldaddy' ); ?></label>
|
86 |
-
<select id="styleID" name="styleID">
|
87 |
-
<?php
|
88 |
-
foreach ( (array) $options as $styleID => $label ) :
|
89 |
-
$selected = $styleID == $poll->styleID ? ' selected="selected"' : ''; ?>
|
90 |
-
<option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo esc_html( $label ); ?></option>
|
91 |
-
<?php endforeach; ?>
|
92 |
-
</select>
|
93 |
-
</div>
|
94 |
-
<br class="clear" />
|
95 |
-
<div class="field">
|
96 |
-
<label for="blockRepeatVotersType" class="pd-label"><?php _e( 'Repeat Voting', 'polldaddy' ); ?></label>
|
97 |
-
<select id="poll-block-repeat" name="blockRepeatVotersType">
|
98 |
-
<option <?php echo $poll->blockRepeatVotersType == 'off' ? 'selected="selected"':''; ?> value="off"><?php _e( 'Off', 'polldaddy' ); ?></option>
|
99 |
-
<option <?php echo $poll->blockRepeatVotersType == 'cookie' ? 'selected="selected"':''; ?> value="cookie"><?php _e( 'Cookie', 'polldaddy' ); ?></option>
|
100 |
-
<option <?php echo $poll->blockRepeatVotersType == 'cookieip' ? 'selected="selected"':''; ?> value="cookieip"><?php _e( 'Cookie & IP address', 'polldaddy' ); ?></option>
|
101 |
-
</select>
|
102 |
-
</div>
|
103 |
-
<br class="clear" />
|
104 |
-
<div class="field">
|
105 |
-
<label for="blockExpiration" class="pd-label"><?php _e( 'Block expiration limit', 'polldaddy' ); ?></label>
|
106 |
-
<select id="blockExpiration" name="blockExpiration">
|
107 |
-
<option value="3600" <?php echo $poll->blockExpiration == 3600 ? 'selected="selected"':''; ?>><?php printf( __( '%d hour', 'polldaddy' ), 1 ); ?></option>
|
108 |
-
<option value="10800" <?php echo (int) $poll->blockExpiration == 10800 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d hours', 'polldaddy' ), 3 ); ?></option>
|
109 |
-
<option value="21600" <?php echo (int) $poll->blockExpiration == 21600 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d hours', 'polldaddy' ), 6 ); ?></option>
|
110 |
-
<option value="43200" <?php echo (int) $poll->blockExpiration == 43200 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d hours', 'polldaddy' ), 12 ); ?></option>
|
111 |
-
<option value="86400" <?php echo (int) $poll->blockExpiration == 86400 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d day', 'polldaddy' ), 1 ); ?></option>
|
112 |
-
<option value="604800" <?php echo (int) $poll->blockExpiration == 604800 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d week', 'polldaddy' ), 1 ); ?></option>
|
113 |
-
</select>
|
114 |
-
</div>
|
115 |
-
<br class="clear" />
|
116 |
-
</fieldset>
|
117 |
-
</td>
|
118 |
-
</tr>
|
119 |
-
<?php $controller->plugin_options_add(); ?>
|
120 |
-
</tbody>
|
121 |
-
</table>
|
122 |
-
<p class="submit">
|
123 |
-
<?php wp_nonce_field( 'polldaddy-account' ); ?>
|
124 |
-
<input type="hidden" name="action" value="update-options" />
|
125 |
-
<input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Save Options', 'polldaddy' ) ); ?>" />
|
126 |
-
</p>
|
127 |
-
</form>
|
128 |
-
<?php
|
129 |
-
} // is_object( $poll )
|
130 |
-
?>
|
131 |
-
<div class="extra-stuff">
|
132 |
-
<?php
|
133 |
-
global $current_user;
|
134 |
-
$fields = array( 'polldaddy_api_key', 'pd-rating-comments', 'pd-rating-comments-id', 'pd-rating-comments-pos', 'pd-rating-exclude-post-ids', 'pd-rating-pages', 'pd-rating-pages-id', 'pd-rating-posts', 'pd-rating-posts-id', 'pd-rating-posts-index', 'pd-rating-posts-index-id', 'pd-rating-posts-index-pos', 'pd-rating-posts-pos', 'pd-rating-title-filter', 'pd-rating-usercode', 'pd-rich-snippets', 'pd-usercode-' . $current_user->ID );
|
135 |
-
$show_reset_form = false;
|
136 |
-
foreach( $fields as $field ) {
|
137 |
-
$value = get_option( $field );
|
138 |
-
if ( $value != false )
|
139 |
-
$show_reset_form = true;
|
140 |
-
$settings[ $field ] = $value;
|
141 |
-
}
|
142 |
-
if ( $show_reset_form ) {
|
143 |
-
echo "<h3>" . __( 'Reset Connection Settings', 'polldaddy' ) . "</h3>";
|
144 |
-
echo "<p>" . __( 'If you are experiencing problems connecting to the Crowdsignal website resetting your connection settings may help. A backup will be made. After resetting, link your account again with the same API key.', 'polldaddy' ) . "</p>";
|
145 |
-
echo "<p>" . __( 'The following settings will be reset:', 'polldaddy' ) . "</p>";
|
146 |
-
echo "<table>";
|
147 |
-
foreach( $settings as $key => $value ) {
|
148 |
-
if ( $value != '' ) {
|
149 |
-
if ( strpos( $key, 'usercode' ) ) {
|
150 |
-
$value = "***********" . substr( $value, -4 );
|
151 |
-
} elseif ( in_array( $key, array( 'pd-rating-pages-id', 'pd-rating-comments-id', 'pd-rating-posts-id' ) ) ) {
|
152 |
-
$value = "$value (<a href='https://app.crowdsignal.com/ratings/{$value}/edit/'>" . __( 'Edit', 'polldaddy' ) . "</a>)";
|
153 |
-
}
|
154 |
-
?>
|
155 |
-
<tr>
|
156 |
-
<th style="text-align: right"><?php echo esc_html( $key ); ?>:</th>
|
157 |
-
<td><?php echo $value; ?></td>
|
158 |
-
</tr>
|
159 |
-
<?php
|
160 |
-
}
|
161 |
-
}
|
162 |
-
echo "</table>";
|
163 |
-
echo "<p>" . __( "* The usercode is like a password, keep it secret.", 'polldaddy' ) . "</p>";
|
164 |
?>
|
165 |
-
|
166 |
-
<p class="submit">
|
167 |
-
<?php wp_nonce_field( 'polldaddy-reset' . $current_user->ID ); ?>
|
168 |
-
<input type="hidden" name="action" value="reset-account" />
|
169 |
-
<input type="hidden" name="account" value="import" />
|
170 |
-
<p><input type="checkbox" name="email" value="1" /> <?php _e( 'Send me an email with the connection settings for future reference' ); ?></p>
|
171 |
-
<input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Reset', 'polldaddy' ) ); ?>" />
|
172 |
-
</p>
|
173 |
-
</form>
|
174 |
-
<br />
|
175 |
<?php
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
if ( strpos( $key, 'usercode' ) ) {
|
185 |
-
$value = "***********" . substr( $value, -4 );
|
186 |
-
} elseif ( in_array( $key, array( 'pd-rating-pages-id', 'pd-rating-comments-id', 'pd-rating-posts-id' ) ) ) {
|
187 |
-
$value = "$value (<a href='https://app.crowdsignal.com/ratings/{$value}/edit/'>" . __( 'Edit', 'polldaddy' ) . "</a>)";
|
188 |
-
}
|
189 |
-
?>
|
190 |
-
<tr>
|
191 |
-
<th style="text-align: right"><?php echo esc_html( $key ); ?>:</th>
|
192 |
-
<td><?php echo $value; ?></td>
|
193 |
-
</tr>
|
194 |
-
<?php
|
195 |
-
}
|
196 |
-
}
|
197 |
-
echo "</table>";
|
198 |
-
echo "<p>" . __( "* The usercode is like a password, keep it secret.", 'polldaddy' ) . "</p>";
|
199 |
?>
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
|
|
|
|
209 |
<?php
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
&& isset( $previous_settings[ 'pd-rating-posts-id' ] )
|
214 |
-
&& $settings[ 'pd-rating-posts-id' ] != $previous_settings[ 'pd-rating-posts-id' ]
|
215 |
-
) {
|
216 |
-
echo "<h3>" . __( 'Restore Ratings Settings', 'polldaddy' ) . "</h3>";
|
217 |
-
echo "<p>" . __( 'Different rating settings detected. If you are missing ratings on your posts, pages or comments you can restore the original rating settings by clicking the button below.', 'polldaddy' ) . "</p>";
|
218 |
-
echo "<p>" . __( 'This tells the plugin to look for this data in a different rating in your Crowdsignal account.', 'polldaddy' ) . "</p>";
|
219 |
-
?>
|
220 |
-
<form action="" method="post">
|
221 |
-
<p class="submit">
|
222 |
-
<?php wp_nonce_field( 'polldaddy-restore-ratings' . $current_user->ID ); ?>
|
223 |
-
<input type="hidden" name="action" value="restore-ratings" />
|
224 |
-
<input type="hidden" name="account" value="import" />
|
225 |
-
<input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Restore Ratings Only', 'polldaddy' ) ); ?>" />
|
226 |
-
</p>
|
227 |
-
</form>
|
228 |
-
<br />
|
229 |
-
<?php
|
230 |
}
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
?>
|
9 |
<?php // phpcs:ignoreFile -- too many legacy warnings, needs full linter ?>
|
10 |
+
<div class='cs-settings-container'>
|
11 |
+
<div class="cs-card cs-section-header is-compact">
|
12 |
+
<div class="cs-section-header__label">
|
13 |
+
<span class="cs-section-header__label-text"><?php esc_html_e( 'Account Settings', 'crowdsignal-forms' ); ?></span>
|
14 |
+
</div>
|
15 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
+
<div class="cs-card cs-section-header is-compact">
|
18 |
+
<div class="cs-form-settings-group">
|
19 |
+
<h2><?php esc_html_e( 'API Key', 'crowdsignal-forms' ); ?></h2>
|
20 |
+
<p>
|
21 |
+
<?php
|
22 |
+
printf(
|
23 |
+
/* translators: Placeholder is the text "Crowdsignal". */
|
24 |
+
esc_html__( 'Your website is connected to a %s account to collect responses and data from your visitors.', 'crowdsignal-forms' ),
|
25 |
+
'<a href="https://crowdsignal.com/">Crowdsignal</a>'
|
26 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
?>
|
28 |
+
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
<?php
|
30 |
+
printf(
|
31 |
+
/* translators: Placeholder is the text "Crowdsignal acount page". */
|
32 |
+
esc_html__( 'Visit your %s to find out more about your settings.', 'crowdsignal-forms' ),
|
33 |
+
sprintf(
|
34 |
+
'<a href="https://crowdsignal.com/account/">%s</a>',
|
35 |
+
esc_html__( 'Crowdsignal account page', 'crowdsignal-forms' )
|
36 |
+
)
|
37 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
?>
|
39 |
+
</p>
|
40 |
+
<?php if ( ! $api_key ) { ?>
|
41 |
+
<p>
|
42 |
+
<?php esc_html_e( 'If you have a Crowdsignal account, click the "Get API Key" button to connect. This will open a new window.', 'crowdsignal-forms' ); ?>
|
43 |
+
<form id="cs-connect-form" class="crowdsignal-options" method="post" action="https://app.crowdsignal.com/get-api-key/" target="CSCONNECT">
|
44 |
+
<input type="hidden" name="get_api_key" value="<?php echo esc_attr( get_option( 'crowdsignal_api_key_secret' ) ); ?>" />
|
45 |
+
<input type="hidden" name="ref" value="<?php echo esc_attr( admin_url( 'options-general.php?page=crowdsignal-settings' ) ); ?>" />
|
46 |
+
<input type="submit" value="<?php esc_html_e( 'Get API Key', 'crowdsignal-forms' ); ?>" class="cs-button is-primary" />
|
47 |
+
</form>
|
48 |
+
</p>
|
49 |
+
<?php } ?>
|
50 |
+
<form class="crowdsignal-options" method="post" action="<?php echo esc_url( admin_url( 'options-general.php?page=crowdsignal-settings' ) ); ?>">
|
51 |
<?php
|
52 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Used for basic flow.
|
53 |
+
if ( ! empty( $_GET['settings-updated'] ) ) {
|
54 |
+
echo '<div class="updated fade crowdsignal-updated"><p>' . esc_html__( 'Settings successfully saved', 'crowdsignal-forms' ) . '</p></div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
+
|
57 |
+
?>
|
58 |
+
<div style='padding-bottom:16px;' id="settings-general" class="settings_panel">
|
59 |
+
<table class="form-table settings parent-settings">
|
60 |
+
<tr valign="top" class="">
|
61 |
+
<th scope="row"><label for="setting-crowdsignal_api_key"><?php esc_html_e( 'Your Crowdsignal API Key', 'crowdsignal-forms' ); ?></a></th>
|
62 |
+
<td><input
|
63 |
+
<?php echo $api_key ? 'readonly' : ''; ?>
|
64 |
+
id="setting-crowdsignal_api_key"
|
65 |
+
class="regular-text"
|
66 |
+
type="text"
|
67 |
+
name="crowdsignal_api_key"
|
68 |
+
value="<?php echo esc_attr( $api_key ); ?>"
|
69 |
+
/>
|
70 |
+
</td>
|
71 |
+
<td>
|
72 |
+
<?php
|
73 |
+
if ( $api_key ) {
|
74 |
+
wp_nonce_field( 'disconnect-api-key' );
|
75 |
+
?>
|
76 |
+
<input type="hidden" name="action" value="disconnect" />
|
77 |
+
<input type="submit" class="button-primary" value="<?php esc_attr_e( 'Disconnect', 'crowdsignal-forms' ); ?>" />
|
78 |
+
<?php
|
79 |
+
} else {
|
80 |
+
wp_nonce_field( 'add-api-key' );
|
81 |
+
?>
|
82 |
+
<input type="hidden" name="action" value="update" />
|
83 |
+
<input type="submit" class="button-primary" value="<?php esc_attr_e( 'Connect', 'crowdsignal-forms' ); ?>" />
|
84 |
+
<?php
|
85 |
+
}
|
86 |
+
?>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
</table>
|
90 |
+
</div>
|
91 |
+
</form>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
|
96 |
+
<?php if ( ! $api_key ) { ?>
|
97 |
+
<script>
|
98 |
+
let CSCONNECT = null;
|
99 |
+
const showConnect = ( title ) => {
|
100 |
+
// window size, match standard iPhone screen size
|
101 |
+
const widthRatio = 1/2;
|
102 |
+
const heightRatio = 3/4;
|
103 |
+
|
104 |
+
// Fixes dual-screen position
|
105 |
+
const dualScreenLeft = window.screenLeft !== undefined
|
106 |
+
? window.screenLeft // Most browsers
|
107 |
+
: window.screenX; // Firefox
|
108 |
+
const dualScreenTop = window.screenTop !== undefined
|
109 |
+
? window.screenTop // Most browsers
|
110 |
+
: window.screenY; // Firefox
|
111 |
+
|
112 |
+
const width = window.innerWidth
|
113 |
+
? window.innerWidth
|
114 |
+
: document.documentElement.clientWidth
|
115 |
+
? document.documentElement.clientWidth
|
116 |
+
: screen.width;
|
117 |
+
const height = window.innerHeight
|
118 |
+
? window.innerHeight
|
119 |
+
: document.documentElement.clientHeight
|
120 |
+
? document.documentElement.clientHeight
|
121 |
+
: screen.height;
|
122 |
+
|
123 |
+
const popupWidth = width * widthRatio;
|
124 |
+
const popupHeight = height * heightRatio;
|
125 |
+
|
126 |
+
const left = ( (width / 2 ) - ( popupWidth / 2 ) ) + dualScreenLeft;
|
127 |
+
const top = ( (height / 2 ) - ( popupHeight / 2 ) ) + dualScreenTop;
|
128 |
+
|
129 |
+
CSCONNECT = window.open( 'about:blank', title,
|
130 |
+
`
|
131 |
+
location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,
|
132 |
+
width=${ parseInt( popupWidth, 10 ) },
|
133 |
+
height=${ parseInt( popupHeight, 10 ) },
|
134 |
+
top=${ parseInt( top, 10 ) },
|
135 |
+
left=${ parseInt( left, 10 ) }
|
136 |
+
`
|
137 |
+
)
|
138 |
+
|
139 |
+
if ( window.focus ) CSCONNECT.focus();
|
140 |
+
}
|
141 |
+
( function( form ) {
|
142 |
+
form.onsubmit = function() {
|
143 |
+
showConnect( 'CSCONNECT' );
|
144 |
+
}
|
145 |
+
} )( document.getElementById( 'cs-connect-form' ) );
|
146 |
+
</script>
|
147 |
+
<?php } ?>
|
polldaddy-client.php
CHANGED
@@ -178,7 +178,7 @@ class api_client {
|
|
178 |
*/
|
179 |
function get_usercode( $partnerUserID ) {
|
180 |
$this->request = new Polldaddy_Access( array(
|
181 |
-
//
|
182 |
'demands' => new Polldaddy_Demands( array( 'demand' => new Polldaddy_Demand( null, array( 'id' => 'getusercode' ) ) ) )
|
183 |
), array(
|
184 |
'partnerGUID' => $this->partnerGUID,
|
@@ -207,7 +207,7 @@ class api_client {
|
|
207 |
return false;
|
208 |
|
209 |
$this->request = new Polldaddy_Access( array(
|
210 |
-
//
|
211 |
'demands' => new Polldaddy_Demands( array( 'demand' => new Polldaddy_Demand( compact( 'account' ), array( 'id' => 'createaccount' ) ) ) )
|
212 |
), array(
|
213 |
'partnerGUID' => $this->partnerGUID,
|
@@ -219,20 +219,19 @@ class api_client {
|
|
219 |
return false;
|
220 |
}
|
221 |
|
222 |
-
function sync_rating( ){
|
223 |
-
|
224 |
|
225 |
-
|
226 |
-
|
227 |
-
$demand = $this->response_part( $pos );
|
228 |
|
229 |
-
|
230 |
-
return $demand->rating;
|
231 |
-
}
|
232 |
|
233 |
-
|
|
|
|
|
234 |
|
235 |
-
|
|
|
236 |
|
237 |
/* pdRequest: Request API Objects */
|
238 |
|
@@ -241,7 +240,7 @@ function sync_rating( ){
|
|
241 |
* @return object|false Polldaddy Account or false on failure
|
242 |
*/
|
243 |
function get_account() {
|
244 |
-
//
|
245 |
$pos = $this->add_request( 'getaccount' );
|
246 |
$this->send_request();
|
247 |
$r = $this->response_part( $pos );
|
@@ -259,7 +258,7 @@ function sync_rating( ){
|
|
259 |
if ( !$account = polldaddy_account( $args ) )
|
260 |
return false;
|
261 |
|
262 |
-
//
|
263 |
$this->add_request( 'updateaccount', $account );
|
264 |
$this->send_request();
|
265 |
if ( isset( $this->response->userCode ) )
|
@@ -275,10 +274,10 @@ function sync_rating( ){
|
|
275 |
$start = (int) $start;
|
276 |
$end = (int) $end;
|
277 |
if ( !$start && !$end )
|
278 |
-
//
|
279 |
$pos = $this->add_request( 'getpolls' );
|
280 |
else
|
281 |
-
//
|
282 |
$pos = $this->add_request( 'getpolls', new Polldaddy_List( null, compact( 'start', 'end' ) ) );
|
283 |
$this->send_request();
|
284 |
$r = $this->response_part( $pos );
|
@@ -314,7 +313,6 @@ function sync_rating( ){
|
|
314 |
}
|
315 |
$this->send_request();
|
316 |
$r = $this->response_part( $pos );
|
317 |
-
|
318 |
if ( isset( $r->items ) ) {
|
319 |
if ( isset( $r->items->item ) ) {
|
320 |
if ( ! is_array( $r->items->item ) ) {
|
178 |
*/
|
179 |
function get_usercode( $partnerUserID ) {
|
180 |
$this->request = new Polldaddy_Access( array(
|
181 |
+
// 'demands' => new Polldaddy_Demands( array( 'demand' => new Polldaddy_Demand( null, array( 'id' => __FUNCTION__ ) ) ) )
|
182 |
'demands' => new Polldaddy_Demands( array( 'demand' => new Polldaddy_Demand( null, array( 'id' => 'getusercode' ) ) ) )
|
183 |
), array(
|
184 |
'partnerGUID' => $this->partnerGUID,
|
207 |
return false;
|
208 |
|
209 |
$this->request = new Polldaddy_Access( array(
|
210 |
+
// 'demands' => new Polldaddy_Demands( array( 'demand' => new Polldaddy_Demand( compact( 'account' ), array( 'id' => __FUNCTION__ ) ) ) )
|
211 |
'demands' => new Polldaddy_Demands( array( 'demand' => new Polldaddy_Demand( compact( 'account' ), array( 'id' => 'createaccount' ) ) ) )
|
212 |
), array(
|
213 |
'partnerGUID' => $this->partnerGUID,
|
219 |
return false;
|
220 |
}
|
221 |
|
222 |
+
function sync_rating( ){
|
223 |
+
$pos = $this->add_request( 'syncrating', new Polldaddy_Rating( null , null ) );
|
224 |
|
225 |
+
$this->send_request();
|
|
|
|
|
226 |
|
227 |
+
$demand = $this->response_part( $pos );
|
|
|
|
|
228 |
|
229 |
+
if ( is_a( $demand, 'Ghetto_XML_Object' ) && isset( $demand->rating ) ){
|
230 |
+
return $demand->rating;
|
231 |
+
}
|
232 |
|
233 |
+
return false;
|
234 |
+
}
|
235 |
|
236 |
/* pdRequest: Request API Objects */
|
237 |
|
240 |
* @return object|false Polldaddy Account or false on failure
|
241 |
*/
|
242 |
function get_account() {
|
243 |
+
// $pos = $this->add_request( __FUNCTION__ );
|
244 |
$pos = $this->add_request( 'getaccount' );
|
245 |
$this->send_request();
|
246 |
$r = $this->response_part( $pos );
|
258 |
if ( !$account = polldaddy_account( $args ) )
|
259 |
return false;
|
260 |
|
261 |
+
// $this->add_request( __FUNCTION__, $account );
|
262 |
$this->add_request( 'updateaccount', $account );
|
263 |
$this->send_request();
|
264 |
if ( isset( $this->response->userCode ) )
|
274 |
$start = (int) $start;
|
275 |
$end = (int) $end;
|
276 |
if ( !$start && !$end )
|
277 |
+
// $pos = $this->add_request( __FUNCTION__ );
|
278 |
$pos = $this->add_request( 'getpolls' );
|
279 |
else
|
280 |
+
// $pos = $this->add_request( __FUNCTION__, new Polldaddy_List( null, compact( 'start', 'end' ) ) );
|
281 |
$pos = $this->add_request( 'getpolls', new Polldaddy_List( null, compact( 'start', 'end' ) ) );
|
282 |
$this->send_request();
|
283 |
$r = $this->response_part( $pos );
|
313 |
}
|
314 |
$this->send_request();
|
315 |
$r = $this->response_part( $pos );
|
|
|
316 |
if ( isset( $r->items ) ) {
|
317 |
if ( isset( $r->items->item ) ) {
|
318 |
if ( ! is_array( $r->items->item ) ) {
|
polldaddy-org.php
CHANGED
@@ -81,7 +81,7 @@ class WPORG_Polldaddy extends WP_Polldaddy {
|
|
81 |
|
82 |
$this->set_api_user_code();
|
83 |
|
84 |
-
if ( 'polls' === $page || '
|
85 |
switch ( $action ) {
|
86 |
case 'update-options' :
|
87 |
if ( !$is_POST )
|
@@ -117,12 +117,6 @@ class WPORG_Polldaddy extends WP_Polldaddy {
|
|
117 |
$polldaddy->update_partner_account( $partner );
|
118 |
update_option( 'polldaddy_multiple_accounts', $polldaddy_multiple_accounts );
|
119 |
update_option( 'polldaddy_load_poll_inline', $polldaddy_load_poll_inline );
|
120 |
-
|
121 |
-
$rating_title_filter = '';
|
122 |
-
if ( isset( $_POST['polldaddy-ratings-title-filter'] ) )
|
123 |
-
$rating_title_filter = sanitize_text_field( $_POST['polldaddy-ratings-title-filter'] );
|
124 |
-
|
125 |
-
update_option( 'pd-rating-title-filter', $rating_title_filter );
|
126 |
}
|
127 |
break;
|
128 |
} //end switch
|
@@ -658,7 +652,7 @@ function polldaddy_login_warning() {
|
|
658 |
return;
|
659 |
}
|
660 |
|
661 |
-
echo '<div class="updated"><p><strong>' . sprintf( __( 'Warning! The Crowdsignal plugin must be linked to your Crowdsignal.com account. Please visit the <a href="%s">plugin settings page</a> to login.', 'polldaddy' ), admin_url( 'options-general.php?page=
|
662 |
}
|
663 |
add_action( 'admin_notices', 'polldaddy_login_warning' );
|
664 |
|
81 |
|
82 |
$this->set_api_user_code();
|
83 |
|
84 |
+
if ( 'polls' === $page || 'crowdsignal-settings' === $page ) {
|
85 |
switch ( $action ) {
|
86 |
case 'update-options' :
|
87 |
if ( !$is_POST )
|
117 |
$polldaddy->update_partner_account( $partner );
|
118 |
update_option( 'polldaddy_multiple_accounts', $polldaddy_multiple_accounts );
|
119 |
update_option( 'polldaddy_load_poll_inline', $polldaddy_load_poll_inline );
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
break;
|
122 |
} //end switch
|
652 |
return;
|
653 |
}
|
654 |
|
655 |
+
echo '<div class="updated"><p><strong>' . sprintf( __( 'Warning! The Crowdsignal plugin must be linked to your Crowdsignal.com account. Please visit the <a href="%s">plugin settings page</a> to login.', 'polldaddy' ), admin_url( 'options-general.php?page=crowdsignal-settings' ) ) . '</strong></p></div>';
|
656 |
}
|
657 |
add_action( 'admin_notices', 'polldaddy_login_warning' );
|
658 |
|
polldaddy.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Create and manage Crowdsignal polls and ratings in WordPress
|
6 |
* Author: Automattic, Inc.
|
7 |
* Author URL: https://crowdsignal.com/
|
8 |
-
* Version: 3.0.
|
9 |
*/
|
10 |
|
11 |
// To hardcode your Polldaddy PartnerGUID (API Key), add the (uncommented) line below with the PartnerGUID to your `wp-config.php`
|
@@ -157,6 +157,10 @@ class WP_Polldaddy {
|
|
157 |
}
|
158 |
|
159 |
function admin_menu() {
|
|
|
|
|
|
|
|
|
160 |
add_action( 'wp_enqueue_scripts', array( &$this, 'register_polldaddy_styles' ) );
|
161 |
add_action( 'admin_enqueue_scripts', array( &$this, 'menu_alter' ) );
|
162 |
|
@@ -195,7 +199,7 @@ class WP_Polldaddy {
|
|
195 |
}
|
196 |
|
197 |
// Add settings pages.
|
198 |
-
foreach( array( '
|
199 |
// translators: %s placeholder is the setting page type (Poll or Rating).
|
200 |
$settings_page_title = sprintf( esc_html__( '%s', 'polldaddy' ), $page_title );
|
201 |
$hook = add_options_page( $settings_page_title, $settings_page_title, $menu_slug == 'ratings' ? 'manage_options' : $capability, $menu_slug, array( $this, 'settings_page' ) );
|
@@ -434,9 +438,47 @@ class WP_Polldaddy {
|
|
434 |
wp_reset_vars( array( 'page', 'action', 'poll', 'style', 'rating', 'id' ) );
|
435 |
global $plugin_page, $page, $action, $poll, $style, $rating, $id, $wp_locale;
|
436 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
$this->set_api_user_code();
|
438 |
|
439 |
-
if ( empty( $this->user_code ) && '
|
440 |
// one last try to get the user code automatically if possible
|
441 |
$this->user_code = apply_filters_ref_array( 'polldaddy_get_user_code', array( $this->user_code, &$this ) );
|
442 |
if ( false == $this->user_code && $action != 'restore-account' )
|
@@ -445,16 +487,321 @@ class WP_Polldaddy {
|
|
445 |
|
446 |
require_once WP_POLLDADDY__POLLDADDY_CLIENT_PATH;
|
447 |
|
|
|
448 |
wp_enqueue_style( 'wp-components' );
|
449 |
wp_enqueue_script( 'polls', "{$this->base_url}js/polldaddy.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-form', 'wp-components' ), $this->version );
|
450 |
wp_enqueue_script( 'polls-common', "{$this->base_url}js/common.js", array(), $this->version );
|
451 |
|
452 |
if ( $page == 'polls' ) {
|
453 |
-
if ( !$this->is_author && in_array( $action, array( 'edit', 'edit-poll', 'create-poll', 'edit-style', 'create-style', 'list-styles', 'options', 'update-options', 'import-account' ) ) ) {//check user privileges has access to action
|
454 |
$action = '';
|
455 |
}
|
456 |
|
457 |
switch ( $action ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
case 'edit' :
|
459 |
case 'edit-poll' :
|
460 |
case 'create-poll' :
|
@@ -477,8 +824,8 @@ class WP_Polldaddy {
|
|
477 |
$plugin_page = 'polls&action=list-styles';
|
478 |
break;
|
479 |
}//end switch
|
480 |
-
} elseif ( $page == '
|
481 |
-
$plugin_page = '
|
482 |
} elseif ( $page == 'ratings' ) {
|
483 |
if ( empty( $action ) ) {
|
484 |
$action = 'reports';
|
@@ -540,8 +887,13 @@ class WP_Polldaddy {
|
|
540 |
|
541 |
$is_POST = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] );
|
542 |
|
543 |
-
if ( 'polls' === $page || '
|
544 |
switch ( $action ) {
|
|
|
|
|
|
|
|
|
|
|
545 |
case 'reset-account' : // reset everything
|
546 |
global $current_user;
|
547 |
check_admin_referer( 'polldaddy-reset' . $this->id );
|
@@ -1281,9 +1633,13 @@ class WP_Polldaddy {
|
|
1281 |
$message = sprintf( _n( '%s Style Deleted.', '%s Custom Styles Deleted.', $deleted, 'polldaddy' ), number_format_i18n( $deleted ) );
|
1282 |
}
|
1283 |
break;
|
|
|
1284 |
case 'imported-account' :
|
1285 |
$message = __( 'Account Linked.', 'polldaddy' );
|
1286 |
break;
|
|
|
|
|
|
|
1287 |
case 'updated-options' :
|
1288 |
$message = __( 'Options Updated.', 'polldaddy' );
|
1289 |
break;
|
@@ -1319,9 +1675,9 @@ class WP_Polldaddy {
|
|
1319 |
|
1320 |
if ( !$message )
|
1321 |
return;
|
1322 |
-
?>
|
1323 |
<div class='updated'><p><?php echo $message; ?></p></div>
|
1324 |
-
<?php
|
1325 |
$this->print_errors();
|
1326 |
}
|
1327 |
|
@@ -1329,7 +1685,6 @@ class WP_Polldaddy {
|
|
1329 |
global $page, $action;
|
1330 |
?>
|
1331 |
<div class="wrap" id="manage-polls">
|
1332 |
-
<div class="cs-pre-wrap"></div>
|
1333 |
<div class="cs-wrapper">
|
1334 |
<?php
|
1335 |
$this->set_api_user_code();
|
@@ -1337,7 +1692,7 @@ class WP_Polldaddy {
|
|
1337 |
if ( isset( $_GET['page'] ) ) { // phpcs:ignore
|
1338 |
$page = $_GET['page']; // phpcs:ignore
|
1339 |
}
|
1340 |
-
if ( '
|
1341 |
if ( ! $this->is_author ) { // check user privileges has access to action.
|
1342 |
return;
|
1343 |
}
|
@@ -1363,7 +1718,6 @@ class WP_Polldaddy {
|
|
1363 |
?>
|
1364 |
|
1365 |
<div class="wrap" id="manage-polls">
|
1366 |
-
<div class="cs-pre-wrap"></div>
|
1367 |
<div class="cs-wrapper">
|
1368 |
<?php
|
1369 |
if ( 'polls' === $page ) {
|
@@ -3953,7 +4307,7 @@ class WP_Polldaddy {
|
|
3953 |
$previous_settings = get_option( 'polldaddy_settings' );
|
3954 |
$current_setting = get_option( 'pd-rating-posts-id' );
|
3955 |
if ( $current_setting && isset( $previous_settings[ 'pd-rating-posts-id' ] ) && $current_setting != $previous_settings[ 'pd-rating-posts-id' ] ) {
|
3956 |
-
echo "<p>" . sprintf( __( "Previous settings for ratings on this site discovered. You can restore them on the <a href='%s'>poll settings page</a> if your site is missing ratings after resetting your connection settings.", 'polldaddy' ), "options-general.php?page=
|
3957 |
}
|
3958 |
?>
|
3959 |
</div>
|
@@ -4905,16 +5259,38 @@ class WP_Polldaddy {
|
|
4905 |
|
4906 |
$this->print_errors();
|
4907 |
|
4908 |
-
$this->render_partial(
|
4909 |
-
|
4910 |
-
|
4911 |
-
|
4912 |
-
|
4913 |
-
|
4914 |
-
'
|
4915 |
-
|
4916 |
-
|
4917 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4918 |
}
|
4919 |
|
4920 |
function plugin_options_add() {}
|
@@ -4960,7 +5336,7 @@ class WP_Polldaddy {
|
|
4960 |
echo '<h1>' . $message . '</h1>';
|
4961 |
echo '<p>' . __( "There are a few things you can do:" );
|
4962 |
echo "<ul><ol>" . __( "Press reload on your browser and reload this page. There may have been a temporary problem communicating with Crowdsignal.com", "polldaddy" ) . "</ol>";
|
4963 |
-
echo "<ol>" . sprintf( __( "Go to the <a href='%s'>poll settings page</a>, scroll to the end of the page and reset your connection settings. Link your account again with the same API key.", "polldaddy" ), 'options-general.php?page=
|
4964 |
echo "<ol>" . sprintf( __( 'Contact <a href="%1$s" %2$s>Crowdsignal support</a> and tell them your rating usercode is %3$s', 'polldaddy' ), 'https://crowdsignal.com/feedback/', 'target="_blank"', $this->rating_user_code ) . '<br />' . __( 'Also include the following information when contacting support to help us resolve your problem as quickly as possible:', 'polldaddy' ) . '';
|
4965 |
echo "<ul><li> API Key: " . get_option( 'polldaddy_api_key' ) . "</li>";
|
4966 |
echo "<li> ID Usercode: " . get_option( 'pd-usercode-' . $current_user->ID ) . "</li>";
|
5 |
* Description: Create and manage Crowdsignal polls and ratings in WordPress
|
6 |
* Author: Automattic, Inc.
|
7 |
* Author URL: https://crowdsignal.com/
|
8 |
+
* Version: 3.0.6
|
9 |
*/
|
10 |
|
11 |
// To hardcode your Polldaddy PartnerGUID (API Key), add the (uncommented) line below with the PartnerGUID to your `wp-config.php`
|
157 |
}
|
158 |
|
159 |
function admin_menu() {
|
160 |
+
if ( isset( $_GET['page'] ) && 'pollsettings' === $_GET['page'] ) {
|
161 |
+
wp_safe_redirect( admin_url( 'options-general.php?page=crowdsignal-settings' ) );
|
162 |
+
die();
|
163 |
+
}
|
164 |
add_action( 'wp_enqueue_scripts', array( &$this, 'register_polldaddy_styles' ) );
|
165 |
add_action( 'admin_enqueue_scripts', array( &$this, 'menu_alter' ) );
|
166 |
|
199 |
}
|
200 |
|
201 |
// Add settings pages.
|
202 |
+
foreach( array( 'crowdsignal-settings' => __( 'Crowdsignal', 'polldaddy' ), 'ratingsettings' => __( 'Ratings', 'polldaddy' ) ) as $menu_slug => $page_title ) {
|
203 |
// translators: %s placeholder is the setting page type (Poll or Rating).
|
204 |
$settings_page_title = sprintf( esc_html__( '%s', 'polldaddy' ), $page_title );
|
205 |
$hook = add_options_page( $settings_page_title, $settings_page_title, $menu_slug == 'ratings' ? 'manage_options' : $capability, $menu_slug, array( $this, 'settings_page' ) );
|
438 |
wp_reset_vars( array( 'page', 'action', 'poll', 'style', 'rating', 'id' ) );
|
439 |
global $plugin_page, $page, $action, $poll, $style, $rating, $id, $wp_locale;
|
440 |
|
441 |
+
if (
|
442 |
+
isset( $_GET['step'] ) && 2 === (int) $_GET['step']
|
443 |
+
&& isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === $_SERVER['REQUEST_METHOD']
|
444 |
+
&& isset( $_POST['got_api_key'] ) && get_option( 'crowdsignal_api_key_secret' ) === $_POST['got_api_key']
|
445 |
+
&& isset( $_POST['api_key'] )
|
446 |
+
) {
|
447 |
+
$api_key = sanitize_key( wp_unslash( $_POST['api_key'] ) );
|
448 |
+
$crowdsignal = $this->get_client( $api_key );
|
449 |
+
$crowdsignal->reset();
|
450 |
+
$usercode = $crowdsignal->get_usercode( $this->id );
|
451 |
+
if ( $usercode ) {
|
452 |
+
update_option( 'polldaddy_api_key', $api_key );
|
453 |
+
update_option( 'crowdsignal_api_key', $api_key );
|
454 |
+
update_option( 'crowdsignal_user_code', $usercode );
|
455 |
+
update_option( 'pd-usercode-' . $this->id, $usercode );
|
456 |
+
delete_option( 'crowdsignal_api_key_secret' );
|
457 |
+
$connected = true;
|
458 |
+
} else {
|
459 |
+
$connected = false;
|
460 |
+
}
|
461 |
+
$this->render_partial(
|
462 |
+
'html-admin-setup-step-2',
|
463 |
+
array(
|
464 |
+
'is_connected' => $connected,
|
465 |
+
)
|
466 |
+
);
|
467 |
+
die();
|
468 |
+
}
|
469 |
+
|
470 |
+
if ( isset( $_POST['action'] ) && $_POST['action'] === 'disconnect' ) {
|
471 |
+
check_admin_referer( 'disconnect-api-key' );
|
472 |
+
delete_option( 'polldaddy_api_key' );
|
473 |
+
delete_option( 'crowdsignal_api_key' );
|
474 |
+
delete_option( 'crowdsignal_user_code' );
|
475 |
+
delete_option( 'pd-usercode-' . $this->id );
|
476 |
+
wp_safe_redirect( admin_url( 'options-general.php?page=crowdsignal-settings&msg=disconnected' ) );
|
477 |
+
}
|
478 |
+
|
479 |
$this->set_api_user_code();
|
480 |
|
481 |
+
if ( empty( $this->user_code ) && 'crowdsignal-settings' === $page && 'options' !== $action ) {
|
482 |
// one last try to get the user code automatically if possible
|
483 |
$this->user_code = apply_filters_ref_array( 'polldaddy_get_user_code', array( $this->user_code, &$this ) );
|
484 |
if ( false == $this->user_code && $action != 'restore-account' )
|
487 |
|
488 |
require_once WP_POLLDADDY__POLLDADDY_CLIENT_PATH;
|
489 |
|
490 |
+
wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '/admin-styles.css', array(), '1.5.12' );
|
491 |
wp_enqueue_style( 'wp-components' );
|
492 |
wp_enqueue_script( 'polls', "{$this->base_url}js/polldaddy.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-form', 'wp-components' ), $this->version );
|
493 |
wp_enqueue_script( 'polls-common', "{$this->base_url}js/common.js", array(), $this->version );
|
494 |
|
495 |
if ( $page == 'polls' ) {
|
496 |
+
if ( !$this->is_author && in_array( $action, array( 'edit', 'edit-poll', 'create-poll', 'edit-style', 'create-style', 'list-styles', 'options', 'update-options', 'import-account', 'create-block-poll' ) ) ) {//check user privileges has access to action
|
497 |
$action = '';
|
498 |
}
|
499 |
|
500 |
switch ( $action ) {
|
501 |
+
case 'create-block-poll':
|
502 |
+
$post_id = wp_insert_post(
|
503 |
+
array(
|
504 |
+
'post_title' => esc_html__( 'Crowdsignal blocks in WordPress' ),
|
505 |
+
|
506 |
+
'post_content' => '
|
507 |
+
<!-- wp:paragraph -->
|
508 |
+
<p>Welcome to this little demo page! We would love to introduce you to our set of Crowdsignal blocks and created this post for you, so that you can test and play with all of them right inside of your editor. </p>
|
509 |
+
<!-- /wp:paragraph -->
|
510 |
+
|
511 |
+
<!-- wp:paragraph -->
|
512 |
+
<p><a href="https://wordpress.org/support/article/how-to-use-the-preview-function/">Preview this post</a> if you would like to test the Crowdsignal blocks from your visitors perspective. <em>Oh and please feel free to delete this draft post anytime</em>, it was only created for demo purposes.</p>
|
513 |
+
<!-- /wp:paragraph -->
|
514 |
+
|
515 |
+
<!-- wp:spacer {"height":60} -->
|
516 |
+
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
|
517 |
+
<!-- /wp:spacer -->
|
518 |
+
|
519 |
+
<!-- wp:heading -->
|
520 |
+
<h2>Overview</h2>
|
521 |
+
<!-- /wp:heading -->
|
522 |
+
|
523 |
+
<!-- wp:paragraph -->
|
524 |
+
<p>Let\'s start with a quick overview of all our current blocks available in your WordPress editor. You can <a href="https://wordpress.com/support/wordpress-editor/">find all these blocks inside your block library via searching</a> for their name or simply by searching "Crowdsignal".</p>
|
525 |
+
<!-- /wp:paragraph -->
|
526 |
+
|
527 |
+
<!-- wp:image {"align":"wide","id":241,"sizeSlug":"full","linkDestination":"none"} -->
|
528 |
+
<figure class="wp-block-image alignwide size-full"><img src="https://crowdsignal.files.wordpress.com/2021/11/crowdsignalcards.png" alt="" class="wp-image-241"/></figure>
|
529 |
+
<!-- /wp:image -->
|
530 |
+
|
531 |
+
<!-- wp:paragraph -->
|
532 |
+
<p>If you want to learn more about Crowdsignal please go to <a href="https://crowdsignal.com" data-type="URL" data-id="https://crowdsignal.com">crowdsignal.com</a> and join our little <a href="https://crowdsignalfeedback.wordpress.com/">community</a> all about feedback here.</p>
|
533 |
+
<!-- /wp:paragraph -->
|
534 |
+
|
535 |
+
<!-- wp:spacer {"height":60} -->
|
536 |
+
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
|
537 |
+
<!-- /wp:spacer -->
|
538 |
+
|
539 |
+
<!-- wp:heading -->
|
540 |
+
<h2>Polls</h2>
|
541 |
+
<!-- /wp:heading -->
|
542 |
+
|
543 |
+
<!-- wp:paragraph -->
|
544 |
+
<p>We all have opinions! Curious about the opinion of your audience? Start asking with our poll block. It makes creating a poll as fast and simple as listing bullet points.</p>
|
545 |
+
<!-- /wp:paragraph -->
|
546 |
+
|
547 |
+
<!-- wp:paragraph -->
|
548 |
+
<p> You can choose between a button or a list style for your answer options, and you can fully customize the styling of the block. By default the poll block will support your theme styling, but it’s up to you if you want to keep it. You can customize the style how you want, from font-family to border colours.</p>
|
549 |
+
<!-- /wp:paragraph -->
|
550 |
+
|
551 |
+
<!-- wp:paragraph -->
|
552 |
+
<p>Just click in the poll below and start editing. </p>
|
553 |
+
<!-- /wp:paragraph -->
|
554 |
+
|
555 |
+
<!-- wp:crowdsignal-forms/poll {"pollId":"","title":"Demo Poll block","question":"What do you think about this demo page","answers":[{"text":"Super useful","answerId":""},{"text":"Not sure yet","answerId":""},{"text":"I don\'t like it","answerId":""}],"borderWidth":5,"borderRadius":5,"hasBoxShadow":true,"fontFamily":"Open+Sans","className":"is-style-buttons"} /-->
|
556 |
+
|
557 |
+
<!-- wp:paragraph -->
|
558 |
+
<p>And everything else you expect from a Crowdsignal poll is also available — such as setting “single answer” or “multiple answer” choices, a customised confirmation message, poll timeframe, and avoidance of double voting.</p>
|
559 |
+
<!-- /wp:paragraph -->
|
560 |
+
|
561 |
+
<!-- wp:paragraph -->
|
562 |
+
<p>Here is a short demo video for how to set up this block, not that you would need it ;) </p>
|
563 |
+
<!-- /wp:paragraph -->
|
564 |
+
|
565 |
+
<!-- wp:video {"align":"center","className":"wp-block-embed is-type-video is-provider-videopress"} -->
|
566 |
+
<figure class="wp-block-video aligncenter wp-block-embed is-type-video is-provider-videopress"><video controls src="https://crowdsignal.files.wordpress.com/2021/11/add-poll-tutorial-720.mp4"></video></figure>
|
567 |
+
<!-- /wp:video -->
|
568 |
+
|
569 |
+
<!-- wp:spacer {"height":60} -->
|
570 |
+
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
|
571 |
+
<!-- /wp:spacer -->
|
572 |
+
|
573 |
+
<!-- wp:heading -->
|
574 |
+
<h2>Feedback Button</h2>
|
575 |
+
<!-- /wp:heading -->
|
576 |
+
|
577 |
+
<!-- wp:paragraph -->
|
578 |
+
<p>You might have spotted it already, in the bottom left corner of this page: Our Feedback button.</p>
|
579 |
+
<!-- /wp:paragraph -->
|
580 |
+
|
581 |
+
<!-- wp:paragraph -->
|
582 |
+
<p>This is a floating button that lives above your site\'s content. Always visible this button makes giving feedback easy! User can send you a message and provide their email address so you could can get back to them. Needless to say that you can fully customize the design and text, including the label of the button itself. Feel free to make it a "Contact me" or "Say hello" button or anything you like.</p>
|
583 |
+
<!-- /wp:paragraph -->
|
584 |
+
|
585 |
+
<!-- wp:paragraph -->
|
586 |
+
<p>And yes, you can change its placement! You can put the button in any corner of your site. Just try it! Click in the feedback and start editing.</p>
|
587 |
+
<!-- /wp:paragraph -->
|
588 |
+
|
589 |
+
<!-- wp:paragraph -->
|
590 |
+
<p>Don\'t miss out on your customers\' feedback. Keep your door open anytime and place a feedback button on all your pages. </p>
|
591 |
+
<!-- /wp:paragraph -->
|
592 |
+
|
593 |
+
<!-- wp:video {"align":"center","className":"wp-block-embed is-type-video is-provider-videopress"} -->
|
594 |
+
<figure class="wp-block-video aligncenter wp-block-embed is-type-video is-provider-videopress"><video controls src="https://crowdsignal.files.wordpress.com/2021/11/add-feedback-button-tutorial.mp4"></video></figure>
|
595 |
+
<!-- /wp:video -->
|
596 |
+
|
597 |
+
<!-- wp:spacer {"height":60} -->
|
598 |
+
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
|
599 |
+
<!-- /wp:spacer -->
|
600 |
+
|
601 |
+
<!-- wp:heading -->
|
602 |
+
<h2>Voting</h2>
|
603 |
+
<!-- /wp:heading -->
|
604 |
+
|
605 |
+
<!-- wp:paragraph -->
|
606 |
+
<p>Sometimes we need just quick and fast feedback from our audience. A quick voting button might be all you need. Fully customizable of course.</p>
|
607 |
+
<!-- /wp:paragraph -->
|
608 |
+
|
609 |
+
<!-- wp:paragraph -->
|
610 |
+
<p>There is already a “like” button at the end of a WordPress post that you can click to express satisfaction or agreement. But what if you want to ask readers their opinion on a subject in the middle of a post? Or what if you want to present several ideas and find out which one is the most popular? Wouldn’t it be great to ask readers what they think without having to leave the editor or switch to another service or plugin?</p>
|
611 |
+
<!-- /wp:paragraph -->
|
612 |
+
|
613 |
+
<!-- wp:paragraph -->
|
614 |
+
<p>That’s what we thought! Say hello to our Voting Block:</p>
|
615 |
+
<!-- /wp:paragraph -->
|
616 |
+
|
617 |
+
<!-- wp:crowdsignal-forms/vote {"pollId":"","title":"Demo Vote block"} -->
|
618 |
+
<!-- wp:crowdsignal-forms/vote-item {"answerId":"","type":"up","textColor":"#066127","borderColor":"#066127"} /-->
|
619 |
+
|
620 |
+
<!-- wp:crowdsignal-forms/vote-item {"answerId":"","type":"down","textColor":"#c6302e","borderColor":"#c6302e"} /-->
|
621 |
+
<!-- /wp:crowdsignal-forms/vote -->
|
622 |
+
|
623 |
+
<!-- wp:paragraph -->
|
624 |
+
<p>It’s a simple block that adds two voting buttons—thumbs up, thumbs down—to your post wherever you want to place them. Customize the block in different sizes and colors, with or without a border, and with or without a visible vote counter. Put several in a single post, next to different ideas, to see how they stack up for readers. Make the block your own!</p>
|
625 |
+
<!-- /wp:paragraph -->
|
626 |
+
|
627 |
+
<!-- wp:video {"align":"center","className":"wp-block-embed is-type-video is-provider-videopress"} -->
|
628 |
+
<figure class="wp-block-video aligncenter wp-block-embed is-type-video is-provider-videopress"><video controls src="https://crowdsignal.files.wordpress.com/2021/11/add-vote-tutorial.mp4"></video></figure>
|
629 |
+
<!-- /wp:video -->
|
630 |
+
|
631 |
+
<!-- wp:spacer {"height":60} -->
|
632 |
+
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
|
633 |
+
<!-- /wp:spacer -->
|
634 |
+
|
635 |
+
<!-- wp:heading -->
|
636 |
+
<h2>Applause</h2>
|
637 |
+
<!-- /wp:heading -->
|
638 |
+
|
639 |
+
<!-- wp:image {"sizeSlug":"large"} -->
|
640 |
+
<figure class="wp-block-image size-large"><img src="https://crowdsignal.files.wordpress.com/2021/11/17claps-small.gif" alt=""/></figure>
|
641 |
+
<!-- /wp:image -->
|
642 |
+
|
643 |
+
<!-- wp:paragraph -->
|
644 |
+
<p>The Applause block is a simpler and more playful version of our Voting block. The main differences are users only being able to give positive feedback and encouraging users to “make as much noise as they want”. Meaning this block does not only allow repeated voting, but even encourages it.</p>
|
645 |
+
<!-- /wp:paragraph -->
|
646 |
+
|
647 |
+
<!-- wp:paragraph -->
|
648 |
+
<p>Let your audience make some noise with a big round of applause.</p>
|
649 |
+
<!-- /wp:paragraph -->
|
650 |
+
|
651 |
+
<!-- wp:crowdsignal-forms/applause {"pollId":"","title":"Demo Applause block","answerId":"","size":"large","borderWidth":1,"borderRadius":5} /-->
|
652 |
+
|
653 |
+
<!-- wp:paragraph -->
|
654 |
+
<p><a href="https://wordpress.org/support/article/how-to-use-the-preview-function/">Preview this post</a> and try clapping yourself! It\'s fun.</p>
|
655 |
+
<!-- /wp:paragraph -->
|
656 |
+
|
657 |
+
<!-- wp:paragraph -->
|
658 |
+
<p>The block currently comes in three different sizes, and can be customised with a button-like styling, including a border, border radius and some colour customisation options.</p>
|
659 |
+
<!-- /wp:paragraph -->
|
660 |
+
|
661 |
+
<!-- wp:video {"align":"center","className":"wp-block-embed is-type-video is-provider-videopress"} -->
|
662 |
+
<figure class="wp-block-video aligncenter wp-block-embed is-type-video is-provider-videopress"><video controls src="https://crowdsignal.files.wordpress.com/2021/11/add-applause-block-tutorial.mp4"></video></figure>
|
663 |
+
<!-- /wp:video -->
|
664 |
+
|
665 |
+
<!-- wp:spacer {"height":60} -->
|
666 |
+
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
|
667 |
+
<!-- /wp:spacer -->
|
668 |
+
|
669 |
+
<!-- wp:heading -->
|
670 |
+
<h2>Embed Surveys & Forms</h2>
|
671 |
+
<!-- /wp:heading -->
|
672 |
+
|
673 |
+
<!-- wp:paragraph -->
|
674 |
+
<p>So far we only talked about quick and fast ways to collect feedback or opinions from your audience. But what if you have many questions or want to create simple forms? You can do this with Crowdsignal, too! Create a survey or form on app.crowdsignal.com and embed it into your WordPress post or site. Similar like here:</p>
|
675 |
+
<!-- /wp:paragraph -->
|
676 |
+
|
677 |
+
<!-- wp:embed {"url":"https://crowdsignal.survey.fm/product-market-fit-score","type":"rich","providerNameSlug":"crowdsignal","responsive":true,"align":"wide"} -->
|
678 |
+
<figure class="wp-block-embed alignwide is-type-rich is-provider-crowdsignal wp-block-embed-crowdsignal"><div class="wp-block-embed__wrapper">
|
679 |
+
https://crowdsignal.survey.fm/product-market-fit-score
|
680 |
+
</div></figure>
|
681 |
+
<!-- /wp:embed -->
|
682 |
+
|
683 |
+
<!-- wp:paragraph -->
|
684 |
+
<p>The Crowdsignal survey above was embedded using our "Single question per page mode." It’s exactly what it sounds like: In this mode, no matter how many questions your survey has, your respondents will always see one question at a time. Single Mode shines when you embed a survey into your website or blog post. Surveys with multiple questions can take up a lot of space, overwhelming your site. If you’re not sure whether your readers will take the survey at all, it disrupts the reading experience. With Single Mode, a survey uses the same amount of space as an image, even a really long survey.</p>
|
685 |
+
<!-- /wp:paragraph -->
|
686 |
+
|
687 |
+
<!-- wp:paragraph -->
|
688 |
+
<p>Once they provide an answer (or skip the question), the next question loads. It has a playful feel, like flipping through a slide show. Every answered question feels like progress.</p>
|
689 |
+
<!-- /wp:paragraph -->
|
690 |
+
|
691 |
+
<!-- wp:paragraph -->
|
692 |
+
<p>You can choose between several transition options, and decide whether the questions should move from top to bottom, or from left to right.</p>
|
693 |
+
<!-- /wp:paragraph -->
|
694 |
+
|
695 |
+
<!-- wp:paragraph -->
|
696 |
+
<p><strong>Ready to create one? Here’s how:</strong></p>
|
697 |
+
<!-- /wp:paragraph -->
|
698 |
+
|
699 |
+
<!-- wp:paragraph -->
|
700 |
+
<p>- Go to <a href="https://app.crowdsignal.com/dashboard">app.crowdsignal.com</a> (we will log you in with your WordPress.com account - magic ;)) .</p>
|
701 |
+
<!-- /wp:paragraph -->
|
702 |
+
|
703 |
+
<!-- wp:paragraph -->
|
704 |
+
<p>- Create a new survey.</p>
|
705 |
+
<!-- /wp:paragraph -->
|
706 |
+
|
707 |
+
<!-- wp:paragraph -->
|
708 |
+
<p>- In the Editor, choose “Single Mode” at the top left.</p>
|
709 |
+
<!-- /wp:paragraph -->
|
710 |
+
|
711 |
+
<!-- wp:paragraph -->
|
712 |
+
<p>- Then create as many questions as you like and style your theme.</p>
|
713 |
+
<!-- /wp:paragraph -->
|
714 |
+
|
715 |
+
<!-- wp:paragraph -->
|
716 |
+
<p>- When you are ready click on Sharing and copy the URL of your survey.</p>
|
717 |
+
<!-- /wp:paragraph -->
|
718 |
+
|
719 |
+
<!-- wp:paragraph -->
|
720 |
+
<p>- Go back to your WordPress editor and paste the URL of your survey into your post</p>
|
721 |
+
<!-- /wp:paragraph -->
|
722 |
+
|
723 |
+
<!-- wp:paragraph -->
|
724 |
+
<p>- Done! Your survey will appear in your post.</p>
|
725 |
+
<!-- /wp:paragraph -->
|
726 |
+
|
727 |
+
<!-- wp:paragraph -->
|
728 |
+
<p>Here is a short demo video for you that shows you how it works in less than a minute:</p>
|
729 |
+
<!-- /wp:paragraph -->
|
730 |
+
|
731 |
+
<!-- wp:video {"align":"center","className":"wp-block-embed is-type-video is-provider-videopress"} -->
|
732 |
+
<figure class="wp-block-video aligncenter wp-block-embed is-type-video is-provider-videopress"><video controls src="https://crowdsignal.files.wordpress.com/2021/11/add-survey-tutorial-yt.mp4"></video></figure>
|
733 |
+
<!-- /wp:video -->
|
734 |
+
|
735 |
+
<!-- wp:spacer {"height":60} -->
|
736 |
+
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
|
737 |
+
<!-- /wp:spacer -->
|
738 |
+
|
739 |
+
<!-- wp:heading -->
|
740 |
+
<h2>Measure NPS</h2>
|
741 |
+
<!-- /wp:heading -->
|
742 |
+
|
743 |
+
<!-- wp:paragraph -->
|
744 |
+
<p>While we are driving our projects, working hard on our products, we all wonder: How are we doing? Are people satisfied with our service? Are we doing better since last month? </p>
|
745 |
+
<!-- /wp:paragraph -->
|
746 |
+
|
747 |
+
<!-- wp:paragraph -->
|
748 |
+
<p>Sometimes you want to measure your progress over time. <a href="https://crowdsignal.com/2021/03/16/measure-nps/">Measure and monitor the customer satisfaction and growth potential of your product with a Net Promoter Score</a>. </p>
|
749 |
+
<!-- /wp:paragraph -->
|
750 |
+
|
751 |
+
<!-- wp:paragraph -->
|
752 |
+
<p>We have built a Gutenberg block for you that makes it easier than ever before to track your Net Promoter Score on WordPress. If you have <a href="https://wordpress.org/support/article/how-to-use-the-preview-function/">previewed this post</a> before, you might have seen the NPS question already in a modal window. </p>
|
753 |
+
<!-- /wp:paragraph -->
|
754 |
+
|
755 |
+
<!-- wp:crowdsignal-forms/nps {"surveyId":"","title":"Demo NPS block","viewThreshold":"2"} /-->
|
756 |
+
|
757 |
+
<!-- wp:paragraph -->
|
758 |
+
<p>The moment you add the block, you are basically done. The design of the block is based on your site’s theme. You can still customize the styling of the block, or edit the questions, but that might not even be necessary.</p>
|
759 |
+
<!-- /wp:paragraph -->
|
760 |
+
|
761 |
+
<!-- wp:paragraph -->
|
762 |
+
<p>To get the most out of your NPS data, it is important to show the question only to users that are already familiar with your service or product. You can configure the block to only show to repeat visitors. It’s more likely you will get feedback from someone who knows what they are talking about, and you can make sure new users are not interrupted during their first visit to your site.</p>
|
763 |
+
<!-- /wp:paragraph -->
|
764 |
+
|
765 |
+
<!-- wp:paragraph -->
|
766 |
+
<p>After you publish the block go to the results page of the block and monitor your results. We have built a special results page for you to track your NPS score and to analyse any additional feedback. </p>
|
767 |
+
<!-- /wp:paragraph -->
|
768 |
+
|
769 |
+
<!-- wp:image {"sizeSlug":"large"} -->
|
770 |
+
<figure class="wp-block-image size-large"><img src="https://s0.wp.com/wp-content/themes/a8c/crowd-signal/assets/images/AnalyseResults.png" alt=""/></figure>
|
771 |
+
<!-- /wp:image -->
|
772 |
+
|
773 |
+
<!-- wp:paragraph -->
|
774 |
+
<p>We provide an analytics dashboard with our block that automatically calculates the Net Promoter Score for you in real-time and allows you to monitor your score over time. Are the differences geographic? Filter your results based on countries.</p>
|
775 |
+
<!-- /wp:paragraph -->
|
776 |
+
|
777 |
+
<!-- wp:paragraph -->
|
778 |
+
<p>By the way, did you know you also can get email notifications or a ping in your Slack channel any time you get an NPS rating? Just click on the little “connect” button on your results page.</p>
|
779 |
+
<!-- /wp:paragraph -->
|
780 |
+
|
781 |
+
<!-- wp:paragraph -->
|
782 |
+
<p>Here is a quick tutorial video on how it works.</p>
|
783 |
+
<!-- /wp:paragraph -->
|
784 |
+
|
785 |
+
<!-- wp:video {"align":"center","className":"wp-block-embed is-type-video is-provider-videopress"} -->
|
786 |
+
<figure class="wp-block-video aligncenter wp-block-embed is-type-video is-provider-videopress"><video controls src="https://crowdsignal.files.wordpress.com/2021/11/add-nps-tutorial-long-3.mp4"></video></figure>
|
787 |
+
<!-- /wp:video -->
|
788 |
+
|
789 |
+
<!-- wp:crowdsignal-forms/feedback {"surveyId":"","title":"Demo Feedback block"} /-->
|
790 |
+
|
791 |
+
<!-- wp:paragraph -->
|
792 |
+
<p></p>
|
793 |
+
<!-- /wp:paragraph -->
|
794 |
+
',
|
795 |
+
)
|
796 |
+
);
|
797 |
+
if ( ! is_wp_error( $post_id ) ) {
|
798 |
+
wp_safe_redirect( admin_url( 'post.php?post=' . intval( $post_id ) . '&action=edit' ) );
|
799 |
+
} else {
|
800 |
+
// admin.php?page=polls
|
801 |
+
// wp_safe_redirect( admin_url( 'admin.php?page=polls' ) );
|
802 |
+
}
|
803 |
+
break;
|
804 |
+
|
805 |
case 'edit' :
|
806 |
case 'edit-poll' :
|
807 |
case 'create-poll' :
|
824 |
$plugin_page = 'polls&action=list-styles';
|
825 |
break;
|
826 |
}//end switch
|
827 |
+
} elseif ( $page == 'crowdsignal-settings' ) {
|
828 |
+
$plugin_page = 'crowdsignal-settings';
|
829 |
} elseif ( $page == 'ratings' ) {
|
830 |
if ( empty( $action ) ) {
|
831 |
$action = 'reports';
|
887 |
|
888 |
$is_POST = 'post' == strtolower( $_SERVER['REQUEST_METHOD'] );
|
889 |
|
890 |
+
if ( 'polls' === $page || 'crowdsignal-settings' === $page ) {
|
891 |
switch ( $action ) {
|
892 |
+
case 'multi-account':
|
893 |
+
if ( ! isset( $_POST['crowdsignal_multiuser'] ) ) {
|
894 |
+
delete_option( 'polldaddy_usercode_user' );
|
895 |
+
}
|
896 |
+
break;
|
897 |
case 'reset-account' : // reset everything
|
898 |
global $current_user;
|
899 |
check_admin_referer( 'polldaddy-reset' . $this->id );
|
1633 |
$message = sprintf( _n( '%s Style Deleted.', '%s Custom Styles Deleted.', $deleted, 'polldaddy' ), number_format_i18n( $deleted ) );
|
1634 |
}
|
1635 |
break;
|
1636 |
+
case 'connected' :
|
1637 |
case 'imported-account' :
|
1638 |
$message = __( 'Account Linked.', 'polldaddy' );
|
1639 |
break;
|
1640 |
+
case 'api-key-not-added' :
|
1641 |
+
$message = __( 'There was a problem linking your account.', 'polldaddy' );
|
1642 |
+
break;
|
1643 |
case 'updated-options' :
|
1644 |
$message = __( 'Options Updated.', 'polldaddy' );
|
1645 |
break;
|
1675 |
|
1676 |
if ( !$message )
|
1677 |
return;
|
1678 |
+
?>
|
1679 |
<div class='updated'><p><?php echo $message; ?></p></div>
|
1680 |
+
<?php
|
1681 |
$this->print_errors();
|
1682 |
}
|
1683 |
|
1685 |
global $page, $action;
|
1686 |
?>
|
1687 |
<div class="wrap" id="manage-polls">
|
|
|
1688 |
<div class="cs-wrapper">
|
1689 |
<?php
|
1690 |
$this->set_api_user_code();
|
1692 |
if ( isset( $_GET['page'] ) ) { // phpcs:ignore
|
1693 |
$page = $_GET['page']; // phpcs:ignore
|
1694 |
}
|
1695 |
+
if ( 'crowdsignal-settings' === $page ) {
|
1696 |
if ( ! $this->is_author ) { // check user privileges has access to action.
|
1697 |
return;
|
1698 |
}
|
1718 |
?>
|
1719 |
|
1720 |
<div class="wrap" id="manage-polls">
|
|
|
1721 |
<div class="cs-wrapper">
|
1722 |
<?php
|
1723 |
if ( 'polls' === $page ) {
|
4307 |
$previous_settings = get_option( 'polldaddy_settings' );
|
4308 |
$current_setting = get_option( 'pd-rating-posts-id' );
|
4309 |
if ( $current_setting && isset( $previous_settings[ 'pd-rating-posts-id' ] ) && $current_setting != $previous_settings[ 'pd-rating-posts-id' ] ) {
|
4310 |
+
echo "<p>" . sprintf( __( "Previous settings for ratings on this site discovered. You can restore them on the <a href='%s'>poll settings page</a> if your site is missing ratings after resetting your connection settings.", 'polldaddy' ), "options-general.php?page=crowdsignal-settings" ) . "</p>";
|
4311 |
}
|
4312 |
?>
|
4313 |
</div>
|
5259 |
|
5260 |
$this->print_errors();
|
5261 |
|
5262 |
+
$this->render_partial( 'html-admin-setup-header' );
|
5263 |
+
if ( ! $connected ) {
|
5264 |
+
update_option( 'crowdsignal_api_key_secret', md5( time() . wp_rand() ) );
|
5265 |
+
$this->render_partial( 'html-admin-setup-step-1' );
|
5266 |
+
} else {
|
5267 |
+
$this->render_partial(
|
5268 |
+
'settings',
|
5269 |
+
array(
|
5270 |
+
'is_connected' => $connected,
|
5271 |
+
'api_key' => get_option( 'polldaddy_api_key' ),
|
5272 |
+
)
|
5273 |
+
);
|
5274 |
+
|
5275 |
+
if ( ! is_plugin_active( 'crowdsignal-forms/crowdsignal-forms.php' ) ) {
|
5276 |
+
$this->render_partial( 'html-admin-teaser' );
|
5277 |
+
} else {
|
5278 |
+
$this->render_partial( 'html-admin-setup-step-3' );
|
5279 |
+
}
|
5280 |
+
|
5281 |
+
$this->render_partial(
|
5282 |
+
'settings-2',
|
5283 |
+
array(
|
5284 |
+
'is_connected' => $connected,
|
5285 |
+
'api_key' => get_option( 'polldaddy_api_key' ),
|
5286 |
+
'poll' => $poll,
|
5287 |
+
'options' => $options,
|
5288 |
+
'controller' => $this,
|
5289 |
+
'account_email' => $account_email,
|
5290 |
+
)
|
5291 |
+
);
|
5292 |
+
}
|
5293 |
+
$this->render_partial( 'html-admin-setup-footer' );
|
5294 |
}
|
5295 |
|
5296 |
function plugin_options_add() {}
|
5336 |
echo '<h1>' . $message . '</h1>';
|
5337 |
echo '<p>' . __( "There are a few things you can do:" );
|
5338 |
echo "<ul><ol>" . __( "Press reload on your browser and reload this page. There may have been a temporary problem communicating with Crowdsignal.com", "polldaddy" ) . "</ol>";
|
5339 |
+
echo "<ol>" . sprintf( __( "Go to the <a href='%s'>poll settings page</a>, scroll to the end of the page and reset your connection settings. Link your account again with the same API key.", "polldaddy" ), 'options-general.php?page=crowdsignal-settings' ) . "</ol>";
|
5340 |
echo "<ol>" . sprintf( __( 'Contact <a href="%1$s" %2$s>Crowdsignal support</a> and tell them your rating usercode is %3$s', 'polldaddy' ), 'https://crowdsignal.com/feedback/', 'target="_blank"', $this->rating_user_code ) . '<br />' . __( 'Also include the following information when contacting support to help us resolve your problem as quickly as possible:', 'polldaddy' ) . '';
|
5341 |
echo "<ul><li> API Key: " . get_option( 'polldaddy_api_key' ) . "</li>";
|
5342 |
echo "<li> ID Usercode: " . get_option( 'pd-usercode-' . $current_user->ID ) . "</li>";
|
rating.php
CHANGED
@@ -112,15 +112,16 @@ function polldaddy_get_rating_html( $condition = '' ) {
|
|
112 |
}
|
113 |
|
114 |
if ( $rating_id > 0 ) {
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
|
|
|
|
|
|
118 |
$title = apply_filters( 'the_title', $post->post_title, $post->ID, '' );
|
119 |
-
|
120 |
-
|
121 |
-
else
|
122 |
-
$title = $post->post_title;
|
123 |
-
|
124 |
$permalink = get_permalink( $post->ID );
|
125 |
$html = polldaddy_get_rating_code( $rating_id, $unique_id, $title, $permalink, $item_id );
|
126 |
}
|
112 |
}
|
113 |
|
114 |
if ( $rating_id > 0 ) {
|
115 |
+
if ( defined( 'CS_RATING_TITLE_FILTER' ) ) {
|
116 |
+
if ( strlen( constant( 'CS_RATING_TITLE_FILTER' ) ) > 0 ) {
|
117 |
+
$title = apply_filters( constant( 'CS_RATING_TITLE_FILTER' ), $post->post_title, $post->ID, '' );
|
118 |
+
} else {
|
119 |
+
$title = $post->post_title;
|
120 |
+
}
|
121 |
+
} else {
|
122 |
$title = apply_filters( 'the_title', $post->post_title, $post->ID, '' );
|
123 |
+
}
|
124 |
+
|
|
|
|
|
|
|
125 |
$permalink = get_permalink( $post->ID );
|
126 |
$html = polldaddy_get_rating_code( $rating_id, $unique_id, $title, $permalink, $item_id );
|
127 |
}
|
readme.txt
CHANGED
@@ -1,59 +1,25 @@
|
|
1 |
-
=== Crowdsignal Polls &
|
2 |
-
Contributors:
|
3 |
Tags: crowdsignal, polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 5.5
|
5 |
Requires PHP: 5.6
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 3.0.
|
8 |
-
|
9 |
-
Create and manage Crowdsignal polls and ratings from within WordPress.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
The Crowdsignal
|
14 |
-
|
15 |
-
===
|
16 |
-
Are you
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
|
24 |
-
|
25 |
-
* Czech
|
26 |
-
* Danish
|
27 |
-
* Dutch
|
28 |
-
* Finnish
|
29 |
-
* French (Canada)
|
30 |
-
* French (France)
|
31 |
-
* French (Switzerland)
|
32 |
-
* Galician
|
33 |
-
* German
|
34 |
-
* Greek (Polytonic)
|
35 |
-
* Hebrew
|
36 |
-
* Hungarian
|
37 |
-
* Indonesian
|
38 |
-
* Irish
|
39 |
-
* Italian
|
40 |
-
* Korean
|
41 |
-
* Lithuanian
|
42 |
-
* Malay
|
43 |
-
* Norwegian
|
44 |
-
* Norwegian (Nynorsk)
|
45 |
-
* Persian
|
46 |
-
* Polish
|
47 |
-
* Portuguese (Brazil)
|
48 |
-
* Portuguese (Portugal)
|
49 |
-
* Romanian
|
50 |
-
* Russian
|
51 |
-
* Serbian
|
52 |
-
* Slovak
|
53 |
-
* Spanish (Puerto Rico)
|
54 |
-
* Spanish (Spain)
|
55 |
-
* Swedish
|
56 |
-
* Uighur
|
57 |
|
58 |
Want to help translate the plugin or keep an existing translation up-to-date? Head on over to the [translation site](http://translate.wordpress.com/projects/polldaddy/plugin).
|
59 |
|
@@ -63,37 +29,37 @@ Development of the plugin will take place in [this Github repository](https://gi
|
|
63 |
|
64 |
== Installation ==
|
65 |
|
66 |
-
Upload the plugin to your blog (or search for it and install it on your plugins page), activate it, then go to Settings->
|
67 |
Crowdsignal.com is now linked to WordPress.com using [WordPress.com Connect](http://en.support.wordpress.com/wpcc-faq/) which means you can use your WordPress.com username and password to login to Crowdsignal.com. If you have a WordPress.com account and have never used Crowdsignal.com you can login [here](https://app.crowdsignal.com/login/) to access Crowdsignal.com.
|
68 |
|
69 |
You can find further help on our [support page](https://crowdsignal.com/support/). If you have any problems please use the [support forum](http://wordpress.org/support/plugin/polldaddy). The plugin also logs activity to a file using the [WP Debug Logger](http://wordpress.org/extend/plugins/wp-debug-logger/) plugin which can be useful in determining the cause of a problem.
|
70 |
|
71 |
== Screenshots ==
|
72 |
|
73 |
-
1.
|
74 |
-
2.
|
75 |
-
3. View poll on page or in a widget
|
76 |
-
4. Add ratings
|
77 |
-
5. Ratings on a post
|
78 |
-
6. Ratings on comments
|
79 |
|
80 |
== Frequently Asked Questions ==
|
81 |
|
82 |
-
= Where do I find my
|
|
|
|
|
|
|
|
|
83 |
|
84 |
-
|
85 |
|
86 |
-
= I have multiple authors on my blog?
|
87 |
|
88 |
Each author that wants to create polls will need his or her own Crowdsignal.com account.
|
89 |
|
90 |
= But, as an Administrator, can I edit my Authors' polls =
|
91 |
|
92 |
-
Yes. You'll be able to edit the polls they create from your blog.
|
93 |
|
94 |
= Neat! Um... can my Authors edit MY blog polls? =
|
95 |
|
96 |
-
Nope.
|
97 |
|
98 |
= Where are my ratings? =
|
99 |
|
@@ -111,7 +77,7 @@ You need to select the synchronize ratings account in the WordPress options page
|
|
111 |
|
112 |
= When I try to use a rating on a page, I get a PHP warning about the post title. =
|
113 |
|
114 |
-
Your rating uses the filter 'wp_title' by default when retrieving the post title, you may need to remove this
|
115 |
|
116 |
= Why is a poll loading in the footer of my main page? =
|
117 |
|
@@ -119,26 +85,26 @@ Your theme is getting the post content, without necessarily showing it. If the p
|
|
119 |
|
120 |
= My API key is valid but I cannot get the plugin to link with Crowdsignal
|
121 |
|
122 |
-
This is possible if your server or network is blocking outgoing calls to Crowdsignal's API.
|
123 |
Make sure to whitelist `api.crowdsignal.com` in your firewall to fix this.
|
124 |
|
125 |
== Upgrade Notice ==
|
126 |
-
|
127 |
|
128 |
== Changelog ==
|
129 |
|
130 |
-
= 3.0.
|
131 |
-
*
|
|
|
132 |
|
133 |
-
= 3.0.
|
134 |
-
*
|
135 |
|
136 |
-
= 3.0.3
|
137 |
* Move settings page and update style of the settings page to match the Crowdsignal Forms plugin
|
138 |
|
139 |
= 3.0.1
|
140 |
* Allow landing page to be rendered on demand
|
141 |
-
* Rename menu entries
|
142 |
|
143 |
= 3.0.0 =
|
144 |
* New dashboard menu
|
@@ -391,7 +357,7 @@ Revert to 3.0.1 as styles in settings page conflicted
|
|
391 |
= 1.8.8 =
|
392 |
* Updated style editor to catch some missing strings so they can be now be localised
|
393 |
* Added string maps to javascript files to allow them to be localised
|
394 |
-
* Added extra label to ratings settings, vote, so now the label votes has a singular expression for localisation.
|
395 |
* Added option to style editor to update all polls that use this style, so any update to style will automatically be reflected in the poll.
|
396 |
* Bug Fix: Embed options are now in readonly text inputs, resolves issue of pre tags being pasted along with embed code/URL in the HTML editor.
|
397 |
|
@@ -499,7 +465,7 @@ Revert to 3.0.1 as styles in settings page conflicted
|
|
499 |
= 1.0 =
|
500 |
* New Polldaddy API
|
501 |
* Do not store UserCode, retrieve from API
|
502 |
-
* Bug Fix: Fix API key retrieval.
|
503 |
|
504 |
= 0.9 =
|
505 |
* Compatiblity with WordPress 2.7
|
@@ -513,7 +479,7 @@ Revert to 3.0.1 as styles in settings page conflicted
|
|
513 |
* Potential bug fix: Maybe get rid of 'Invalid Poll Author' error... again.
|
514 |
|
515 |
= 0.6 =
|
516 |
-
* Bug fix: Allow reauthentication with Polldaddy email address and Polldaddy password.
|
517 |
* Buf fix: Speed up CSS and JS.
|
518 |
* Feature: Link to view Shortcode and JavaScript code for each poll.
|
519 |
|
@@ -528,7 +494,7 @@ Revert to 3.0.1 as styles in settings page conflicted
|
|
528 |
|
529 |
= 0.3 =
|
530 |
* Bug fix: Send text data escaped in CDATA to prevent XML errors.
|
531 |
-
* Bug fix: Append to text value, don't overwrite it.
|
532 |
* Bug fix: No more slashes when a poll reloads in the edit form after an error.
|
533 |
|
534 |
= 0.2 =
|
1 |
+
=== Crowdsignal Dashboard - Polls, Surveys & more ===
|
2 |
+
Contributors: donncha, ice9js, cgastrell, digitalwaveride, jcheringer
|
3 |
Tags: crowdsignal, polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 5.5
|
5 |
Requires PHP: 5.6
|
6 |
+
Tested up to: 5.8.3
|
7 |
+
Stable tag: 3.0.6
|
|
|
|
|
8 |
|
9 |
== Description ==
|
10 |
|
11 |
+
The Crowdsignal Dashboard plugin allows you to create and manage polls, surveys, quizzes, and ratings from within your WordPress admin. See all your projects in one place, be they surveys, quizzes and polls made on Crowdsignal.com or any of our poll and survey blocks using our Crowdsignal Forms plugin. With just one click view all results for your responses as they come in to analyze responses in real time and export your results everywhere!
|
12 |
+
|
13 |
+
=== The Block Editor ===
|
14 |
+
Are you using the new block editor for WordPress? Our other plugin, [Crowdsignal Forms](https://wordpress.org/plugins/crowdsignal-forms/) provides a number of blocks for your post editor that allow you to gather actionable feedback from your audience:
|
15 |
+
* Poll: Create polls and get your audience’s opinion.
|
16 |
+
* Survey Embed: Create surveys in minutes with 14 question types and embed them into your page.
|
17 |
+
* Feedback Button: A floating and always visible button that allows your audience to share feedback anytime.
|
18 |
+
* Measure NPS: Calculate your Net Promoter Score! Collect feedback and track customer satisfaction over time.
|
19 |
+
* Voting: Allow your audience to rate your work or express their opinion.
|
20 |
+
* Applause: Let your audience cheer with a big round of applause.
|
21 |
+
|
22 |
+
Learn more about the Crowdsignal Forms plugin [here](https://wordpress.org/plugins/crowdsignal-forms/), and on [crowdsignal.com](https://crowdsignal.com/).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
Want to help translate the plugin or keep an existing translation up-to-date? Head on over to the [translation site](http://translate.wordpress.com/projects/polldaddy/plugin).
|
25 |
|
29 |
|
30 |
== Installation ==
|
31 |
|
32 |
+
Upload the plugin to your blog (or search for it and install it on your plugins page), activate it, then go to Settings->Crowdsignal to configure the plugin. You'll need a Crowdsignal API key available from your [Crowdsignal account page](https://app.crowdsignal.com/account/#apikey) to sync your account and pull in your existing polls and ratings.
|
33 |
Crowdsignal.com is now linked to WordPress.com using [WordPress.com Connect](http://en.support.wordpress.com/wpcc-faq/) which means you can use your WordPress.com username and password to login to Crowdsignal.com. If you have a WordPress.com account and have never used Crowdsignal.com you can login [here](https://app.crowdsignal.com/login/) to access Crowdsignal.com.
|
34 |
|
35 |
You can find further help on our [support page](https://crowdsignal.com/support/). If you have any problems please use the [support forum](http://wordpress.org/support/plugin/polldaddy). The plugin also logs activity to a file using the [WP Debug Logger](http://wordpress.org/extend/plugins/wp-debug-logger/) plugin which can be useful in determining the cause of a problem.
|
36 |
|
37 |
== Screenshots ==
|
38 |
|
39 |
+
1. The Crowdsignal Dashboard
|
40 |
+
2. Analyse and export your results
|
|
|
|
|
|
|
|
|
41 |
|
42 |
== Frequently Asked Questions ==
|
43 |
|
44 |
+
= Where do I find my Crowdsignal Dashboard? =
|
45 |
+
|
46 |
+
You can find your dashboard under the Feedback top level menu. You will find Crowdsignal and Ratings menu items there. The Crowdsignal menu item leads to the dashboard. If you have ratings enabled you will see a Ratings menu item that links to a summary of your ratings.
|
47 |
+
|
48 |
+
= Where do I find my Crowdsignal Settings? =
|
49 |
|
50 |
+
You will find the settings area for this plugin under the Settings top level menu, and look for the Crowdsignal menu item.
|
51 |
|
52 |
+
= I have multiple authors on my blog? What happens? =
|
53 |
|
54 |
Each author that wants to create polls will need his or her own Crowdsignal.com account.
|
55 |
|
56 |
= But, as an Administrator, can I edit my Authors' polls =
|
57 |
|
58 |
+
Yes. You'll be able to edit the polls they create from your blog. (You won't be able to edit any of their non-blog, personal polls they create through Crowdsignal.com.)
|
59 |
|
60 |
= Neat! Um... can my Authors edit MY blog polls? =
|
61 |
|
62 |
+
Nope. The permissions are the same as for posts. So Editors and Administrators can edit anyone's polls for that blog. Authors can only edit their own.
|
63 |
|
64 |
= Where are my ratings? =
|
65 |
|
77 |
|
78 |
= When I try to use a rating on a page, I get a PHP warning about the post title. =
|
79 |
|
80 |
+
Your rating uses the filter 'wp_title' by default when retrieving the post title, you may need to remove this by defining the constant "CS_RATING_TITLE_FILTER" to a new filter to use, or just set it to "" to diasable it and allow ratings to work with your theme. Define the constant in wp-config.php or an mu-plugin.
|
81 |
|
82 |
= Why is a poll loading in the footer of my main page? =
|
83 |
|
85 |
|
86 |
= My API key is valid but I cannot get the plugin to link with Crowdsignal
|
87 |
|
88 |
+
This is possible if your server or network is blocking outgoing calls to Crowdsignal's API.
|
89 |
Make sure to whitelist `api.crowdsignal.com` in your firewall to fix this.
|
90 |
|
91 |
== Upgrade Notice ==
|
92 |
+
Revamp wp-admin styles: Crowdsignal dashboard
|
93 |
|
94 |
== Changelog ==
|
95 |
|
96 |
+
= 3.0.6
|
97 |
+
* Fix CSS so it doesn't conflict with Jetpack. Fix disconnect form. (75)
|
98 |
+
* Fix typo (76)
|
99 |
|
100 |
+
= 3.0.5
|
101 |
+
* Revert 3.0.3 due to conflict with Jetpack
|
102 |
|
103 |
+
= 3.0.3
|
104 |
* Move settings page and update style of the settings page to match the Crowdsignal Forms plugin
|
105 |
|
106 |
= 3.0.1
|
107 |
* Allow landing page to be rendered on demand
|
|
|
108 |
|
109 |
= 3.0.0 =
|
110 |
* New dashboard menu
|
357 |
= 1.8.8 =
|
358 |
* Updated style editor to catch some missing strings so they can be now be localised
|
359 |
* Added string maps to javascript files to allow them to be localised
|
360 |
+
* Added extra label to ratings settings, vote, so now the label votes has a singular expression for localisation.
|
361 |
* Added option to style editor to update all polls that use this style, so any update to style will automatically be reflected in the poll.
|
362 |
* Bug Fix: Embed options are now in readonly text inputs, resolves issue of pre tags being pasted along with embed code/URL in the HTML editor.
|
363 |
|
465 |
= 1.0 =
|
466 |
* New Polldaddy API
|
467 |
* Do not store UserCode, retrieve from API
|
468 |
+
* Bug Fix: Fix API key retrieval. Improper use of wp_remote_post()
|
469 |
|
470 |
= 0.9 =
|
471 |
* Compatiblity with WordPress 2.7
|
479 |
* Potential bug fix: Maybe get rid of 'Invalid Poll Author' error... again.
|
480 |
|
481 |
= 0.6 =
|
482 |
+
* Bug fix: Allow reauthentication with Polldaddy email address and Polldaddy password. This is necessary because the stored Polldaddy User API key is invalidated if the user's details change on Polldaddy.com.
|
483 |
* Buf fix: Speed up CSS and JS.
|
484 |
* Feature: Link to view Shortcode and JavaScript code for each poll.
|
485 |
|
494 |
|
495 |
= 0.3 =
|
496 |
* Bug fix: Send text data escaped in CDATA to prevent XML errors.
|
497 |
+
* Bug fix: Append to text value, don't overwrite it. XML parser can call text handler many times per node.
|
498 |
* Bug fix: No more slashes when a poll reloads in the edit form after an error.
|
499 |
|
500 |
= 0.2 =
|
screenshot-1.png
DELETED
Binary file
|
screenshot-2.png
DELETED
Binary file
|
screenshot-3.png
DELETED
Binary file
|
screenshot-4.png
DELETED
Binary file
|
screenshot-5.png
DELETED
Binary file
|
screenshot-6.png
DELETED
Binary file
|