Crowdsignal Dashboard – Polls, Surveys & more - Version 3.0.0

Version Description

  • New dashboard menu
  • Show landing page when there are no items available
  • Multiple accounts feature is now deprecated, will continue to work until disabled
Download this release

Release Info

Developer cgastrell
Plugin Icon 128x128 Crowdsignal Dashboard – Polls, Surveys & more
Version 3.0.0
Comparing to
See all releases

Code changes from version 2.2.6 to 3.0.0

Files changed (44) hide show
  1. css/automatticons-regular-webfont.eot +0 -0
  2. css/automatticons-regular-webfont.svg +42 -0
  3. css/automatticons-regular-webfont.ttf +0 -0
  4. css/automatticons-regular-webfont.woff +0 -0
  5. css/polldaddy.css +708 -10
  6. img/export-everywhere.png +0 -0
  7. img/gif/poll-block-v1.1.gif +0 -0
  8. img/item-icons/icon-block-applause.png +0 -0
  9. img/item-icons/icon-block-feedback.png +0 -0
  10. img/item-icons/icon-block-nps.png +0 -0
  11. img/item-icons/icon-block-poll.png +0 -0
  12. img/item-icons/icon-block-survey-embed.png +0 -0
  13. img/item-icons/icon-block-voting.png +0 -0
  14. img/svg/cs-logo.svg +22 -0
  15. img/svg/cs-logo2.svg +29 -0
  16. img/svg/cs-polls.svg +90 -0
  17. img/svg/icon-block-applause-round.svg +9 -0
  18. img/svg/icon-block-feedbackButton-round.svg +7 -0
  19. img/svg/icon-block-nps-round.svg +4 -0
  20. img/svg/icon-block-poll-round.svg +7 -0
  21. img/svg/icon-block-quiz-round.svg +7 -0
  22. img/svg/icon-block-rating-round.svg +6 -0
  23. img/svg/icon-block-survey-round.svg +8 -0
  24. img/svg/icon-block-voting-round.svg +9 -0
  25. img/svg/lock.svg +4 -0
  26. img/video/applause-block-tutorial.mp4 +0 -0
  27. img/video/embed-crowdsignal.mp4 +0 -0
  28. img/video/feedback-button-block-tutorial.mp4 +0 -0
  29. img/video/nps-block-tutorial.mp4 +0 -0
  30. img/video/poll-block-tutorial.mp4 +0 -0
  31. img/video/slider-crowdsignal.mp4 +0 -0
  32. img/video/survey-embed-tutorial.mp4 +0 -0
  33. img/video/vote-block-tutorial.mp4 +0 -0
  34. partials/api-key-page.php +44 -0
  35. partials/crowdsignal-landing-page.php +184 -0
  36. partials/errors.php +24 -0
  37. partials/index.php +8 -0
  38. partials/polls-table.php +513 -0
  39. partials/settings.php +234 -0
  40. polldaddy-client.php +49 -6
  41. polldaddy-org.php +68 -57
  42. polldaddy-xml.php +836 -786
  43. polldaddy.php +379 -689
  44. readme.txt +8 -3
css/automatticons-regular-webfont.eot ADDED
Binary file
css/automatticons-regular-webfont.svg ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata></metadata>
5
+ <defs>
6
+ <font id="automatticonsregular" horiz-adv-x="2048" >
7
+ <font-face units-per-em="2048" ascent="1638" descent="-410" />
8
+ <missing-glyph horiz-adv-x="1200" />
9
+ <glyph />
10
+ <glyph />
11
+ <glyph unicode="&#xd;" />
12
+ <glyph unicode=" " horiz-adv-x="1200" />
13
+ <glyph unicode="&#x09;" horiz-adv-x="1200" />
14
+ <glyph unicode="&#xa0;" horiz-adv-x="1200" />
15
+ <glyph unicode="." d="M24 1100l1000 -1000l1000 1000h-2000z" />
16
+ <glyph unicode="@" d="M24 156q48 -6 100 -6q281 0 508 176q-133 1 -238.5 81t-145.5 203q39 -6 78 -6q60 0 108 14q-142 29 -236 142t-94 260v6q86 -49 186 -52q-84 57 -133 146.5t-49 195.5q0 110 56 206q154 -189 374 -303t472 -127q-12 45 -12 94q0 111 55 205.5t149.5 149.5t205.5 55 q87 0 165 -34t135 -94q142 27 260 100q-46 -149 -182 -228q123 14 238 64q-82 -124 -206 -212q2 -18 2 -54q0 -117 -24.5 -235.5t-75 -233t-122 -218t-170 -191t-214 -152t-260 -100.5t-302.5 -36q-344 0 -628 184z" />
17
+ <glyph unicode="A" horiz-adv-x="12288" d="M128 356h176l110 220h492l92 -220h176l-458 852h-118zM460 692l186 342l198 -342h-384zM1458 716q0 -174 112.5 -279t337.5 -105q116 0 204 30t140.5 83.5t78 121.5t25.5 149v492h-162v-492q0 -129 -63.5 -197.5t-208.5 -68.5q-147 0 -230.5 71.5t-83.5 194.5v492h-150 v-492zM2710 1056h364v-700h150v700h378v152h-892v-152zM3904 772q0 -82 35 -161t96.5 -141t153 -100t195.5 -38q107 0 199.5 38t153 100.5t95 141t34.5 160.5v24q0 85 -34.5 165t-95 142.5t-152.5 100.5t-200 38q-105 0 -196 -38t-152.5 -100.5t-96.5 -142.5t-35 -165v-24z M4048 784v12q0 125 90.5 216.5t245.5 91.5q82 0 147.5 -26t104.5 -70t59.5 -98t20.5 -114v-12q0 -147 -84.5 -240.5t-247.5 -93.5q-158 0 -247 95t-89 239zM4251 671q0 -15 10 -34q11 -21 33 -37q7 -12 28 -1t30 35l150 224q15 19 10 42t-24 42q-24 10 -46 4.5t-22 -28.5 l-164 -214q-5 -18 -5 -33zM5278 356h152v666l46 -70l330 -596h92l342 596l46 70v-666h164v852h-222l-318 -588l-46 -66l-46 66l-320 588h-220v-852zM6756 356h186l92 220h504l104 -220h160l-448 852h-140zM7092 692l180 342l186 -342h-366zM7928 1056h366v-700h152v700h376 v152h-894v-152zM9076 1056h364v-700h164v700h386v152h-914v-152zM10370 356h160v852h-80q0 -43 -19 -62.5t-61 -19.5v-770zM10908 772q0 -88 37 -167t104 -140t170.5 -97t228.5 -36q237 0 440 164l-104 90q-55 -39 -94.5 -62.5t-108.5 -48.5t-133 -25q-179 0 -277.5 92.5 t-98.5 229.5v12q0 134 98.5 227t277.5 93q170 0 326 -152l114 104q-206 186 -440 186q-116 0 -218.5 -38t-172 -100.5t-109.5 -142.5t-40 -165v-24z" />
18
+ <glyph unicode="C" d="M0 402v286q0 8 2.5 17.5t5.5 14.5l2 6l16 28q6 13 0 26l-16 28q-10 18 -10 38v284q0 28 16.5 52t41.5 30l914 378q27 10 54 10q29 0 52 -10l912 -374q26 -9 42 -33.5t16 -52.5v-284q0 -9 -2.5 -18.5t-5.5 -14.5l-2 -5l-16 -28q-6 -13 0 -26l16 -28q10 -20 10 -38v-286 q0 -27 -16 -51t-42 -33l-912 -374q-23 -10 -52 -10q-27 0 -54 10l-914 374q-25 9 -41.5 33.5t-16.5 50.5zM236 574q0 -42 24 -70t56 -28q36 0 59 27.5t23 70.5v90q0 7 -6 13.5t-14 6.5h-24v-120q0 -15 -9.5 -25.5t-24.5 -10.5t-24.5 10.5t-9.5 25.5v406q0 15 9.5 25.5 t24.5 10.5t24.5 -10.5t9.5 -25.5v-116h24q20 0 20 20v84q0 43 -23 70.5t-59 27.5q-32 0 -56 -28t-24 -70v-384zM256 568v398q0 30 18 50t46 20t45 -19.5t17 -50.5v-88q0 -8 -8 -8h-2h-4v96q0 24 -13.5 41t-34.5 17q-22 0 -36 -17t-14 -41v-398q0 -25 13.5 -40.5t36.5 -15.5 q21 0 34.5 15.5t13.5 40.5v96h4h2h4h4v-4v-4v-88q0 -31 -17 -51.5t-45 -20.5t-46 21t-18 51zM432 574q0 -43 25.5 -70.5t60.5 -27.5q37 0 61.5 27.5t24.5 70.5v384q0 43 -24.5 70.5t-61.5 27.5q-35 0 -60.5 -27.5t-25.5 -70.5v-384zM452 568v398q0 30 19 50t47 20 q27 0 45.5 -20t18.5 -50v-398q0 -30 -18.5 -51t-45.5 -21q-28 0 -47 21t-19 51zM468 568q0 -25 13.5 -40.5t36.5 -15.5t36.5 15.5t13.5 40.5v398q0 24 -14 41t-36 17t-36 -17t-14 -41v-398zM480 294h4l4 -4h288l34 -24v6q0 4 -2 7t-4 4l-2 1l-16 12l16 14q8 4 8 12v8 l-34 -28h-296v-6v-2zM484 564v406q0 15 9.5 25.5t24.5 10.5t24.5 -10.5t9.5 -25.5v-406q0 -15 -9.5 -25.5t-24.5 -10.5t-24.5 10.5t-9.5 25.5zM592 1220h256v-28q0 -11 8 -16l58 -34h12h8l58 34q12 6 12 16v28h42v-28q0 -4 12 -16l60 -34h6h12l58 34q8 5 8 16v28h256v6v4 l-4 4h-4h-248v28q0 11 -8 16l-58 34q-12 6 -18 0l-26 -18l-22 30l24 12q8 8 8 16v68q0 10 -8 18l-60 34q-3 3 -9 3t-9 -3l-60 -34q-6 -6 -6 -18v-68q0 -10 6 -16l24 -12l-22 -30l-24 18q-7 7 -20 0l-58 -34q-8 -5 -8 -16v-28h-248h-4l-4 -4v-4v-6zM636 504q0 -8 7 -14t17 -6 h60q43 0 62.5 27t19.5 83v344q0 58 -19.5 85t-62.5 27h-60q-10 0 -17 -6t-7 -14v-526zM658 508v4v514l2 4h2h58q34 0 48 -21t14 -67v-352q0 -47 -14 -66.5t-48 -19.5h-60v4h-2zM670 516h50q27 0 37.5 17t10.5 57v352q0 41 -10.5 57.5t-37.5 16.5h-50v-500zM690 534v464h30 q18 0 25 -11t7 -39v-362q0 -29 -7 -40.5t-25 -11.5h-30zM836 504q0 -8 7.5 -14t16.5 -6h96q8 0 14 6t6 14v28h-84v220h38q22 0 22 20v28h-60v202h84v28q0 8 -6 14t-14 6h-96q-9 0 -16.5 -6t-7.5 -14v-526zM850 268h38v8h-28v20h24v6h-24v20h28v4h-38v-58zM856 504v4v518 q0 4 4 4l4 4h86l2 -4l4 -4v-6h-4h-80v-238h58v-2v-4q0 -8 -4 -8h-54v-254h80h4v-6l-4 -4l-2 -4h-86h-4v4h-4zM860 1192v70q0 4 4 4l58 32l4 4q4 0 4 -4l22 -14l-22 -34h-4q-24 0 -24 -24q0 -22 24 -22q18 0 24 16h38v-28q0 -4 -2 -4l-56 -32q-8 -8 -8 0l-58 32zM902 280 q0 -12 8 -12h20q8 0 8 12v10q0 10 -8 10q-8 2 -16 2q-6 6 -6 8v8q2 4 6 4h12l4 -4v-8h8v8q0 8 -8 8h-20q-8 0 -8 -8v-12q0 -5 8 -10q8 0 16 -2l4 -4v-10q0 -4 -4 -4h-16l-2 4v6h-6v-6zM942 1244l24 34l20 -12q2 0 2 -4v-28h-38q-2 2 -4 5t-4 5zM950 322h16v-54h10v54h16v4 h-42v-4zM962 1348v4v68v4l62 32q0 4 2 4v-4l62 -32l4 -4v-68l-4 -4l-24 -12l-20 34q0 2 3 7t3 9q0 10 -7.5 17t-16.5 7q-11 0 -18.5 -7t-7.5 -17q0 -4 8 -16l-22 -34zM972 1288l16 32l28 -18h10h8l28 18l16 -32l-20 -10q-12 -12 -12 -16v-28h-42v28q0 10 -12 16zM986 268h10 v12h-10v-12zM996 1328l24 34h6h8l20 -34l-28 -12q0 -3 -1 -3t-1 3zM1030 268h34v8h-24v10q0 4 4 4q4 2 8.5 4t5.5 2q6 4 6 10v12q0 8 -6 8h-18q-2 0 -6 -2.5t-4 -5.5v-4l10 -4v8q0 4 4 4h10q4 0 4 -4v-12q0 -4 -4 -4q-8 -2 -14 -6q-10 0 -10 -6v-22zM1062 1192v28h40 q1 -7 8 -11.5t14 -4.5q24 0 24 22q0 24 -24 24h-6l-20 34l24 14l2 4q4 0 4 -4l58 -32q4 0 4 -4v-70q0 -4 -4 -4l-58 -32q0 -3 -2 -3t-4 3l-58 32zM1062 1234v28l2 4l20 12l24 -34q-2 -2 -6 -10h-40zM1082 280q0 -12 10 -12h12q12 0 12 12v38q0 8 -12 8h-12q-10 0 -10 -8v-38 zM1088 280v38l4 4h12q4 0 4 -4v-38l-4 -4h-12q-4 0 -4 4zM1094 504q0 -8 6.5 -14t15.5 -6h30v242h34q30 0 52 22t22 72v142q0 88 -74 88h-64q-9 0 -15.5 -6t-6.5 -14v-526zM1112 508v516l4 2v4h2h62q54 0 54 -68v-146q0 -68 -54 -68h-56v-244v-4h-6q-6 0 -6 8zM1124 314 l16 8v-54h8v58h-8l-16 -4v-8zM1124 762h56q44 0 44 54v146q0 54 -44 54h-56v-254zM1146 780v218h34q22 0 22 -32v-158q0 -28 -22 -28h-34zM1166 268h34v8h-28v10l4 4q4 2 18 6q6 6 6 10v12q0 8 -10 8h-18q-6 0 -6 -8v-4l6 -4v8l4 4h10q4 0 4 -4v-12q0 -4 -4 -4l-14 -6 q-6 0 -6 -6v-22zM1240 266l38 24h286l2 4h4v2v6h-292l-38 28v-8q0 -4 2 -7t4 -4l2 -1l20 -14l-20 -12q-8 -4 -8 -12v-6zM1292 574q0 -42 24 -70t56 -28q37 0 61.5 27.5t24.5 70.5v384q0 43 -24.5 70.5t-61.5 27.5q-32 0 -56 -28t-24 -70v-384zM1308 568v398q0 30 19 50 t45 20q30 0 50 -20t20 -50v-398q0 -31 -19.5 -51.5t-50.5 -20.5q-28 0 -46 21t-18 51zM1322 568q0 -25 15 -40.5t35 -15.5q24 0 40 15.5t16 40.5v398q0 24 -16 41t-40 17q-20 0 -35 -17t-15 -41v-398zM1342 564v406q0 15 8.5 25.5t21.5 10.5q15 0 25.5 -10.5t10.5 -25.5 v-406q0 -15 -10.5 -25.5t-25.5 -10.5q-13 0 -21.5 10.5t-8.5 25.5zM1496 504q0 -8 6 -14t14 -6h94q20 0 20 20v28h-84v220h40q20 0 20 20v28h-60v202h84v28q0 20 -20 20h-94q-8 0 -14 -6t-6 -14v-526zM1512 508v518l4 4l4 4h84l2 -4l4 -4v-6h-84v-238h60v-2v-4q0 -8 -6 -8 h-54v-254h84v-6q0 -4 -4 -4l-2 -4h-84l-4 4zM1658 1002h54v-498q0 -8 6.5 -14t15.5 -6h30v518h52v28q0 7 -7 13.5t-15 6.5h-114q-22 0 -22 -20v-28zM1680 1020v6q0 4 2 4q0 4 2 4h104q0 -4 4 -4v-4v-6h-50v-516v-4h-4q-8 0 -8 8v512h-50z" />
19
+ <glyph unicode="F" d="M24 -286q0 -46 34 -80t80 -34h1772q46 0 80 34t34 80v1772q0 46 -34 80t-80 34h-1772q-46 0 -80 -34t-34 -80v-1772zM972 478v264h194v228q0 68 23 128t67.5 108t119 76t170.5 28q48 0 94.5 -2.5t69.5 -5.5l22 -2l-4 -248q-82 2 -170 2q-67 0 -89.5 -28.5t-22.5 -89.5 v-12v-182h288l-12 -264h-276v-736h-280v736h-194z" />
20
+ <glyph unicode="G" d="M134 708q0 183 68 345.5t190 284.5q54 52 129 52t127 -52q50 -52 50 -125t-50 -127q-74 -73 -116 -171.5t-42 -206.5q0 -109 42 -208t113.5 -170.5t170.5 -113.5t208 -42q147 0 270.5 71t195.5 194t72 269q0 173 -99 311.5t-257 194.5v-416q0 -75 -53.5 -126.5 t-128.5 -51.5q-74 0 -126 51.5t-52 126.5v624q0 74 52 126t126 52q182 0 347.5 -70.5t284.5 -190.5t189.5 -285t70.5 -346q0 -182 -70.5 -347.5t-189.5 -285t-284.5 -190.5t-347.5 -71q-181 0 -345.5 71t-284 190.5t-190 285t-70.5 347.5z" />
21
+ <glyph unicode="I" d="M0 26v934q146 30 216.5 53.5t103.5 56.5q16 20 32 54t24 58l8 24q3 -3 6.5 -9t14 -24.5t15 -35.5t8.5 -42.5t-6 -44.5q-6 -12 -11 -20.5t-8.5 -15.5t-9.5 -14t-8 -11t-9.5 -9.5t-10 -8t-12.5 -9t-13.5 -8.5t-17.5 -10.5t-20 -11.5q-48 -40 -48 -91v-7q4 -55 48 -86 q17 -11 33 -11q21 1 41 19q36 34 82 122q17 34 26.5 79.5t13.5 78t25.5 72t62.5 70.5q31 24 70 30q29 4 56 5q10 0 20 -1q11 -1 22 -1q28 0 58 4q42 5 92.5 38.5t101.5 100.5q38 47 81 74t83 33q24 4 47 3q16 0 31 -1q39 -4 70.5 -16.5t56 -25.5t37.5 -23l14 -10 q-6 2 -15.5 6t-38.5 12q-30 8 -58 12q-15 2 -33 1q-15 0 -32 -1q-37 -3 -68.5 -16.5t-61.5 -44t-49 -77.5q-19 -43 -35.5 -75t-29.5 -54t-29 -38t-27 -25t-30 -16t-31.5 -10t-38 -9t-43.5 -11q-60 -16 -77 -69q-5 -16 -5 -30q0 -29 21 -52q22 -24 55 -24q28 0 65 18 q10 5 21 11q59 37 93.5 77.5t46 69t39.5 61t77 56.5q69 32 131 43.5t126 14t99 8.5q304 41 384 174q34 52 53 102t21 74l2 24q2 -6 4 -17.5t7 -45.5q4 -30 4 -60q-1 -4 -1 -7q0 -33 -10.5 -78.5t-30.5 -84.5t-59.5 -79t-95.5 -68q-94 -49 -166 -76t-106 -32t-74 -15t-78 -31 q-107 -58 -107 -146q0 -43 25 -92q36 -62 97 -68q6 -1 12 -1q55 0 111 49q33 29 51.5 72.5t20.5 72.5l2 29q3 -7 7 -19.5t11 -48.5q8 -38 8 -71t-13 -72q-13 -41 -41 -71q-56 -60 -94 -84t-92 -25h-4q-54 0 -138 27q-78 22 -135 26q-20 1 -36 1q-31 -1 -49 -5 q-28 -6 -54 -22q-46 -22 -70 -64q-13 -23 -13 -43q0 -17 9 -31q14 -25 31.5 -35.5t48.5 -5.5t74 31q60 33 102 44.5t100 11.5q122 0 218 -56q25 -16 53 -39t43 -38l16 -15q-9 5 -24.5 13t-61.5 21q-44 14 -86 16q-5 0 -11 1q-38 0 -83 -16q-52 -18 -90 -61 q-74 -82 -122 -114q-46 -31 -79 -31q-1 1 -3 1q-34 2 -90 26q-84 34 -126 46q-12 -18 -12 -56q0 -16 5 -30t10 -20l5 -6q36 0 54 -8q92 0 128 -64q12 -25 17 -50t4 -38l-1 -12q-4 3 -11.5 8.5t-31 17t-47 18t-57 6t-63.5 -13.5q-50 -20 -86 -65.5t-42 -98.5h-424 q-87 0 -152.5 65t-65.5 153z" />
22
+ <glyph unicode="J" d="M305 433q0 152 21 325.5t62 315.5q54 193 138 398q2 4 4 4q9 17 55 27.5t107 10.5q60 0 107 -11t57 -27l2 -4q76 -179 138 -398q1 -2 2 -7t2 -7l28 6l-6 16q-46 160 -86 262q48 138 80 216q4 4 4 6q12 14 56.5 24t99.5 10q57 0 102 -10.5t54 -25.5l4 -4q69 -169 112 -312 l8 -8q5 -4 13 -11.5t30 -32.5t40.5 -53.5t37.5 -73.5t27 -93q5 -27 5 -55q0 -11 -1 -23q-1 -15 -1 -33q0 -32 3 -75q5 -68 22 -126q14 -45 18 -54l-68 -26l-42 -14l-54 -22q-16 31 -30 72q-10 37 -10 102q0 26 2 56q1 29 1 56q0 75 -11 136q-11 57 -41.5 115.5t-52 86 t-36.5 42.5l-12 -2q36 -106 64 -242q19 -87 22.5 -208.5t7.5 -159.5q6 -73 34 -193t32 -171v-8q8 -67 72 -88q5 -3 34 -8q40 64 40 132q0 14 -2 28q0 2 -1 6t-1 6l40 18l128 60q11 -32 14 -80q-1 -57 -11.5 -98.5t-20.5 -54.5l-10 -13l-222 -60l4 4l-10 -4q-26 -8 -53 -8 q-32 0 -65 12q-87 -21 -194 -24q-20 -4 -44 0q-22 0 -34 2q2 22 2 92l156 38q16 3 26 22l-230 -46l-132 -28q0 -10 7.5 -17t18.5 -7l106 26q-8 -104 -8 -114q-3 -20 -22 -34q-41 -20 -94 -36q24 48 24 122h-8q-16 -83 -66 -136q-8 -10 -28 -30q-40 -26 -76 -32q29 34 40 48 q44 59 64 136l6 28q6 24 6 52q4 39 13.5 100t12.5 92q1 13 1 34q0 26 -2 61q-3 65 -17 153q-30 185 -32 356q-1 15 -1 29q0 147 25 185h-10q-21 -19 -39 -51t-25.5 -52t-21.5 -63q-17 -51 -22 -106q-1 -18 -1 -36q0 -38 7 -80q9 -60 19 -102.5t29 -109.5q12 -57 12 -107 q0 -29 -4 -55q0 -1 -46.5 9.5t-93.5 21.5l-46 11v21q0 63 -16 111q-38 80 -45 196q-2 27 -2 51q0 83 19 143q21 96 60 146q-57 -53 -82 -152q-12 -57 -15 -121q-1 -14 -1 -29q0 -51 8 -106q11 -72 36 -124q21 -58 21 -110q0 -10 -1 -20l-10 4q-52 -27 -85.5 -78.5 t-40.5 -89.5l-8 -38l12 -22l12 -6q0 -8 -8 -12q-60 -85 -60 -167q0 -45 18 -89q-78 18 -142 50q-20 12 -20 34q-7 63 -11 159t-4 248zM423 -169q0 6 5 11l54 54q39 -11 74 -16q14 -8 46 -20q70 -23 163 -23q83 0 185 19l10 -14q9 -6 7 -15.5t-11 -14.5q-95 -35 -234 -38 q-14 -2 -27 -2l-27 2q-139 3 -234 38q-11 6 -11 19zM502 -64q-14 41 -14 83q0 89 64 179h2l178 -86q-46 -78 -46 -154v-14q0 -18 2 -26q1 -8 4 -19.5t4 -14.5q0 -6 4 -10v-4q-6 2 -22 6q-10 4 -30 8q-61 15 -122 26h-8l-2 2zM548 1472q0 -14 42.5 -24t101.5 -10t101.5 10 t42.5 24q0 15 -41.5 24.5t-102.5 9.5t-102.5 -9.5t-41.5 -24.5zM646 284q19 38 28 42q4 -1 17.5 -6t29 -10.5t27.5 -9.5l-14 -46l-86 30h-2zM942 964q0 -11 8 -18t18 -6l60 10q51 -246 51 -588q0 -52 -1 -106l46 8q-8 403 -70 692l192 36q19 4 26 22zM1038 1560 q0 -13 40.5 -22.5t97.5 -9.5t97.5 9.5t40.5 22.5t-40.5 22.5t-97.5 9.5t-97.5 -9.5t-40.5 -22.5zM1046 -74q16 8 44 24q31 17 28 48q0 6 2 8q20 0 64 -4q14 -2 60 -2q68 0 164 12l28 -28q7 -8 5 -17.5t-11 -12.5q-92 -33 -224 -36q-14 -2 -27 -2l-27 2q-63 0 -106 8z M1610 488l68 26q16 -24 16 -40q-6 -3 -21.5 -9t-28 -10.5t-20.5 -8.5l-8 16z" />
23
+ <glyph unicode="K" d="M126 -198v1798h1798v-1798h-1798zM446 688q0 -20 13 -33t37 -13q25 0 39.5 15t14.5 41q0 19 -12.5 31.5t-35.5 12.5q-26 0 -41 -15t-15 -39zM526 306q0 -18 20 -18h268q8 0 14 5.5t6 12.5q0 20 -20 20q-94 0 -94 48q0 20 14 40l58 138q8 17 20 27.5t30 14.5t29 5t31 1 h252q12 0 12 -10l66 -176q10 -22 10 -46q0 -42 -64 -42q-18 0 -18 -20q0 -18 18 -18h302q16 0 16 18q0 20 -14 20q-49 3 -77.5 23t-44.5 65l-278 722q-6 30 -32 30q-22 0 -42.5 -16.5t-31.5 -39.5l-320 -696q-18 -46 -41.5 -67t-68.5 -21q-9 0 -14.5 -6t-5.5 -14zM840 658v6 l124 272q31 59 38 98q0 6 4 6q2 0 2 -6q6 -51 52 -152l70 -194q4 -6 4 -20t-26 -14h-258q-10 0 -10 4zM1480 688q0 -46 44 -46q27 0 41.5 15t14.5 41q0 19 -12 31.5t-36 12.5q-52 0 -52 -54z" />
24
+ <glyph unicode="P" d="M34 606q0 200 79 384t212 317.5t317 213t386 79.5q201 0 384 -79.5t315.5 -213t210.5 -317t78 -384.5q0 -162 -50 -313.5t-141 -272.5t-212.5 -212t-272.5 -140.5t-312 -49.5q-202 0 -386 77.5t-317 209.5t-212 315.5t-79 385.5zM128 606q0 -182 70.5 -348.5t190.5 -288 t287 -193.5t352 -72q262 0 476 137t326 363q68 139 68 294q0 129 -48.5 245t-131.5 202t-193.5 144t-234.5 77q127 -51 224 -158.5t138 -241.5q36 -100 36 -207q0 -71 -16 -145q-40 -186 -166 -318q-122 -134 -303 -196q-125 -43 -252 -43q-57 0 -115 9q-187 26 -340 151 t-230 303q-77 159 -77 341q0 15 1 31q7 200 104 368q94 173 261.5 289t366.5 149q3 0 12.5 3.5t15.5 4.5q-172 -15 -324.5 -91.5t-261.5 -195.5t-172.5 -278.5t-63.5 -334.5zM286 574q24 -162 115 -302.5t225 -221.5q138 -80 298 -88q17 -1 33 -1q141 0 265 59 q-84 -24 -170 -24q-122 0 -234 48t-193 129t-129 194.5t-48 238.5q0 231 162 406v8l16 16q110 125 264 198.5t324 73.5q176 0 335.5 -80t264.5 -216q-30 50 -78 110q-116 140 -275.5 221t-332.5 87q-27 2 -54 2q-149 0 -289 -56q-165 -66 -281 -194q-120 -114 -176 -276 q-45 -128 -46 -261q1 -35 4 -71zM574 606q6 -127 92 -235.5t208 -144.5q52 -14 103 -14q69 0 141 26q124 44 186 142q59 90 59 193q1 17 -1 35q-12 122 -96 206q-80 85 -201 97q-19 2 -37 2q-98 0 -170 -55q-88 -63 -114 -178q-7 -28 -7 -58q0 -67 35 -140q61 -94 162 -118 q34 -8 66 -8q65 0 120 32q99 74 110 154q5 25 5 49q0 69 -45 129q-23 33 -64 56.5t-82 29.5q-84 0 -162 -62q-49 -49 -48 -120q0 -17 2 -34q7 -69 86 -132q28 -14 98 -14q-51 0 -89 29.5t-57 76.5v8q-15 30 -15 60q0 43 31 86q47 70 146 70q96 -15 138 -94q25 -34 28 -80 v-11q0 -40 -20 -77q-36 -90 -146 -116q-21 -6 -43 -6l-143 62q-36 36 -56 85q-15 38 -15 76q0 11 1 23q0 71 46.5 130.5t120.5 85.5q42 15 85 14q32 0 64 -8q76 -18 131 -78q55 -58 71 -136q6 -31 6 -64q0 -48 -14 -98q-26 -76 -95 -130.5t-153 -68.5q-27 -5 -54 -5 q-57 0 -114 20q-117 41 -186 176q-28 57 -34 128q-2 18 -2 35q0 52 14 99q42 134 172 212q94 56 191 56q37 0 75 -8q144 -15 247 -134.5t109 -271.5q0 -77 -24 -153.5t-68 -132.5q-98 -132 -248 -176q-67 -19 -142 -19q-57 0 -120 11q107 -40 194 -40q143 0 263.5 71.5 t189.5 192.5t69 262q-10 119 -69.5 224.5t-152.5 173.5q-109 88 -256 100q-20 2 -40 1q-123 0 -228 -61q-124 -59 -202 -186q-54 -93 -54 -208q0 -22 2 -44z" />
25
+ <glyph unicode="V" d="M202 1166q-3 14 -3 28q0 36 19 70q26 46 76 64l682 240q21 8 48 8t48 -8l682 -240q50 -18 76 -64q19 -34 19 -70q0 -14 -3 -28q-7 -31 -9 -41.5t-22.5 -87.5t-39 -133t-55.5 -158t-75.5 -185t-96 -191.5t-119 -198.5t-142.5 -186t-169 -173q-43 -36 -94 -36t-94 36 q-88 77 -169 173t-142.5 186t-119 198.5t-96 191.5t-75.5 185t-55.5 158t-39 133t-22.5 87.5t-9 41.5zM266 1180q3 -17 13 -60.5t37 -135.5t63 -192.5t95 -228t127.5 -245.5t165.5 -240.5t205 -217.5q23 -20 52 -20t52 20q108 95 205 218t165.5 241t127.5 245t95 227.5 t63 192.5t37 135.5t13 60.5q2 8 2 17q0 20 -10 37q-14 25 -42 32l-682 242q-13 5 -26 5l-26 -5l-682 -242q-28 -7 -42 -32q-10 -18 -10 -37q0 -9 2 -17zM342 1194l682 240l682 -240q-3 -17 -10 -47.5t-34.5 -125t-60.5 -187.5t-91 -222t-124 -243.5t-161 -236t-201 -214.5 q-106 93 -200.5 213.5t-161.5 239t-123.5 240t-91.5 224.5t-60 184.5t-35 128.5zM534 1112l92 -230h20q11 0 20.5 -8t13.5 -16l4 -8l242 -594h196l238 588l4 6q14 32 38 32h20l92 230h-270l-220 -556l-220 556h-270z" />
26
+ <glyph unicode="W" d="M124 696q0 183 71.5 349.5t192.5 287t287.5 192t348.5 71.5q183 0 349.5 -71.5t287 -192t192 -287t71.5 -349.5t-71.5 -349.5t-192 -287t-287 -192t-349.5 -71.5q-182 0 -348.5 71.5t-287.5 192t-192.5 287t-71.5 349.5zM238 696q0 -227 119 -415t317 -289l-372 1018 q-64 -149 -64 -314zM376 1140h24q61 0 111.5 2.5t70.5 5.5l20 2q34 2 50.5 -24t5 -54t-45.5 -32q-26 -4 -64 -6l260 -772l174 520l-92 248l-78 10q-33 2 -45 30t3.5 55t49.5 25q48 -10 176 -10q62 0 112.5 2.5t69.5 5.5l20 2q34 2 50.5 -24t5 -54t-45.5 -32q-24 -4 -62 -6 l258 -764l80 262q60 164 60 260q0 36 -12 92q-1 3 -14 32t-20 42q-29 44 -41.5 64.5t-25.5 55t-13 64.5q0 56 37.5 98t92.5 42q-105 96 -240 149t-284 53q-198 0 -369.5 -93t-278.5 -251zM802 -58q108 -34 222 -34q136 0 262 46q0 2 -2 2l-246 672zM1430 22 q175 105 278.5 284t103.5 390q0 188 -86 360q4 -40 4 -60q0 -135 -64 -284z" />
27
+ <glyph unicode="&#x2000;" horiz-adv-x="800" />
28
+ <glyph unicode="&#x2001;" horiz-adv-x="1600" />
29
+ <glyph unicode="&#x2002;" horiz-adv-x="800" />
30
+ <glyph unicode="&#x2003;" horiz-adv-x="1600" />
31
+ <glyph unicode="&#x2004;" horiz-adv-x="533" />
32
+ <glyph unicode="&#x2005;" horiz-adv-x="400" />
33
+ <glyph unicode="&#x2006;" horiz-adv-x="266" />
34
+ <glyph unicode="&#x2007;" horiz-adv-x="266" />
35
+ <glyph unicode="&#x2008;" horiz-adv-x="200" />
36
+ <glyph unicode="&#x2009;" horiz-adv-x="320" />
37
+ <glyph unicode="&#x200a;" horiz-adv-x="88" />
38
+ <glyph unicode="&#x202f;" horiz-adv-x="320" />
39
+ <glyph unicode="&#x205f;" horiz-adv-x="400" />
40
+ <glyph unicode="&#xe000;" horiz-adv-x="1000" d="M0 0z" />
41
+ </font>
42
+ </defs></svg>
css/automatticons-regular-webfont.ttf ADDED
Binary file
css/automatticons-regular-webfont.woff ADDED
Binary file
css/polldaddy.css CHANGED
@@ -1,6 +1,708 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* NEW STYLES, 2.0+ ------------------------------------------------------------
2
  ---------------------------------------------------------------------------------------------------*/
3
- abbr{
4
  font-size:11px;
5
  color: #b8b8b8;
6
  line-height: 20px;
@@ -74,10 +776,6 @@ td#signup-button{
74
  width:90px;
75
  }
76
 
77
- td a.row-title{
78
- /*font-size: 14px;*/
79
- }
80
-
81
  ul#answers li span.handle{
82
  background-color: #FFF;
83
  }
@@ -263,12 +961,12 @@ table.answer td.answer-media-icons ul, table.question td.answer-media-icons ul{
263
  }
264
 
265
  .hardbreak {
266
- white-space: pre-wrap; /* css-3 */
267
- white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
268
- white-space: -pre-wrap; /* Opera 4-6 */
269
- white-space: -o-pre-wrap; /* Opera 7 */
270
  word-wrap: break-word;
271
- }
272
 
273
 
274
  /* OLD STYLES, PRE-2.0 ------------------------------------------------------------
1
+ /* NEW STYLES, 3.0+ ------------------------------------------------------------
2
+ ---------------------------------------------------------------------------------------------------*/
3
+ @font-face {
4
+ font-weight: normal;
5
+ font-style: normal;
6
+ font-family: "automatticons";
7
+ src: url("automatticons-regular-webfont.eot");
8
+ src: url("automatticons-regular-webfont.eot?#iefix") format("embedded-opentype"), url("automatticons-regular-webfont.woff") format("woff"), url("automatticons-regular-webfont.ttf") format("truetype"), url("automatticons-regular-webfont.svg#automatticons") format("svg");
9
+ }
10
+
11
+ #wpwrap, #wpcontent, #wpbody, #wpbody-content {
12
+ height: 100% !important;
13
+ }
14
+
15
+ @media screen and (max-width: 782px) {
16
+ #wpcontent, .auto-fold #wpcontent {
17
+ padding-left: 20px;
18
+ }
19
+ }
20
+
21
+ #wpfooter {
22
+ display: none;
23
+ }
24
+
25
+ #wpbody-content {
26
+ padding-bottom: 0 !important;
27
+ }
28
+
29
+ #manage-polls {
30
+ height: 100%;
31
+ margin-left: -20px;
32
+ margin-right: 0;
33
+ margin-top: 0;
34
+ }
35
+
36
+ @media screen and (max-width: 782px) {
37
+ #manage-polls {
38
+ clear: none;
39
+ }
40
+ }
41
+
42
+ .st_image_loader > div {
43
+ min-height: 200px;
44
+ width: 150px;
45
+ margin: 0 auto;
46
+ }
47
+
48
+ h2#polldaddy-header, h2#poll-list-header {
49
+ margin-bottom: 14px;
50
+ }
51
+
52
+ #manage-polls #save_menu_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;
63
+ flex-direction: column;
64
+ box-sizing: border-box;
65
+ min-height: calc(100% - 30px);
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
+ }
76
+ }
77
+
78
+ .cs-wrapper-row {
79
+ width: 100%;
80
+ display: flex;
81
+ flex-direction: column;
82
+ flex-grow: 1;
83
+ }
84
+
85
+ .cs-centered {
86
+ align-items: center;
87
+ }
88
+
89
+ .cs-background-fill {
90
+ background-color: white;
91
+ }
92
+
93
+ .cs-wrapper-row > * {
94
+ max-width: 960px;
95
+ width: 100%;
96
+ }
97
+
98
+ .cs-wrapper-row:not(.cs-centered) > * {
99
+ padding-left: 48px !important;
100
+ }
101
+
102
+ @media (max-width: 1280px) {
103
+ .cs-wrapper-row {
104
+ width: auto;
105
+ padding-left: 16px;
106
+ padding-right: 16px;
107
+ }
108
+
109
+ .cs-wrapper-row > * {
110
+ width: -moz-fill-available;
111
+ width: -webkit-fill-available;
112
+ }
113
+
114
+ .cs-wrapper-row:not(.cs-centered) > * {
115
+ padding-left: 0 !important;
116
+ }
117
+ }
118
+
119
+ /* landing page */
120
+ .crowdsignal-landing__hero {
121
+ display: -webkit-box;
122
+ display: -webkit-flex;
123
+ display: -ms-flexbox;
124
+ display: flex;
125
+ margin-top: 50px;
126
+ margin-bottom: 40px;
127
+
128
+ -webkit-box-pack: justify;
129
+ -webkit-justify-content: space-between;
130
+ -ms-flex-pack: justify;
131
+ justify-content: space-between;
132
+ -webkit-box-align: center;
133
+ -webkit-align-items: center;
134
+ -ms-flex-align: center;
135
+ align-items: center;
136
+ }
137
+
138
+ .crowdsignal-landing__hero-left {
139
+ display: -webkit-box;
140
+ display: -webkit-flex;
141
+ display: -ms-flexbox;
142
+ display: flex;
143
+ -webkit-box-orient: vertical;
144
+ -webkit-box-direction: normal;
145
+ -webkit-flex-direction: column;
146
+ -ms-flex-direction: column;
147
+ flex-direction: column;
148
+ -webkit-box-pack: center;
149
+ -webkit-justify-content: center;
150
+ -ms-flex-pack: center;
151
+ justify-content: center;
152
+ -webkit-box-align: start;
153
+ -webkit-align-items: flex-start;
154
+ -ms-flex-align: start;
155
+ align-items: flex-start;
156
+ }
157
+
158
+ .crowdsignal-landing__hero-headline {
159
+ font-family: 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
160
+ font-size: 48px;
161
+ line-height: 60px;
162
+ font-weight: 700;
163
+ margin-bottom: 24px;
164
+ }
165
+
166
+ .crowdsignal-landing__hero-right {
167
+ display: -webkit-box;
168
+ display: -webkit-flex;
169
+ display: -ms-flexbox;
170
+ display: flex;
171
+ -webkit-box-orient: vertical;
172
+ -webkit-box-direction: normal;
173
+ -webkit-flex-direction: column;
174
+ -ms-flex-direction: column;
175
+ flex-direction: column;
176
+ -webkit-box-pack: center;
177
+ -webkit-justify-content: center;
178
+ -ms-flex-pack: center;
179
+ justify-content: center;
180
+ -webkit-box-align: end;
181
+ -webkit-align-items: center;
182
+ -ms-flex-align: center;
183
+ align-items: center;
184
+ }
185
+
186
+ .crowdsignal-landing__herogif {
187
+ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
188
+ }
189
+
190
+ .crowdsignal-landing__image {
191
+ max-width: 280px;
192
+ }
193
+
194
+ .crowdsignal-landing__hero-subline {
195
+ max-width: 440px;
196
+ margin-bottom: 40px;
197
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
198
+ font-size: 16px;
199
+ line-height: 22px;
200
+ font-weight: 400;
201
+ letter-spacing: 0.02em;
202
+ }
203
+
204
+ .crowdsignal-landing__blocks-cta {
205
+ margin-top: 48px;
206
+ }
207
+
208
+ .crowdsignal-landing__blocks-cta-title {
209
+ font-size: 20px;
210
+ line-height: 28px;
211
+ font-weight: 700;
212
+ margin-bottom: 32px;
213
+ color: #3c434a;
214
+ }
215
+
216
+ .crowdsignal-landing__blocks-cta-title.crowdsignal-landing__blocks-export-showcase {
217
+ margin-top: 32px;
218
+ }
219
+
220
+ .crowdsignal-landing__blocks-cta.crowdsignal-landing__blocks-export-showcase {
221
+ text-align: center;
222
+ margin-bottom: 32px;
223
+ }
224
+
225
+ .crowdsignal-landing__card-container {
226
+ display: grid;
227
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
228
+ grid-gap: 32px 32px;
229
+ }
230
+
231
+ .crowdsignal-landing__card {
232
+ box-shadow: 0px 16px 24px rgba( 0, 0, 0, 0.06 ), 0px 2px 6px rgba( 0, 0, 0, 0.04 ), 0px 0px 1px rgba( 0, 0, 0, 0.04 );
233
+ border-radius: 3px;
234
+ padding: 16px;
235
+ display: flex;
236
+ flex-direction: column;
237
+ }
238
+
239
+ .crowdsignal-landing__card-icon img {
240
+ width: 32px;
241
+ }
242
+
243
+ .crowdsignal-landing__card-title {
244
+ font-size: 16px;
245
+ font-weight: 700;
246
+ line-height: 28px;
247
+ margin-top: 4px;
248
+ margin-bottom: 8px;
249
+ }
250
+
251
+ .crowdsignal-landing__card-body {
252
+ font-size: 16px;
253
+ line-height: 22px;
254
+ flex-grow: 1;
255
+ }
256
+
257
+ .crowdsignal-landing__card-footer {
258
+ text-align: right;
259
+ margin-top: 16px;
260
+ }
261
+
262
+ .crowdsignal-landing__card-footer .components-button.is-secondary {
263
+ color: #E34C84;
264
+ border-color: #E34C84;
265
+ background: white;
266
+ box-shadow: inset 0 0 0 1px #E34C84;
267
+ }
268
+
269
+ .crowdsignal-landing__card-footer .components-button.is-secondary:hover {
270
+ background: white;
271
+ }
272
+
273
+ @media (max-width: 960px) {
274
+ .crowdsignal-landing__hero {
275
+ -webkit-box-direction: normal;
276
+ -webkit-flex-direction: column;
277
+ -ms-flex-direction: column;
278
+ flex-direction: column;
279
+ align-items: stretch;
280
+ }
281
+
282
+ .crowdsignal-landing__hero-right {
283
+ margin-bottom: 40px;
284
+ margin-left: 0px;
285
+ margin-right: 0px;
286
+ }
287
+
288
+ .crowdsignal-landing__image {
289
+ max-width: 400px;
290
+ margin-left: 0px;
291
+ width: 100%;
292
+ min-width: 280px;
293
+ }
294
+ }
295
+
296
+ /* dashboard view */
297
+ .cs-dashboard__crowdsignal-header {
298
+ display: flex;
299
+ flex-direction: row;
300
+ align-items: center;
301
+ }
302
+
303
+ .cs-dashboard__crowdsignal-header-link {
304
+ text-decoration: none;
305
+ }
306
+
307
+ .cs-dashboard__crowdsignal-header .cs-dashboard__crowdsignal-header-brand {
308
+ display: flex;
309
+ align-items: center;
310
+ font-size: 24px;
311
+ margin: 0;
312
+ color: #3c434a;
313
+ }
314
+
315
+ .cs-dashboard__crowdsignal-header-logo {
316
+ margin-right: 24px;
317
+ }
318
+
319
+ .cs-dashboard__crowdsignal-header-actions {
320
+ display: flex;
321
+ align-items: center;
322
+ flex-grow: 1;
323
+ justify-content: flex-end;
324
+ }
325
+
326
+ .cs-dashboard__footer {
327
+ margin: 0 0 32px;
328
+ display: flex;
329
+ align-items: flex-end;
330
+ justify-content: space-between;
331
+ }
332
+
333
+ .cs-dashboard__footer .cs-dashboard__crowdsignal-header-logo{
334
+ margin-bottom: 16px;
335
+ }
336
+
337
+ .cs-dashboard__a8c-link {
338
+ font-size: 9px;
339
+ text-transform: uppercase;
340
+ text-decoration: none;
341
+ color: #1b1b1b;
342
+ display: inline-flex;
343
+ align-items: center;
344
+ }
345
+
346
+ .cs-dashboard__a8c-link span {
347
+ display: inline-block;
348
+ color: #1b1b1b;
349
+ width: 93px;
350
+ padding: 0 4px;
351
+ overflow: hidden;
352
+ height: 18px;
353
+ }
354
+
355
+ .cs-dashboard__a8c-link span:before {
356
+ content: 'A';
357
+ position: relative;
358
+ font: normal 16px/1em 'automatticons';
359
+ text-decoration: none;
360
+ padding-right: 20px;
361
+ color: #1b1b1b;
362
+ vertical-align: middle;
363
+ }
364
+
365
+ .cs-account__dropdown-menu-toggle.components-button.has-icon {
366
+ font-size: 14px;
367
+ padding-right: 0;
368
+ }
369
+
370
+ .cs-account__dropdown-menu-toggle.components-button:focus:not(:disabled) {
371
+ box-shadow: none;
372
+ outline: none;
373
+ }
374
+
375
+ .cs-account__dropdown-menu-toggle.components-button.has-icon .dashicons::before {
376
+ width: 12px;
377
+ }
378
+
379
+ .cs-dashboard__main {
380
+ display: flex;
381
+ flex-direction: column;
382
+ grid-column: 2 / span 2;
383
+ grid-row: 2;
384
+ background: white;
385
+ padding: 8px 0;
386
+ flex-grow: 1;
387
+ }
388
+
389
+ .cs-dashboard__content {
390
+ font-size: 14px;
391
+ margin-left: 0;
392
+ }
393
+ .cs-dashboard__content a {
394
+ color: black;
395
+ text-decoration: none;
396
+ outline: none;
397
+ }
398
+
399
+ .cs-dashboard__header {
400
+ display: flex;
401
+ flex-direction: row;
402
+ justify-content: space-between;
403
+ align-items: center;
404
+ }
405
+
406
+ .cs-dashboard__header-notice {
407
+ margin: 16px 0;
408
+ }
409
+
410
+ .cs-dashboard__header-notice .components-notice {
411
+ margin-left: 0;
412
+ display: inline-flex;
413
+ }
414
+
415
+ .cs-dashboard__header-notice .components-button.components-notice__dismiss {
416
+ padding: 8px;
417
+ }
418
+
419
+ .cs-dashboard__header-notice .components-button.components-notice__dismiss > svg {
420
+ width: 16px;
421
+ height: 16px;
422
+ }
423
+
424
+ .cs-dashboard__content-item {
425
+ display: table-row;
426
+ }
427
+
428
+ .cs-dashboard__content-item:hover .cs-dashboard__content-item-attribute, .cs-dashboard__content-item.is-active .cs-dashboard__content-item-attribute {
429
+ background-color: #f6f6f6;
430
+ }
431
+
432
+ .cs-dashboard__content-item.is-selected .cs-dashboard__content-item-attribute {
433
+ background-color: #f6fdff;
434
+ }
435
+
436
+ .cs-dashboard__content-item.is-selected:hover .cs-dashboard__content-item-attribute {
437
+ background-color: #d9f9ff;
438
+ }
439
+
440
+ .cs-dashboard__content-item.is-header .cs-dashboard__content-item-attribute,
441
+ .cs-dashboard__content-item.is-header:hover .cs-dashboard__content-item-attribute,
442
+ .cs-dashboard__content-item.is-header.is-selected .cs-dashboard__content-item-attribute,
443
+ .cs-dashboard__content-item.is-header.is-selected:hover .cs-dashboard__content-item-attribute {
444
+ background-color: transparent;
445
+ color: #636d75;
446
+ font-weight: normal;
447
+ }
448
+
449
+ .cs-dashboard__content-item-attribute {
450
+ box-sizing: border-box;
451
+ display: table-cell;
452
+ height: 44px;
453
+ margin: 0;
454
+ max-width: 200px;
455
+ padding: 0 20px 0 0;
456
+ text-align: left;
457
+ transition: background-color .1s ease-out, opacity .1s ease-out;
458
+ vertical-align: middle;
459
+ white-space: nowrap;
460
+ }
461
+
462
+ .cs-dashboard__row {
463
+ display: table-row;
464
+ padding: 5px;
465
+ width: 100%;
466
+ }
467
+
468
+ .cs-dashboard__cell {
469
+ display: table-cell;
470
+ padding: 5px;
471
+ }
472
+
473
+ .cs-dashboard__content-item-attribute.is-checkbox {
474
+ padding: 0 2px;
475
+ }
476
+
477
+ .cs-dashboard__content-item-attribute.is-name {
478
+ overflow: hidden;
479
+ text-overflow: ellipsis;
480
+ white-space: nowrap;
481
+ width: 100%;
482
+ }
483
+
484
+ .cs-dashboard__content-item-attribute.is-type {
485
+ color: #636d75;
486
+ text-align: center;
487
+ }
488
+
489
+ .cs-dashboard__content-item-type-img {
490
+ vertical-align: middle;
491
+ }
492
+
493
+ .cs-dashboard__content-item-attribute.is-folder {
494
+ overflow: hidden;
495
+ text-overflow: ellipsis;
496
+ white-space: nowrap;
497
+ max-width: 120px;
498
+ }
499
+
500
+ .cs-dashboard__content-item-attribute.is-responses-total {
501
+ text-align: center;
502
+ }
503
+
504
+ .cs-dashboard__content-item-attribute.is-last-response {
505
+ display: none;
506
+ }
507
+
508
+ .cs-dashboard__content-item-attribute.is-name,
509
+ .cs-dashboard__content-item-attribute.is-responses-total,
510
+ .cs-dashboard__content-item-attribute.is-edit-action,
511
+ .cs-dashboard__content-item-attribute.is-results-action,
512
+ .cs-dashboard__content-item-attribute.is-share-action {
513
+ font-weight: bold;
514
+ }
515
+
516
+ .cs-dashboard__content-item-attribute.is-source {
517
+ overflow: hidden;
518
+ text-overflow: ellipsis;
519
+ white-space: nowrap;
520
+ }
521
+
522
+ .cs-dashboard__content-item-attribute.is-source a:hover {
523
+ color: #00bcf5;
524
+ }
525
+
526
+ .cs-dashboard__content-item-attribute.is-edit-action > *,
527
+ .cs-dashboard__content-item-attribute.is-results-action > *,
528
+ .cs-dashboard__content-item-attribute.is-share-action > *,
529
+ .cs-dashboard__content-item-attribute.is-star-action svg[data-prefix="far"],
530
+ .cs-dashboard__content-item-attribute.is-options > * {
531
+ opacity: 0;
532
+ transition: opacity .15s;
533
+ }
534
+
535
+ .cs-dashboard__content-item:hover .cs-dashboard__content-item-attribute.is-edit-action > *, .cs-dashboard__content-item.is-active .cs-dashboard__content-item-attribute.is-edit-action > *, .cs-dashboard__content-item:hover
536
+ .cs-dashboard__content-item-attribute.is-results-action > *, .cs-dashboard__content-item.is-active
537
+ .cs-dashboard__content-item-attribute.is-results-action > *, .cs-dashboard__content-item:hover
538
+ .cs-dashboard__content-item-attribute.is-share-action > *, .cs-dashboard__content-item.is-active
539
+ .cs-dashboard__content-item-attribute.is-share-action > *, .cs-dashboard__content-item:hover
540
+ .cs-dashboard__content-item-attribute.is-star-action svg[data-prefix="far"], .cs-dashboard__content-item.is-active
541
+ .cs-dashboard__content-item-attribute.is-star-action svg[data-prefix="far"], .cs-dashboard__content-item:hover
542
+ .cs-dashboard__content-item-attribute.is-options > *, .cs-dashboard__content-item.is-active
543
+ .cs-dashboard__content-item-attribute.is-options > * {
544
+ opacity: 1;
545
+ }
546
+
547
+ .cs-dashboard__content.is-archive .cs-dashboard__content-item-attribute.is-folder,
548
+ .cs-dashboard__content.is-archive .cs-dashboard__content-item-attribute.is-status,
549
+ .cs-dashboard__content.is-archive .cs-dashboard__content-item-attribute.is-results-action,
550
+ .cs-dashboard__content.is-archive .cs-dashboard__content-item-attribute.is-share-action,
551
+ .cs-dashboard__content.is-archive .cs-dashboard__content-item-attribute.is-star-action,
552
+ .cs-dashboard__content.is-archive .cs-dashboard__content-item-attribute.is-options {
553
+ display: none;
554
+ }
555
+
556
+ .cs-create-menu__dropdown .components-popover {
557
+ z-index: 99999;
558
+ }
559
+
560
+ .cs-create-menu__dropdown,
561
+ .cs-create-menu__dropdown-list {
562
+ width: 136px;
563
+ }
564
+
565
+ .cs-create-menu__dropdown .components-dropdown__content .components-popover__content>div {
566
+ padding: 8px 0;
567
+ }
568
+
569
+ .cs-create-menu__dropdown-toggle.components-button.is-primary,
570
+ .cs-create-menu__dropdown-toggle.components-button.is-primary:active,
571
+ .cs-create-menu__dropdown-toggle.components-button.is-primary:focus,
572
+ .cs-create-menu__dropdown-toggle.components-button.is-primary:focus:not(:disabled) {
573
+ width: 100%;
574
+ background-color: #c9356e;
575
+ color: white;
576
+ box-shadow: none;
577
+ justify-content: space-between;
578
+ align-items: center;
579
+ font-size: 14px;
580
+ line-height: inherit;
581
+ }
582
+
583
+ .cs-create-menu__dropdown-toggle.components-button.is-primary .dashicon {
584
+ font-size: 1em;
585
+ line-height: 1.5em;
586
+
587
+ margin: 0 -4px 0 14px;
588
+ transform: rotate(0);
589
+ transition: transform .15s cubic-bezier(.175,.885,.32,1.275);
590
+
591
+ }
592
+
593
+ .cs-create-menu__dropdown-toggle.components-button.is-primary.is-active,
594
+ .cs-create-menu__dropdown-toggle.components-button.is-primary:hover {
595
+ background-color: #ab235a;
596
+ }
597
+
598
+ .cs-create-menu__dropdown-toggle.components-button.is-primary.is-active .dashicon {
599
+ transform: rotate(180deg);
600
+ }
601
+
602
+ .cs-create-menu__item.components-button.is-secondary {
603
+ display: flex;
604
+ width: 100%;
605
+ outline: none;
606
+ border: none;
607
+ box-shadow: none;
608
+ color: unset;
609
+ }
610
+
611
+ .cs-create-menu__item-image-icon {
612
+ margin-right: 8px;
613
+ }
614
+
615
+ .cs-create-menu__modal .components-modal__header {
616
+ border-bottom: none;
617
+ height: 72px;
618
+ }
619
+
620
+ .cs-create-menu__modal .components-modal__header .components-modal__header-heading {
621
+ font-weight: 700;
622
+ font-size: 20px;
623
+ line-height: 28px;
624
+ }
625
+
626
+ .cs-create-menu__video {
627
+ max-height: 50vh;
628
+ min-width: 900px;
629
+ }
630
+
631
+ .cs-dashboard-switch {
632
+ display: flex;
633
+ }
634
+
635
+ .cs-dashboard-switch .components-button {
636
+ color: unset;
637
+ box-shadow: none;
638
+ border: 1px solid #bdbdbd;
639
+ padding: 3px 16px 5px;
640
+ height: auto;
641
+ display: block;
642
+ }
643
+
644
+ .cs-dashboard-switch .components-button:hover:not(:disabled) {
645
+ box-shadow: none;
646
+ }
647
+
648
+ .cs-dashboard-switch .components-button.is-current {
649
+ border: 1px solid #1e1e1e;
650
+ }
651
+
652
+ .cs-dashboard-switch.components-button-group .components-button.is-current + .components-button {
653
+ border-left: 1px solid #1e1e1e;
654
+ }
655
+
656
+ .cs-dashboard-switch__avatar {
657
+ border-radius: 50%;
658
+ margin-left: 6px;
659
+ vertical-align: middle;
660
+ }
661
+
662
+ .cs-dashboard-switch .components-popover__content {
663
+ padding: 12px;
664
+ min-width: 120px;
665
+ background: rgba( 0, 0, 0, 0.8 );
666
+ color: white;
667
+ }
668
+
669
+ .cs-dashboard-switch .components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:after {
670
+ border-right-color: rgba( 0, 0, 0, 0.8 );
671
+ }
672
+
673
+ .components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:before {
674
+ border-right-color: rgba( 0, 0, 0, 0.1 );
675
+ }
676
+
677
+ .cs-dashboard__modal-request .components-modal__header {
678
+ display: none;
679
+ }
680
+
681
+ .cs-dashboard__modal-request-body {
682
+ text-align: center;
683
+ line-height: 2.5em;
684
+ padding: 0 72px 48px;
685
+ font-size: 16px;
686
+ }
687
+
688
+ .cs-dashboard__modal-request-headline {
689
+ font-size: 20px;
690
+ font-weight: 700;
691
+ padding: 16px 0;
692
+ }
693
+
694
+ .cs-dashboard__modal-request-text {
695
+ line-height: 1.7em;
696
+ }
697
+
698
+ .cs-dashboard__modal-request-text.is-email {
699
+ font-weight: 700;
700
+ }
701
+
702
+
703
  /* NEW STYLES, 2.0+ ------------------------------------------------------------
704
  ---------------------------------------------------------------------------------------------------*/
705
+ /* abbr{
706
  font-size:11px;
707
  color: #b8b8b8;
708
  line-height: 20px;
776
  width:90px;
777
  }
778
 
 
 
 
 
779
  ul#answers li span.handle{
780
  background-color: #FFF;
781
  }
961
  }
962
 
963
  .hardbreak {
964
+ white-space: pre-wrap;
965
+ white-space: -moz-pre-wrap;
966
+ white-space: -pre-wrap;
967
+ white-space: -o-pre-wrap;
968
  word-wrap: break-word;
969
+ } */
970
 
971
 
972
  /* OLD STYLES, PRE-2.0 ------------------------------------------------------------
img/export-everywhere.png ADDED
Binary file
img/gif/poll-block-v1.1.gif ADDED
Binary file
img/item-icons/icon-block-applause.png ADDED
Binary file
img/item-icons/icon-block-feedback.png ADDED
Binary file
img/item-icons/icon-block-nps.png ADDED
Binary file
img/item-icons/icon-block-poll.png ADDED
Binary file
img/item-icons/icon-block-survey-embed.png ADDED
Binary file
img/item-icons/icon-block-voting.png ADDED
Binary file
img/svg/cs-logo.svg ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="138px" height="98px" viewBox="0 0 138 98" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
+ <!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
3
+ <desc>Created with Sketch.</desc>
4
+ <defs></defs>
5
+ <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
6
+ <g id="navigation">
7
+ <g id="logo">
8
+ <path d="M0.090015744,52.4738525 L0.090015744,13.3408025 C0.090015744,8.849401 0.22494434,6.04798869 0.494801532,4.84733869 C0.764975457,3.64668869 1.30468984,2.49049562 2.65429253,1.55658715 C4.22909295,0.400394077 6.29831482,0.000281769231 11.5171375,0.000281769231 C15.9260719,0.000281769231 18.3104439,0.622678692 19.525118,1.68995792 C20.7847683,2.80169408 21.5047042,4.93625254 21.5047042,8.00471946 L21.5047042,16.2758987 L18.2654677,17.5654625 L18.2654677,7.91580562 C18.2654677,5.69233331 17.9956105,4.58059715 17.140746,3.82451638 C16.3308577,3.06843562 14.8463264,2.846151 11.3822089,2.846151 C6.92829834,2.846151 5.80357664,3.20180638 4.85875973,3.86897331 C3.64408564,4.75842485 3.32925225,6.49255792 3.32925225,9.82776638 L3.32925225,55.4089487 C3.32925225,58.7441572 3.64408564,60.4782902 4.85875973,61.3677418 C5.80357664,62.0349087 7.82813904,62.3905641 11.3822089,62.3905641 C14.8463264,62.3905641 16.3308577,62.1682795 17.140746,61.4121987 C17.9956105,60.6561179 18.2654677,59.5443818 18.2654677,57.3209095 L18.2654677,47.0040856 L21.5047042,45.7145218 L21.5047042,57.2319956 C21.5047042,60.3449195 20.7847683,62.435021 19.525118,63.5467572 C18.3104439,64.6140364 15.9260719,65.2364333 11.5171375,65.2364333 C7.19815553,65.2364333 4.22909295,64.836321 2.65429253,63.7245848 C1.30468984,62.7462195 0.764975457,61.6344833 0.494801532,60.3893764 C0.22494434,59.2776402 0.090015744,56.6095987 0.090015744,52.4738525" id="Fill-1" fill="#4CCEE4"></path>
9
+ <path d="M38.9152124,24.9918663 L30.0073912,24.9918663 L30.0073912,3.02419785 L40.0849103,3.02419785 C42.2893775,3.02419785 43.818885,3.33539631 44.4938447,4.135934 C45.0785353,4.84724477 45.4836378,6.22572246 45.4836378,8.36028092 L45.4836378,20.1892663 C45.4836378,21.9678563 44.9436067,23.1685063 44.1340351,23.8801302 C43.2341944,24.6362109 41.434513,24.9918663 38.9152124,24.9918663 M47.688105,24.3691563 C48.2727956,23.5244748 48.7228743,22.145684 48.7228743,20.2337232 L48.7228743,7.60451323 C48.7228743,5.02507246 47.9579622,3.15756862 46.7882643,2.04583246 C45.528614,0.800412462 43.1892182,0.178015538 40.0399341,0.178015538 L26.7681547,0.178015538 L26.7681547,60.7452509 L30.0073912,59.4556871 L30.0073912,27.8380486 L40.4447199,27.8380486 C43.4140992,27.8380486 44.9436067,29.4832678 44.9436067,32.8629332 L44.9436067,53.7188655 L48.1828432,52.4293017 L48.1828432,32.1068525 C48.1828432,28.5938163 46.6533357,26.7263125 43.5490278,26.5037148 L43.5490278,26.4148009 C45.528614,26.1036025 46.9681691,25.4364355 47.688105,24.3691563" id="Fill-3" fill="#4CCEE4"></path>
10
+ <path d="M70.4973407,35.3532097 C70.4973407,38.3327628 70.2274835,40.0224389 69.147738,40.9563474 C68.1579449,41.801342 66.4931921,42.0236266 63.7490105,42.0236266 C61.0045122,42.0236266 59.3400761,41.801342 58.350283,40.9563474 C57.2705375,40.0224389 57.0006803,38.3327628 57.0006803,35.3532097 L57.0006803,9.51653662 C57.0006803,6.53729662 57.2705375,4.84730738 58.350283,3.91339892 C59.3400761,3.06840431 61.0045122,2.84611969 63.7490105,2.84611969 C66.4931921,2.84611969 68.1579449,3.06840431 69.147738,3.91339892 C70.2274835,4.84730738 70.4973407,6.53729662 70.4973407,9.51653662 L70.4973407,35.3532097 Z M71.6670386,1.82329738 C70.0026025,0.355905846 67.2581042,0.000250461538 63.7490105,0.000250461538 C60.2399168,0.000250461538 57.4954185,0.355905846 55.8309824,1.82329738 C54.3914274,3.02394738 53.7614438,5.02513508 53.7614438,8.31588662 L53.7614438,36.5538597 C53.7614438,39.8446112 54.3914274,41.8457989 55.8309824,43.0464489 C57.4954185,44.5138405 60.2399168,44.8694958 63.7490105,44.8694958 C67.2581042,44.8694958 70.0026025,44.5138405 71.6670386,43.0464489 C73.1065937,41.8457989 73.7365772,39.8446112 73.7365772,36.5538597 L73.7365772,8.31588662 C73.7365772,5.02513508 73.1065937,3.02394738 71.6670386,1.82329738 Z" id="Fill-5" fill="#4CCEE4"></path>
11
+ <polygon id="Fill-7" fill="#4CCEE4" points="86.198405 37.7100841 76.660917 0.178109462 80.0800583 0.178109462 88.3129198 33.0853118 96.4108527 0.178109462 101.49443 0.178109462 109.142601 25.7477279 116.070836 0.178109462 119.400025 0.178109462 111.751854 27.8378295 106.848181 29.7056464 99.0201057 3.11289254 90.8322204 35.8867241"></polygon>
12
+ <path d="M129.432504,17.6989272 L125.338403,17.6989272 L125.338403,3.02407262 L129.432504,3.02407262 C133.166479,3.02407262 134.336177,4.580378 134.336177,10.3613434 C134.336177,16.0978518 133.166479,17.6989272 129.432504,17.6989272 M128.712568,0.177890308 L122.054507,0.177890308 L122.054507,20.5451095 L128.712568,20.5451095 C135.955954,20.5451095 137.440485,17.6989272 137.440485,10.3613434 C137.440485,2.97961569 135.955954,0.177890308 128.712568,0.177890308" id="Fill-9" fill="#4CCEE4"></path>
13
+ <polygon id="Fill-11" fill="#384869" points="29.9703651 66.7666281 33.1646254 65.5215212 33.1646254 97.3745935 29.9703651 97.3745935"></polygon>
14
+ <path d="M103.178884,71.3498864 L107.992604,43.6901664 L112.761348,71.3498864 L103.178884,71.3498864 Z M109.842963,36.0385664 L106.271789,37.4505433 L95.2035268,97.5328225 L98.7161046,97.5378318 L102.684146,74.1960687 L113.256403,74.1960687 L117.374259,97.5378318 L120.894438,97.5378318 L109.842963,36.0385664 Z" id="Fill-13" fill="#384869"></path>
15
+ <polygon id="Fill-15" fill="#384869" points="129.659634 94.6870159 129.659634 39.0169298 129.659634 38.3112544 129.659634 28.3842113 126.330445 29.6737752 126.330445 38.3112544 126.330445 39.0169298 126.330445 97.5328852 137.534586 97.5328852 137.534586 94.6870159"></polygon>
16
+ <polygon id="Fill-18" fill="#384869" points="86.8322843 44.8254772 87.0704681 75.4359472 87.1892433 93.2443888 80.5292818 77.9681134 70.1131743 51.5459865 65.1645255 53.5024042 65.1645255 77.9681134 65.1645255 78.1262172 65.1645255 97.4800065 68.403762 97.4800065 68.403762 78.1262172 68.403762 77.9681134 68.403762 55.8151034 76.9273851 77.9681134 85.4038149 97.4800065 90.0461821 97.4800065 90.0461821 75.4359472 90.0461821 43.7666511"></polygon>
17
+ <path d="M17.6635785,84.6711529 L17.6635785,84.6702137 C16.8255009,84.6699006 15.9883735,84.6699006 15.1515628,84.6699006 L15.1515628,84.6695875 C11.1651513,84.6695875 11.0204039,84.6695875 10.8766068,84.6695875 C9.56501214,84.6695875 8.37440982,84.6689614 7.09987303,84.6689614 C4.09628647,84.6620737 2.9690309,84.4689052 2.9690309,81.2899222 C2.9690309,78.7715314 3.84670024,78.3028552 7.09987303,78.269356 C8.49571886,78.2687298 9.89219815,78.2677906 14.8313449,78.2674775 C15.7644427,78.2668514 16.7057755,78.2668514 17.6635785,78.2665383 C20.9047154,78.2753045 21.7516616,79.1237429 21.7516616,81.5566637 L21.7516616,81.9126322 L24.450867,80.8453529 C24.185444,77.0878037 22.8304569,75.5646845 17.6635785,75.5120875 L17.6635785,75.5105222 C16.7108433,75.5102091 15.7843969,75.5092698 14.8313449,75.5089568 C11.1648345,75.5089568 11.0223043,75.5089568 10.8766068,75.5089568 C9.58496637,75.5089568 8.33260096,75.509896 7.05521357,75.5105222 L7.05521357,75.5108352 C2.4815776,75.5484045 -3.16733793e-05,76.7114852 -3.16733793e-05,82.0460029 C-3.16733793e-05,87.3767637 3.50399428,87.4274822 7.05521357,87.426856 L14.6713944,87.426856 L15.1515628,87.426856 C15.9814053,87.426856 16.7415664,87.4277952 17.5565225,87.4281083 C20.6145873,87.4428229 21.9315664,88.0057352 21.9315664,91.2952345 C21.9315664,93.9579537 21.249005,94.7102775 17.5565225,94.7591175 C16.583833,94.7597437 15.6301475,94.7606829 14.6713944,94.7613091 C9.86971005,94.7625614 8.502687,94.7635006 7.05521357,94.7638137 L7.05521357,94.7641268 C3.77733554,94.7622483 2.69917371,93.6943429 2.69917371,90.8062083 L2.69917371,90.4505529 L-3.16733793e-05,91.5178322 C0.266024713,95.7240206 1.84557614,97.4678591 7.05521357,97.5182645 L7.05521357,97.5192037 C8.33608503,97.5198298 9.57451416,97.5210822 10.8766068,97.5210822 C11.0219876,97.5210822 11.1648345,97.5210822 14.9916122,97.5210822 L14.9916122,97.5207691 C15.8867019,97.520456 16.7678553,97.5198298 17.6635785,97.5195168 L17.6635785,97.5176383 C22.642317,97.4612845 24.9009457,95.8661575 24.9009457,90.5394668 C24.9009457,85.2074537 21.2242998,84.6933814 17.6635785,84.6711529" id="Fill-20" fill="#384869"></path>
18
+ <path d="M59.0407944,67.9768895 L59.0407944,66.5968465 C59.0407944,62.4567172 56.728321,61.2923842 51.6672317,61.2923842 C51.4854265,61.2923842 51.3071054,61.2942626 51.1303679,61.2967672 C50.3904778,61.2980195 49.6616733,61.3005242 48.9360362,61.3030288 L48.9360362,61.3033418 C46.0642109,61.3033418 45.9862944,61.3036549 45.9112285,61.303968 C41.6299378,61.4147972 38.9852106,62.4567172 38.9852106,67.5886742 L38.9852106,70.9714703 L38.9852106,82.0315388 L38.9852106,88.8663211 L38.9852106,89.2088272 L38.9852106,91.6990411 C38.9852106,95.3551534 40.569513,97.3672988 45.9112285,97.5103749 C45.9866111,97.5103749 46.0638941,97.510688 48.9360362,97.5110011 C49.6600896,97.5138188 50.3831929,97.5169495 51.1303679,97.5182018 C51.221904,97.5191411 51.3118564,97.5210195 51.4056096,97.5210195 C56.379597,97.5210195 59.0407944,96.4863003 59.0407944,91.4836442 L59.0407944,86.4703434 L59.0407944,86.1278372 L59.0407944,82.0315388 L59.0407944,81.8781311 L59.0407944,77.6234157 L51.2310892,77.6234157 L51.2310892,80.3835018 L55.8994286,80.3835018 L55.8994286,81.8781311 L55.8994286,82.0315388 L55.8994286,84.1801857 L55.8994286,86.1278372 L55.8994286,86.4703434 L55.8994286,91.1815249 C55.8994286,94.2866218 54.9834345,94.7612465 51.4927114,94.7612465 C51.366968,94.7612465 51.2500933,94.7587418 51.1303679,94.7571765 C50.4253185,94.7556111 49.7592273,94.7524803 49.0912357,94.7490365 L49.0912357,94.7484103 C46.0645276,94.7480972 45.9881948,94.7477842 45.9112285,94.7474711 C43.1774991,94.6594965 42.1265764,93.9613349 42.1265764,90.5779126 L42.1265764,89.2088272 L42.1265764,88.8663211 L42.1265764,84.1801857 L42.1265764,82.0315388 L42.1265764,70.9714703 L42.1265764,68.2786957 C42.1265764,64.869288 42.7309044,64.1598557 45.9112285,64.0671849 C45.9885115,64.0668718 46.0645276,64.0665588 49.0912357,64.0662457 L49.0912357,64.0656195 C49.7582771,64.0624888 50.4164499,64.059358 51.1303679,64.0577926 C51.3045715,64.0549749 51.4787751,64.0524703 51.6672317,64.0524703 C54.6340771,64.0524703 56.1613675,64.2249757 56.1613675,66.6832557 L56.1613675,69.0548134 L59.0407944,67.9768895 Z" id="Fill-23" fill="#384869"></path>
19
+ </g>
20
+ </g>
21
+ </g>
22
+ </svg>
img/svg/cs-logo2.svg ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="150px" height="150px" viewBox="0 0 150 150" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 56.3 (81716) - https://sketch.com -->
4
+ <title>CSLogoDots</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="Artboard-Copy-13">
8
+ <g id="CSLogoDots">
9
+ <circle id="Oval" fill="#FFFFFF" cx="75" cy="75" r="75"></circle>
10
+ <path d="M75.5244755,141.608392 C112.021615,141.608392 141.608392,112.021615 141.608392,75.5244755 C141.608392,39.0273365 112.021615,9.44055944 75.5244755,9.44055944 C39.0273365,9.44055944 9.44055944,39.0273365 9.44055944,75.5244755 C9.44055944,112.021615 39.0273365,141.608392 75.5244755,141.608392 Z" id="Oval" stroke="#384869" stroke-width="4" fill="#FFFFFF" stroke-linecap="round" stroke-dasharray="0,9.020000457763672"></path>
11
+ <g id="logo" transform="translate(34.615385, 46.153846)">
12
+ <g>
13
+ <path d="M0,31.647307 L0,8.0457943 C0,5.33698754 0.0814889748,3.64742927 0.244466924,2.92330589 C0.407636163,2.19918252 0.733592062,1.50187153 1.5486731,0.938622503 C2.49976038,0.241311519 3.74944928,0 6.90131275,0 C9.56405109,0 11.0040722,0.375373473 11.7376643,1.01905968 C12.4984193,1.68955827 12.9332185,2.97693068 12.9332185,4.82755211 L12.9332185,9.81597857 L10.9769092,10.5937267 L10.9769092,4.77392733 C10.9769092,3.43293014 10.8139313,2.76243155 10.2976431,2.30643208 C9.80851801,1.85043262 8.911948,1.71637066 6.81982378,1.71637066 C4.12992246,1.71637066 3.45065638,1.93086979 2.88004226,2.33324447 C2.1464502,2.86968111 1.95630926,3.91555318 1.95630926,5.92704896 L1.95630926,33.4174913 C1.95630926,35.4289871 2.1464502,36.4748591 2.88004226,37.0112958 C3.45065638,37.4136705 4.67337358,37.6281696 6.81982378,37.6281696 C8.911948,37.6281696 9.80851801,37.4941076 10.2976431,37.0381082 C10.8139313,36.5821087 10.9769092,35.9116101 10.9769092,34.5706129 L10.9769092,28.3484389 L12.9332185,27.5706907 L12.9332185,34.5169881 C12.9332185,36.394422 12.4984193,37.654982 11.7376643,38.3254806 C11.0040722,38.9691668 9.56405109,39.3445403 6.90131275,39.3445403 C4.29290041,39.3445403 2.49976038,39.1032287 1.5486731,38.4327301 C0.733592062,37.8426687 0.407636163,37.1721701 0.244466924,36.4212344 C0.0814889748,35.7507358 0,34.1416147 0,31.647307" id="Fill-1" fill="#4CCEE4"></path>
14
+ <path d="M23.2106918,15.0200739 L17.9632188,15.0200739 L17.9632188,1.72282283 L23.8997445,1.72282283 C25.1983653,1.72282283 26.0993768,1.9111944 26.4969861,2.39576793 C26.8414191,2.82633151 27.0800594,3.66073795 27.0800594,4.9528077 L27.0800594,12.1130118 C27.0800594,13.1896102 26.7619346,13.9163758 26.2850273,14.3471288 C25.7549437,14.8047922 24.6947765,15.0200739 23.2106918,15.0200739 M28.3786802,14.6431413 C28.7231132,14.1318471 28.9882483,13.2972511 28.9882483,12.139922 L28.9882483,4.4953339 C28.9882483,2.9339724 28.5376493,1.80355351 27.8485966,1.13060841 C27.1065542,0.37674313 25.7284489,0 23.8732496,0 L16.0550298,0 L16.0550298,36.661958 L17.9632188,35.881372 L17.9632188,16.7428968 L24.1117033,16.7428968 C25.8609231,16.7428968 26.7619346,17.7387646 26.7619346,19.7845101 L26.7619346,32.4088161 L28.6701235,31.6282301 L28.6701235,19.3268468 C28.6701235,17.2003706 27.7691121,16.0699517 25.9404077,15.9352111 L25.9404077,15.8813906 C27.1065542,15.693019 27.954576,15.2891762 28.3786802,14.6431413" id="Fill-3" fill="#4CCEE4"></path>
15
+ <path d="M42.1986778,21.1363533 C42.1986778,22.9177286 42.0360044,23.9279295 41.3851196,24.4862822 C40.7884594,24.9914762 39.7849245,25.1243728 38.1306959,25.1243728 C36.4762763,25.1243728 35.4729324,24.9914762 34.8762721,24.4862822 C34.2253874,23.9279295 34.0627139,22.9177286 34.0627139,21.1363533 L34.0627139,5.68946959 C34.0627139,3.90828152 34.2253874,2.89789341 34.8762721,2.33954074 C35.4729324,1.83434669 36.4762763,1.70145014 38.1306959,1.70145014 C39.7849245,1.70145014 40.7884594,1.83434669 41.3851196,2.33954074 C42.0360044,2.89789341 42.1986778,3.90828152 42.1986778,5.68946959 L42.1986778,21.1363533 Z M42.9037871,1.08993885 C41.9004432,0.212634473 40.2460236,0 38.1306959,0 C36.0153682,0 34.3609486,0.212634473 33.3576047,1.08993885 C32.489822,1.80776738 32.1100597,3.00421065 32.1100597,4.97164106 L32.1100597,21.8541818 C32.1100597,23.8216123 32.489822,25.0180555 33.3576047,25.7358841 C34.3609486,26.6131884 36.0153682,26.8258229 38.1306959,26.8258229 C40.2460236,26.8258229 41.9004432,26.6131884 42.9037871,25.7358841 C43.7715698,25.0180555 44.1513321,23.8216123 44.1513321,21.8541818 L44.1513321,4.97164106 C44.1513321,3.00421065 43.7715698,1.80776738 42.9037871,1.08993885 L42.9037871,1.08993885 Z" id="Fill-5" fill="#4CCEE4"></path>
16
+ <polygon id="Fill-7" fill="#4CCEE4" points="51.6079531 22.8019495 45.9352243 0 47.9688689 0 52.865629 19.9922432 57.682136 0 60.7057577 0 65.2547543 15.5344118 69.3755456 0 71.3556882 0 66.8066917 16.8042194 63.8900741 17.9389817 59.2340734 1.78298041 54.3640644 21.6941963"></polygon>
17
+ <path d="M77.1845891,10.3846923 L74.6925126,10.3846923 L74.6925126,1.68692799 L77.1845891,1.68692799 C79.457457,1.68692799 80.1694513,2.60934786 80.1694513,6.03571737 C80.1694513,9.43573734 79.457457,10.3846923 77.1845891,10.3846923 M76.7463646,0 L72.6936074,0 L72.6936074,12.0716203 L76.7463646,12.0716203 C81.1554082,12.0716203 82.0590414,10.3846923 82.0590414,6.03571737 C82.0590414,1.66057844 81.1554082,0 76.7463646,0" id="Fill-9" fill="#4CCEE4"></path>
18
+ <polygon id="Fill-11" fill="#384869" points="17.8389221 40.0960344 19.6228143 39.3445403 19.6228143 58.5697133 17.8389221 58.5697133"></polygon>
19
+ <path d="M61.7917018,42.7677375 L64.6328171,26.0776833 L67.4473869,42.7677375 L61.7917018,42.7677375 Z M65.724921,21.4606583 L63.6171716,22.3126543 L57.0845506,58.5666907 L59.157716,58.5697133 L61.4997014,44.4851423 L67.7395743,44.4851423 L70.1699823,58.5697133 L72.2476343,58.5697133 L65.724921,21.4606583 Z" id="Fill-13" fill="#384869"></path>
20
+ <polygon id="Fill-15" fill="#384869" points="77.3571864 56.858454 77.3571864 23.3832841 77.3571864 22.9589521 77.3571864 16.9896878 75.3694457 17.7651199 75.3694457 22.9589521 75.3694457 23.3832841 75.3694457 58.5697133 82.0590414 58.5697133 82.0590414 56.858454"></polygon>
21
+ <polygon id="Fill-18" fill="#384869" points="52.0617689 27.0132917 52.2026509 45.3584732 52.2729046 56.0312624 48.3336415 46.8760275 42.1726769 31.0409646 39.2456285 32.2134666 39.2456285 46.8760275 39.2456285 46.9707808 39.2456285 58.5697133 41.1615862 58.5697133 41.1615862 46.9707808 41.1615862 46.8760275 41.1615862 33.599492 46.203176 46.8760275 51.2168516 58.5697133 53.9627392 58.5697133 53.9627392 45.3584732 53.9627392 26.3787259"></polygon>
22
+ <path d="M10.4396427,51.1868094 L10.4396427,51.1862371 C9.94431751,51.1860463 9.44955393,51.1860463 8.95497754,51.1860463 L8.95497754,51.1858556 C6.59890698,51.1858556 6.51335762,51.1858556 6.42836985,51.1858556 C5.65318408,51.1858556 4.94950783,51.185474 4.19622419,51.185474 C2.42102817,51.1812771 1.75479147,51.0635714 1.75479147,49.1264837 C1.75479147,47.5919225 2.27351636,47.3063385 4.19622419,47.285926 C5.02120456,47.2855445 5.84655933,47.2849721 8.76572064,47.2847814 C9.31720514,47.2843998 9.87355677,47.2843998 10.4396427,47.2842091 L10.4396427,47.2842091 C12.355237,47.2895506 12.8558037,47.8065398 12.8558037,49.2890205 L12.8558037,49.505927 L14.4511027,48.855589 C14.294231,46.5659566 13.4933992,45.6378562 10.4396427,45.6058066 L10.4396427,45.6048528 C9.87655194,45.604662 9.32899859,45.6040897 8.76572064,45.6038989 L8.76572064,45.6038989 C6.59871978,45.6038989 6.51448081,45.6038989 6.42836985,45.6038989 C5.66497753,45.6038989 4.92479773,45.6044712 4.16982931,45.6048528 L4.16982931,45.6050436 C1.46669417,45.6279361 0,46.33665 0,49.5871954 C0,52.8354516 2.07096842,52.8663565 4.16982931,52.8659749 L8.67118579,52.8659749 L8.95497754,52.8659749 C9.44543558,52.8659749 9.89471012,52.8665472 10.3763699,52.866738 L10.3763699,52.866738 C12.1837639,52.8757042 12.962132,53.2187103 12.962132,55.2231402 C12.962132,56.8456467 12.5587209,57.3040692 10.3763699,57.3338295 L10.3763699,57.3338295 C9.80148565,57.334211 9.2378333,57.3347833 8.67118579,57.3351649 L8.67118579,57.3351649 C5.83326829,57.335928 5.02532291,57.3365003 4.16982931,57.336691 L4.16982931,57.3368818 C2.23252006,57.3357372 1.59529901,56.6850176 1.59529901,54.9251561 L1.59529901,54.7084403 L0,55.3587783 C0.157246088,57.9217854 1.09080114,58.9843793 4.16982931,59.0150935 L4.16982931,59.0156658 C4.92685691,59.0160473 5.65880001,59.0168104 6.42836985,59.0168104 C6.51429361,59.0168104 6.59871978,59.0168104 8.86044269,59.0168104 L8.86044269,59.0166196 C9.38946346,59.0164288 9.91024753,59.0160473 10.4396427,59.0158565 L10.4396427,59.0147119 C13.3822037,58.9803731 14.7171107,58.0083954 14.7171107,54.7626192 C14.7171107,51.5136 12.5441195,51.2003542 10.4396427,51.1868094" id="Fill-20" fill="#384869"></path>
23
+ <path d="M35.2318711,40.7041336 L35.2318711,39.8696102 C35.2318711,37.3660398 33.8434736,36.661958 30.8048208,36.661958 C30.6956659,36.661958 30.5886028,36.6630939 30.4824905,36.6646085 C30.0382641,36.6653657 29.6006936,36.6668803 29.1650247,36.6683949 L29.1650247,36.6685842 C27.4407951,36.6685842 27.3940144,36.6687735 27.3489452,36.6689628 C24.7784797,36.7359822 23.1905987,37.3660398 23.1905987,40.4693766 L23.1905987,42.5149814 L23.1905987,49.2030962 L23.1905987,53.3361456 L23.1905987,53.5432619 L23.1905987,55.0491148 C23.1905987,57.2599962 24.1418059,58.4767571 27.3489452,58.5632765 C27.3942046,58.5632765 27.4406049,58.5634658 29.1650247,58.5636551 L29.1650247,58.5636551 C29.5997427,58.565359 30.0338903,58.5672522 30.4824905,58.5680095 C30.5374483,58.5685774 30.5914552,58.5697133 30.6477442,58.5697133 C33.6341015,58.5697133 35.2318711,57.9440101 35.2318711,54.9188625 L35.2318711,51.8872781 L35.2318711,51.6801618 L35.2318711,49.2030962 L35.2318711,49.1103293 L35.2318711,46.5374678 L30.5429631,46.5374678 L30.5429631,48.2065147 L33.3458107,48.2065147 L33.3458107,49.1103293 L33.3458107,49.2030962 L33.3458107,50.5024008 L33.3458107,51.6801618 L33.3458107,51.8872781 L33.3458107,54.7361685 C33.3458107,56.6138463 32.7958524,56.9008557 30.7000397,56.9008557 C30.624544,56.9008557 30.554373,56.8993412 30.4824905,56.8983946 C30.0591823,56.897448 29.6592645,56.8955548 29.2582057,56.8934723 L29.2582057,56.8930936 C27.4409853,56.8929043 27.3951554,56.892715 27.3489452,56.8925257 C25.7076277,56.8393267 25.076659,56.4171426 25.076659,54.3711592 L25.076659,53.5432619 L25.076659,53.3361456 L25.076659,50.5024008 L25.076659,49.2030962 L25.076659,42.5149814 L25.076659,40.8866383 C25.076659,38.8249413 25.4394945,38.3959417 27.3489452,38.3399029 C27.3953456,38.3397136 27.4409853,38.3395243 29.2582057,38.339335 L29.2582057,38.3389563 C29.658694,38.3370631 30.0538577,38.3351699 30.4824905,38.3342233 C30.5870814,38.3325194 30.6916724,38.3310049 30.8048208,38.3310049 C32.5861,38.3310049 33.5030775,38.4353203 33.5030775,39.9218626 L33.5030775,41.3559631 L35.2318711,40.7041336 Z" id="Fill-23" fill="#384869"></path>
24
+ </g>
25
+ </g>
26
+ </g>
27
+ </g>
28
+ </g>
29
+ </svg>
img/svg/cs-polls.svg ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="266px" height="189px" viewBox="0 0 266 189" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 53.2 (72643) - https://sketchapp.com -->
4
+ <title>Illustration 1</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="253 158 253 160 2 160 2 158 253 158"></polygon>
8
+ </defs>
9
+ <g id="Flow" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="Landingpage" transform="translate(-1021.000000, -182.000000)">
11
+ <g id="Tab-head" transform="translate(352.000000, 83.000000)">
12
+ <g id="Illustration-1" transform="translate(669.000000, 99.000000)">
13
+ <g id="Group-2" transform="translate(-0.000000, 0.000000)">
14
+ <g id="Group-5">
15
+ <path d="M41.7541,30.4054 L41.7541,19.2184 L41.7541,11.7724 C41.7541,5.2704 47.0251,0.0004 53.5261,0.0004 L227.6941,0.0004 C234.1961,0.0004 239.4671,5.2704 239.4671,11.7724 L239.4671,30.4054 L41.7541,30.4054 Z" id="Fill-1" fill="#6E93AD"></path>
16
+ <polyline id="Fill-3" fill="#E1E2E2" points="41.8215 172.8185 41.8215 30.4055 239.4675 30.4055 239.4675 171.908501 91.5075 171.2255"></polyline>
17
+ <polygon id="Fill-18" fill="#07A8DC" points="172 140.118606 182.865599 140.118606 182.865599 133.795697 172 133.795697"></polygon>
18
+ <polygon id="Fill-20" fill="#07A8DC" points="188.368006 130.489304 199.233605 130.489304 199.233605 115.514938 188.368006 115.514938"></polygon>
19
+ <polygon id="Fill-21" fill="#07A8DC" points="204.736013 123.740831 215.601611 123.740831 215.601611 108 204.736013 108"></polygon>
20
+ <polygon id="Fill-22" fill="#005082" points="172 147.815768 182.865599 147.815768 182.865599 140.118606 172 140.118606"></polygon>
21
+ <polygon id="Fill-23" fill="#005082" points="188.368006 147.815768 199.233605 147.815768 199.233605 130.489865 188.368006 130.489865"></polygon>
22
+ <polygon id="Fill-24" fill="#005082" points="204.736013 147.815768 215.601611 147.815768 215.601611 123.740831 204.736013 123.740831"></polygon>
23
+ <path d="M214.840544,63.0728361 C214.669161,62.9459743 214.433083,62.9890595 214.312206,63.1691793 C213.384353,64.5568802 212.500196,65.9745013 211.614337,67.3903272 C210.748908,68.8199164 209.870994,70.2411279 209.025427,71.6832836 C208.1844,73.1296282 207.319538,74.558619 206.499508,76.0181284 C205.667561,77.4698586 204.844694,78.9275728 204.049066,80.4032392 C203.953727,80.5809654 204.000262,80.8107529 204.163133,80.9292371 C204.335084,81.0543037 204.571161,81.0094233 204.689768,80.8275082 C205.605137,79.4308313 206.492698,78.0162022 207.37118,76.5955891 C208.261579,75.1827552 209.106578,73.7400011 209.977115,72.3134039 C210.841977,70.8838147 211.674491,69.4320845 212.518923,67.9893304 C213.344061,66.5334114 214.170333,65.0780908 214.952908,63.5934484 C215.044842,63.4175173 214.999442,63.1913203 214.840544,63.0728361" id="Fill-25" fill="#00AADC"></path>
24
+ <path d="M195.452568,81.9484987 C195.599001,82.0398554 195.785772,82.0091902 195.902919,81.8603363 C196.041064,81.6852892 196.030565,81.4144134 195.879158,81.2546989 C194.917119,80.2376371 193.878825,79.3451525 192.82119,78.483972 C191.760793,77.6272635 190.684371,76.797387 189.553243,76.0556729 C189.403494,75.9572888 189.210092,75.9905094 189.09184,76.1457519 C188.957011,76.3233544 188.972483,76.5942302 189.1261,76.7501115 C190.103611,77.7416191 191.135827,78.6443253 192.184068,79.5201996 C193.235071,80.3922407 194.305968,81.2317 195.452568,81.9484987" id="Fill-26" fill="#00AADC"></path>
25
+ <path d="M180.852912,77.093523 C180.681075,76.9494528 180.426925,76.9745885 180.28573,77.149925 C179.772623,77.7868994 179.30578,78.454527 178.837735,79.1209285 C178.378702,79.7940737 177.928682,80.4721234 177.502695,81.1667259 C177.081514,81.8643937 176.634498,82.5448957 176.234347,83.256664 C175.822179,83.9604625 175.420225,84.6703916 175.045909,85.3993257 C174.957588,85.5709838 174.998444,85.7880088 175.153458,85.9118479 C175.327698,86.0522397 175.580646,86.0215865 175.718236,85.8437977 C176.217524,85.1976273 176.687972,84.533065 177.149408,83.861759 C177.62286,83.1984228 178.048847,82.5044334 178.50067,81.8269968 C178.948287,81.1464948 179.37127,80.4500531 179.786442,79.7480938 C180.190799,79.0400039 180.59756,78.3325271 180.958056,77.594397 C181.039769,77.4264173 181.000715,77.2173621 180.852912,77.093523" id="Fill-27" fill="#00AADC"></path>
26
+ <path d="M218.856228,56.6435792 C217.554688,55.6182293 215.668586,55.8421377 214.64318,57.1436054 C213.618312,58.4450731 213.842233,60.3316092 215.143772,61.3564208 C216.445312,62.3817707 218.330875,62.1578623 219.35682,60.8563946 C220.381688,59.5549269 220.157767,57.668929 218.856228,56.6435792" id="Fill-28" fill="#78DCFA"></path>
27
+ <path d="M201.856496,82.6434305 C200.554885,81.6180522 198.668679,81.8425051 197.643215,83.1434706 C196.618291,84.4449745 196.842224,86.3315629 198.143835,87.356403 C199.445447,88.3817813 201.331114,88.1578667 202.356577,86.8563628 C203.381502,85.554859 203.158107,83.6688088 201.856496,82.6434305" id="Fill-29" fill="#78DCFA"></path>
28
+ <path d="M181.643579,71.1436883 C180.618229,72.4452503 180.842138,74.3313847 182.143605,75.3568089 C183.445073,76.3816948 185.331609,76.1577701 186.356421,74.8562081 C187.381771,73.5546461 187.157862,71.6690499 185.856395,70.6436258 C184.554927,69.6182016 182.668929,69.8421263 181.643579,71.1436883" id="Fill-30" fill="#78DCFA"></path>
29
+ <path d="M173.856312,87.6435792 C172.55475,86.6182293 170.668615,86.8421377 169.643191,88.1436054 C168.618305,89.4450731 168.84223,91.331071 170.143792,92.3564208 C171.445354,93.3817707 173.331488,93.1578623 174.356374,91.8563946 C175.381798,90.5549269 175.157874,88.668929 173.856312,87.6435792" id="Fill-31" fill="#78DCFA"></path>
30
+ <mask id="mask-2" fill="white">
31
+ <use xlink:href="#path-1"></use>
32
+ </mask>
33
+ <g id="Clip-2"></g>
34
+ <path d="M0.314098448,171.822802 C22.4017178,171.335837 44.4877023,171.233319 66.5753217,171.111357 L132.836545,171 C177.011784,171.106054 221.185387,171.045957 265.362261,171.646929 C265.723549,171.651348 266.008002,171.81308 265.999828,172.00928 C265.990019,172.197525 265.707201,172.348652 265.362261,172.353955 C221.185387,172.954043 177.011784,172.893062 132.836545,173 L66.5753217,172.88776 C44.4877023,172.765798 22.4017178,172.663279 0.314098448,172.176315 C0.134271778,172.172779 -0.00631998113,172.090588 0.000219170476,171.992488 C0.00839310998,171.900574 0.144080506,171.827221 0.314098448,171.822802" id="Fill-1" fill="#E9EFF4"></path>
35
+ <polyline id="Fill-7" fill="#FFFFFF" points="143.8976 153.5011 60.1096 153.5011 60.1096 49.6141 152.3826 49.6141 152.3826 153.5011"></polyline>
36
+ <path d="M121.148,143.152 L70,143.152 L70,133.152 L121.419,133.152 L121.419,142.945948 C121.419,143.059238 121.298,143.152 121.148,143.152" id="Fill-5" fill="#1E4B69"></path>
37
+ <path d="M66.9797,15.5148 C66.9797,17.1418 65.6617,18.4588 64.0357,18.4588 C62.4097,18.4588 61.0907,17.1418 61.0907,15.5148 C61.0907,13.8888 62.4097,12.5718 64.0357,12.5718 C65.6617,12.5718 66.9797,13.8888 66.9797,15.5148" id="Fill-9" fill="#FFFFFF"></path>
38
+ <path d="M82.4084,15.5148 C82.4084,17.1418 81.0904,18.4588 79.4644,18.4588 C77.8384,18.4588 76.5194,17.1418 76.5194,15.5148 C76.5194,13.8888 77.8384,12.5718 79.4644,12.5718 C81.0904,12.5718 82.4084,13.8888 82.4084,15.5148" id="Fill-11" fill="#E1E2E2"></path>
39
+ <path d="M97.8381,15.5148 C97.8381,17.1418 96.5201,18.4588 94.8941,18.4588 C93.2681,18.4588 91.9491,17.1418 91.9491,15.5148 C91.9491,13.8888 93.2681,12.5718 94.8941,12.5718 C96.5201,12.5718 97.8381,13.8888 97.8381,15.5148" id="Fill-13" fill="#E1E2E2"></path>
40
+ <path d="M247.6926,29.8624 L35.2216,30.9494" id="Fill-15" fill="#DDF8FF"></path>
41
+ <polygon id="Clip-18" points="247.694 31.7580865 247.694 29.0541116 35.2205 29.0541116 35.2205 31.7580865 247.694 31.7580865"></polygon>
42
+ <path d="M247.6945,30.1124 C229.9925,30.9624 212.2865,31.0474 194.5805,31.1804 L141.4645,31.5874 L88.3445,31.7234 C70.6385,31.7714 52.9325,31.8694 35.2225,31.1994 L35.2205,30.6994 C52.9235,29.8484 70.6295,29.7644 88.3345,29.6314 L141.4515,29.2244 L194.5695,29.0884 C212.2765,29.0404 229.9815,28.9444 247.6915,29.6124 L247.6945,30.1124 Z" id="Fill-17" fill="#004F81"></path>
43
+ <path d="M125.4816,68.7989 L69.9906,68.7989 L69.9906,61.9879 L119.2976,61.9879 C122.7126,61.9879 125.4816,64.7569 125.4816,68.1719 L125.4816,68.7989 Z" id="Fill-28" fill="#6E93AD"></path>
44
+ <path d="M79.9904,80.7149 C83.0094,80.5909 86.0264,80.5229 89.0444,80.4749 C92.0624,80.4019 95.0804,80.4219 98.0984,80.3919 C101.1164,80.3709 104.1344,80.4189 107.1524,80.4409 C110.1704,80.5029 113.1874,80.5639 116.2064,80.7149 C116.5744,80.7339 116.8574,81.0469 116.8394,81.4149 C116.8214,81.7599 116.5434,82.0299 116.2064,82.0479 C113.1874,82.1989 110.1704,82.2599 107.1524,82.3219 C104.1344,82.3439 101.1164,82.3919 98.0984,82.3709 C95.0804,82.3409 92.0624,82.3609 89.0444,82.2879 C86.0264,82.2399 83.0094,82.1719 79.9904,82.0479 C79.6224,82.0329 79.3364,81.7219 79.3514,81.3539 C79.3654,81.0049 79.6484,80.7299 79.9904,80.7149" id="Fill-30" fill="#74DCFC"></path>
45
+ <path d="M80.7179,92.17 C83.0079,92.046 85.2969,91.979 87.5859,91.93 C89.8759,91.857 92.1649,91.878 94.4539,91.847 C96.7439,91.827 99.0329,91.874 101.3229,91.896 C103.6129,91.959 105.9019,92.019 108.1919,92.17 C108.5599,92.194 108.8379,92.513 108.8139,92.881 C108.7909,93.22 108.5209,93.482 108.1919,93.504 C105.9019,93.655 103.6129,93.715 101.3229,93.777 C99.0329,93.8 96.7439,93.847 94.4539,93.827 C92.1649,93.796 89.8759,93.817 87.5859,93.744 C85.2969,93.695 83.0079,93.628 80.7179,93.504 C80.3499,93.483 80.0679,93.169 80.0879,92.801 C80.1069,92.458 80.3839,92.19 80.7179,92.17" id="Fill-32" fill="#74DCFC"></path>
46
+ <path d="M75,84 L70,84 L70,80.5294451 C70,79.6843747 70.6844394,79 71.5295897,79 L75,79 L75,84 Z" id="Fill-22" fill="#1E4B69"></path>
47
+ <path d="M75,106 L70,106 L70,102.529445 C70,101.684375 70.6843747,101 71.5294451,101 L75,101 L75,106 Z" id="Fill-24" fill="#74DCFC"></path>
48
+ <path d="M75,118 L70,118 L70,114.529445 C70,113.684375 70.6843747,113 71.5294451,113 L75,113 L75,118 Z" id="Fill-24-Copy" fill="#74DCFC"></path>
49
+ <path d="M75,95 L70,95 L70,91.5294451 C70,90.6843747 70.6848473,90 71.5299178,90 L75,90 L75,95 Z" id="Fill-26" fill="#00A9DE"></path>
50
+ <path d="M80.7179,115.17 C83.0079,115.046 85.2969,114.979 87.5859,114.93 C89.8759,114.857 92.1649,114.878 94.4539,114.847 C96.7439,114.827 99.0329,114.874 101.3229,114.896 C103.6129,114.959 105.9019,115.019 108.1919,115.17 C108.5599,115.194 108.8379,115.513 108.8139,115.881 C108.7909,116.22 108.5209,116.482 108.1919,116.504 C105.9019,116.655 103.6129,116.715 101.3229,116.777 C99.0329,116.8 96.7439,116.847 94.4539,116.827 C92.1649,116.796 89.8759,116.817 87.5859,116.744 C85.2969,116.695 83.0079,116.628 80.7179,116.504 C80.3499,116.483 80.0679,116.169 80.0879,115.801 C80.1069,115.458 80.3839,115.19 80.7179,115.17" id="Fill-32" fill="#74DCFC"></path>
51
+ <path d="M81.131,103.6261 C83.385,103.5011 85.639,103.4341 87.893,103.3851 C90.147,103.3131 92.401,103.3331 94.655,103.3031 C96.909,103.2821 99.163,103.3301 101.417,103.3521 C103.671,103.4141 105.925,103.4741 108.179,103.6261 C108.547,103.6501 108.825,103.9691 108.8,104.3371 C108.777,104.6751 108.507,104.9381 108.179,104.9591 C105.925,105.1101 103.671,105.1711 101.417,105.2331 C99.163,105.2551 96.909,105.3031 94.655,105.2821 C92.401,105.2521 90.147,105.2721 87.893,105.1991 C85.639,105.1511 83.385,105.0831 81.131,104.9591 C80.763,104.9381 80.482,104.6241 80.501,104.2561 C80.521,103.9131 80.797,103.6461 81.131,103.6261" id="Fill-34" fill="#74DCFC"></path>
52
+ <path d="M38.5181423,170.747294 C37.4020785,170.380014 33.961498,169.701886 32.3687051,169.248568 C32.2763157,169.707437 32.1820785,170.094146 32.0878414,170.387415 C32.0259405,170.578919 31.847629,170.708438 31.6480679,170.708438 L31.6360573,170.708438 L26.1324219,170.563192 C25.88759,170.556716 25.6898768,170.359661 25.6824856,170.114499 C25.670475,169.731491 25.6483015,169.340157 25.627052,168.947898 L25.3591228,168.940497 L25.1808113,170.187585 C25.0015759,171.442999 25.9735122,172.566119 27.2401706,172.566119 L38.2261918,172.566119 C39.2877458,172.566119 39.5261104,171.078494 38.5181423,170.747294" id="Fill-67" fill="#07A8DC"></path>
53
+ <path d="M20.6524382,92.38963 C17.13887,94.9985238 11.7442541,101.920419 10.4997692,105.192638 C10.2946647,105.731994 10.3297727,106.247297 10.6069408,106.768151 C11.5179001,108.478734 14.6314223,109.728598 16.712955,110.400249 C18.5145479,103.25077 15.6301515,101.191409 20.8575426,93.2324322 C20.9443886,93.1010624 21.0330824,92.9798691 21.1199285,92.8521998 C20.9517798,92.7097283 20.7974895,92.5543048 20.6524382,92.38963" id="Fill-69" fill="#C8D7E1"></path>
54
+ <path d="M7.6110304,162.66953 L9.75723571,162.822178 L22.508818,145.231572 C22.3933313,144.194491 22.2870835,143.154634 22.2002375,142.110151 L12.3025631,142.110151 C11.1670977,144.476658 7.02528173,153.805767 7.6110304,162.66953" id="Fill-71" fill="#C8D7E1"></path>
55
+ <path d="M12.3026555,142.110429 L11.7880467,142.110429 L11.280829,142.110429 C9.91161836,145.052373 6.14952279,154.017901 6.68260951,162.626326 C6.80271571,162.62355 6.91912633,162.617074 7.0567865,162.630952 L7.1464042,162.636502 L7.61112279,162.669807 C7.02537411,153.806044 11.16719,144.476936 12.3026555,142.110429" id="Fill-73" fill="#005082"></path>
56
+ <path d="M25.9142906,142.110429 L25.3433242,142.110429 L24.7723578,142.110429 L23.1278269,142.110429 C23.1841844,142.78208 23.2451614,143.452806 23.3144534,144.121682 C23.3375508,144.349267 23.3661915,144.575926 23.3911366,144.80351 C23.4151578,145.031095 23.4419508,145.257754 23.4678198,145.484413 C23.8650941,148.951836 24.3917136,152.377629 24.9137136,155.737736 C25.6463614,160.458724 26.33651,164.933624 26.5527012,168.971859 C26.5647118,169.196668 26.5813419,169.427027 26.5905808,169.649986 L31.3033631,169.773955 C31.3551012,169.57875 31.4059154,169.348391 31.4576534,169.100453 C32.4979578,164.040864 33.4384817,148.489267 33.7904853,142.110429 L25.9142906,142.110429 Z" id="Fill-75" fill="#C8D7E1"></path>
57
+ <path d="M34.2537256,142.110429 L33.7908548,142.110429 C33.4379274,148.489267 32.4983274,164.040864 31.4570991,169.100453 C31.4062849,169.348391 31.3554708,169.57875 31.3037327,169.773955 L26.5909504,169.649986 C26.5817115,169.427027 26.5650814,169.196668 26.5530708,168.971859 C26.3368796,164.933624 25.6467309,160.458724 24.9140831,155.737736 C24.3920831,152.377629 23.8645398,148.951836 23.4681893,145.484413 C23.4413964,145.257754 23.4155274,145.031095 23.3905823,144.80351 C23.3656371,144.575926 23.3379203,144.349267 23.3138991,144.121682 C23.244607,143.452806 23.1845539,142.78208 23.1281964,142.110429 L22.6671734,142.110429 L22.1996831,142.110429 C22.2874531,143.154911 22.3937008,144.194768 22.5091876,145.23185 L9.75760526,162.822455 L10.3008548,162.860386 L10.8441044,162.899242 L22.6634778,146.594581 C23.0459699,149.733579 23.5273185,152.833722 24.0003522,155.881133 C24.7256088,160.548462 25.4092902,164.975255 25.6273292,168.947805 C25.6485787,169.340064 25.6707522,169.731398 25.6827628,170.115331 C25.6901539,170.359568 25.8878672,170.556623 26.1317752,170.563099 L31.6363345,170.708346 L31.6483451,170.708346 C31.8479061,170.708346 32.0262177,170.578826 32.0881185,170.387322 C32.1823557,170.094053 32.275669,169.707345 32.3689823,169.248476 C33.4397752,163.947425 34.3701362,148.458737 34.7175203,142.110429 L34.2537256,142.110429 Z" id="Fill-77" fill="#005082"></path>
58
+ <path d="M40.3510552,77.5015424 L40.4360534,77.5015424 C40.6642552,77.5015424 40.8490339,77.3165144 40.8490339,77.0880049 L40.8490339,76.2304005 C40.8490339,76.0028161 40.6642552,75.8177882 40.4360534,75.8177882 L40.3510552,75.8177882 C40.1228534,75.8177882 39.9380746,76.0028161 39.9380746,76.2304005 L39.9380746,77.0880049 C39.9380746,77.3165144 40.1228534,77.5015424 40.3510552,77.5015424" id="Fill-79" fill="#005082"></path>
59
+ <path d="M10.8437348,162.898964 L10.3014092,162.860109 L9.75723571,162.822178 L7.6110304,162.66953 L7.14723571,162.63715 L7.05669411,162.630674 C6.91903394,162.616797 6.80262332,162.623273 6.68344102,162.626048 C5.37613128,162.656578 5.03613836,163.642777 4.64902686,165.097096 C4.04387642,167.37664 2.22380562,172.237324 3.37220562,172.487112 C5.28004633,172.9025 10.9629171,162.907291 10.9629171,162.907291 L10.8437348,162.898964 Z" id="Fill-81" fill="#07A8DC"></path>
60
+ <path d="M51.9967366,86.8482284 C51.9607047,86.8019714 51.9098906,86.7603401 51.7694587,86.7686664 C50.3411189,86.878758 46.4736994,91.3388563 44.6296074,94.5879468 C43.3112109,96.9109725 41.6204853,98.1784139 41.5299437,98.2450239 C41.8856428,100.396899 41.9521631,102.112108 41.9586304,102.303612 C41.9678693,102.55895 41.7673844,102.772657 41.5123897,102.780984 C41.2703295,102.807813 41.0439755,102.590405 41.0356605,102.335066 C41.031041,102.219424 40.6143649,91.634901 36.3173348,89.8956384 C36.1695118,89.8355044 36.0179932,89.7873971 35.8609313,89.7494664 C35.663218,89.700434 35.4599614,89.6643535 35.2465419,89.6532519 C35.2188251,89.6523267 35.1911083,89.6514016 35.1633915,89.6514016 C33.8228215,89.6514016 33.2028888,91.3305301 32.9127861,92.880139 C32.8924605,92.9865301 32.8693631,93.0938463 32.8527331,93.1993122 C31.8096569,99.64291 34.4492215,111.216407 37.1312853,111.962995 C37.1626977,111.972246 37.1959578,111.971321 37.229218,111.977797 C40.8444145,112.710508 47.6368817,99.1146552 49.1178835,94.3520362 C49.1548392,94.2317681 49.2398375,94.131853 49.3525525,94.0754194 C50.3503578,93.5749189 51.6317985,91.3083267 52.0946693,89.2230619 C52.3395012,88.1221457 52.3025454,87.2349368 51.9967366,86.8482284" id="Fill-83" fill="#C8D7E1"></path>
61
+ <path d="M40.8491263,77.0877274 C40.8491263,77.3162369 40.6643476,77.5012648 40.4361458,77.5012648 L40.3511476,77.5012648 C40.1229458,77.5012648 39.938167,77.3162369 39.938167,77.0877274 L39.938167,76.2310481 C39.938167,76.0025386 40.1229458,75.8175106 40.3511476,75.8175106 L40.4361458,75.8175106 C40.6643476,75.8175106 40.8491263,76.0025386 40.8491263,76.2310481 L40.8491263,77.0877274 Z M42.7800644,76.9036246 C42.1471971,76.2662034 41.2805847,75.3928715 41.0228184,73.8275352 C40.8509741,72.7830525 40.3160396,71.9726302 39.5787723,71.37499 C39.5168715,74.1781631 38.2224962,76.8869721 35.6291263,77.0618235 C35.7473847,77.6159821 35.7612431,78.2173229 35.6891794,78.8232894 C35.5330414,80.1286615 34.9546838,81.457162 34.022475,82.4230078 C33.4690626,82.9965944 32.7946201,83.4452872 32.0074626,83.6756469 C32.2144148,84.9902704 32.0462661,86.4723441 31.4965493,87.9322145 C32.6329387,88.0691352 33.8848148,88.3318749 35.2715794,88.7287598 C35.2789706,88.7287598 35.2863617,88.7287598 35.292829,88.7287598 C35.362121,88.7324603 35.4591299,88.7472626 35.562606,88.7639151 C35.6854838,88.7777922 35.8111334,88.7861184 35.9293918,88.8101721 C36.023629,88.8296 36.1132467,88.8610548 36.2047122,88.8869587 L35.9432502,88.6094168 L33.2445564,85.735933 L33.2962945,85.4195352 C33.3046095,85.3936313 33.3304785,85.3816045 33.3434131,85.358476 C33.3434131,85.3196201 33.3397175,85.2807643 33.3498803,85.2409832 C33.4071617,85.0217251 33.6141139,84.8894302 33.831229,84.9060827 C33.8589458,84.9088581 33.8857387,84.9033073 33.9143794,84.9116335 C34.6239299,85.0975866 34.9685423,85.0892603 35.7492325,85.0513296 C35.9062945,85.0439285 36.0531936,85.0115486 36.20656,84.9948961 C38.1476608,84.7765631 39.729367,83.7977654 40.7465741,82.2259531 C40.3483759,81.9715397 39.807898,81.5265475 39.5140998,80.8400939 C39.4133954,80.6060335 39.5214909,80.3340425 39.75616,80.2332022 C39.9889812,80.1305117 40.2624538,80.2406034 40.3631582,80.476514 C40.5534803,80.9215062 40.912875,81.2268022 41.1937387,81.4136805 C41.4163971,80.9400089 41.6113387,80.4404335 41.7434555,79.8899754 C41.8838874,79.3006615 42.4012679,78.9814883 42.8567476,78.701171 C43.2928254,78.4319553 43.5570591,78.2515531 43.5450485,78.0211933 C43.5284184,77.6751911 43.2438591,77.3708201 42.7800644,76.9036246 L42.7800644,76.9036246 Z" id="Fill-85" fill="#C8D7E1"></path>
62
+ <path d="M37.26719,112.90525 C37.1387688,112.893223 37.0094237,112.888597 36.8837741,112.853442 C33.518029,111.918126 30.8812361,99.593415 31.9400184,93.0517524 C31.9501812,92.9916183 31.9621918,92.9379602 31.9723546,92.8796764 C32.5858201,89.3743222 34.0908431,88.6786172 35.2715794,88.7294999 C33.8848148,88.3316898 32.6329387,88.0689502 31.4965493,87.9320295 C31.2738909,88.5259692 30.9930272,89.1171334 30.6391759,89.69072 C30.2853246,90.2652317 29.8834308,90.7814597 29.4528962,91.2495803 C27.4009281,93.4754664 24.626475,94.4311356 22.4220644,93.6077613 C22.1550591,93.5078463 21.8926732,93.3903535 21.6450697,93.2367803 C21.4584431,93.122063 21.2847511,92.9916183 21.1193741,92.8519222 C21.0325281,92.9795915 20.9447582,93.1007848 20.8579122,93.2321546 C15.630521,101.191131 18.5149175,103.250492 16.7124007,110.399971 C16.692075,110.480459 16.6791405,110.553545 16.6578909,110.635882 C16.6384892,110.708043 16.6172396,110.777428 16.5978378,110.849589 C16.5571865,110.999462 16.5165352,111.151185 16.4740361,111.297357 C14.456252,118.193348 10.2396007,121.793066 11.0812679,142.110059 L11.280829,142.110059 L11.7880467,142.110059 L12.3026555,142.110059 L22.199406,142.110059 L22.6668962,142.110059 L23.1279192,142.110059 L24.7724502,142.110059 L25.3434166,142.110059 L25.914383,142.110059 L33.7905777,142.110059 L34.2534485,142.110059 L34.7172431,142.110059 L35.5579865,142.110059 C35.5579865,142.110059 37.5212608,121.638568 37.26719,112.90525" id="Fill-87" fill="#07A8DC"></path>
63
+ <path d="M52.0951313,89.223432 C51.6322605,91.3077716 50.3508198,93.5752889 49.3520906,94.0757895 C49.2402994,94.132223 49.1553012,94.2321381 49.1174215,94.3514811 C47.6373437,99.1141001 40.8448764,112.709953 37.2287561,111.977242 C37.1964198,111.970766 37.1622357,111.971691 37.1308233,111.963365 C34.4487596,111.216777 31.809195,99.64328 32.8522711,93.1987571 C32.8698251,93.0942163 32.8919985,92.9869001 32.9123242,92.8805091 C33.2033508,91.329975 33.8223596,89.6508465 35.1638534,89.6508465 C35.1906463,89.6508465 35.2183631,89.6517716 35.2470038,89.6536219 C35.4604233,89.6647236 35.6627561,89.700804 35.8613932,89.7489113 C36.0175313,89.786842 36.1699738,89.8358744 36.3168729,89.8960085 C40.6148269,91.6343459 41.031503,102.219794 41.0351985,102.334511 C41.0435136,102.58985 41.2698676,102.808183 41.5128516,102.781354 C41.7678463,102.773027 41.9674074,102.55932 41.9581685,102.303057 C41.9517012,102.111553 41.8851808,100.396344 41.5294817,98.245394 C41.6200233,98.1787839 43.3116729,96.9113426 44.6300693,94.5873917 C46.4741614,91.3383012 50.3415808,86.8782029 51.7699207,86.7690364 C51.9094286,86.759785 51.9602428,86.8023415 51.9971985,86.8485984 C52.3030074,87.2353068 52.3390392,88.1225158 52.0951313,89.223432 M52.7215313,86.2740867 C52.4739277,85.9613895 52.1219242,85.8133672 51.6987808,85.8466722 C49.5544233,86.0104219 45.3738038,91.4049113 43.8272056,94.1303727 C42.9532021,95.66888 41.8861047,96.7216889 41.3400835,97.2027616 C40.6564021,93.7862208 39.2262145,89.7757403 36.2716021,88.9061091 L36.9848481,85.8272443 C39.091326,85.4100063 40.7691171,84.156442 41.8001826,82.2793336 C41.8168127,82.248804 41.8297472,82.215499 41.8463773,82.1849694 C42.1826746,81.5540241 42.4598428,80.8666454 42.6418499,80.1052554 C42.6935879,79.8878476 43.023418,79.6843169 43.3412375,79.4881873 C43.8604658,79.1680889 44.5062676,78.7702789 44.4683879,77.9765091 C44.4342038,77.2576755 43.9491596,76.7692018 43.4345508,76.2520487 C42.8303242,75.6414565 42.1438711,74.9513024 41.9341472,73.677385 C41.6948587,72.2156644 40.8180835,71.0157582 39.5338711,70.2164375 C39.5274038,70.1535281 39.5246322,70.0896934 39.517241,70.0277091 C39.517241,70.0277091 36.8130038,68.3837359 33.9165968,69.2542923 C32.1565791,69.782547 30.8926923,70.1479772 29.4920693,72.6366029 C27.9510145,73.0334878 26.4727844,73.9974834 25.6126392,75.2491973 C24.9936304,76.1512085 24.5381508,77.4149493 24.3395136,78.7212465 C24.1972339,79.6639638 23.701103,80.5002901 22.9601401,81.0997806 C22.1424941,81.7612554 21.3941401,82.6003571 20.7797508,83.5958074 C19.0613083,86.3841783 18.8903879,89.5629582 20.12471,91.6574744 C16.1251738,94.5753649 10.7444162,101.949653 9.63574367,104.863843 C9.33455429,105.655763 9.38721624,106.443057 9.79188173,107.202596 C10.859903,109.209224 14.2598322,110.584907 16.4734817,111.297264 C16.5169047,111.151092 16.5575561,111.000295 16.5982074,110.849497 C16.6176092,110.777336 16.6388587,110.70795 16.6582605,110.63579 C16.67951,110.553452 16.6924446,110.480366 16.7127702,110.399879 C14.6321614,109.729153 11.5177154,108.478364 10.6067561,106.767781 C10.3295879,106.246927 10.29448,105.731624 10.4995844,105.192268 C11.7449932,101.920049 17.1386853,94.9990789 20.6522534,92.3892599 C20.7973047,92.5548599 20.951595,92.7102834 21.1197437,92.8518297 C21.2841968,92.9915258 21.4578888,93.1219705 21.6454392,93.2366878 C21.8930428,93.390261 22.1545047,93.5077538 22.4224339,93.6076688 C24.6268446,94.4310431 27.4012977,93.4753739 29.4523419,91.2494878 C29.8828764,90.7822923 30.2856941,90.2651392 30.6395454,89.6906275 C30.9933968,89.1170409 31.2733366,88.5258767 31.4969189,87.931937 C32.0457118,86.4720666 32.2138605,84.9899929 32.0069083,83.6753694 C32.7949897,83.4450096 33.4685083,82.997242 34.0219207,82.4227303 C34.9550534,81.4568845 35.5334109,80.1283839 35.6886251,78.823937 C35.7606888,78.2170454 35.7468304,77.6166297 35.628572,77.0615459 C38.2228658,76.8876197 39.5163171,74.1788107 39.5791419,71.3747124 C40.3154853,71.9723526 40.8513437,72.782775 41.0231879,73.8272577 C41.2800304,75.3935191 42.1466428,76.266851 42.77951,76.9042722 C43.2433047,77.3705426 43.5287879,77.6749135 43.545418,78.0209158 C43.5565047,78.2522007 43.293195,78.4316778 42.8561932,78.7008934 C42.4007136,78.9821359 41.8842569,79.3003839 41.7429012,79.8896979 C41.6117083,80.440156 41.4167667,80.9397314 41.1931844,81.4134029 C40.9123207,81.2265247 40.552926,80.9212286 40.3626038,80.4762364 C40.2618994,80.2403258 39.9893508,80.1302342 39.7565295,80.2329247 C39.5218605,80.3337649 39.412841,80.605756 39.5135454,80.8398163 C39.8073437,81.5271951 40.3478215,81.9721873 40.7469437,82.2266007 C39.7297366,83.7974878 38.1471065,84.7762856 36.2060056,84.9946186 C36.0526392,85.0121962 35.906664,85.043651 35.7496021,85.0519772 C34.9689118,85.0899079 34.6242994,85.0973091 33.9138251,84.911356 C33.8861083,84.9039549 33.8593154,84.9085806 33.8315985,84.9058051 C33.6144835,84.8891526 33.4066074,85.0214476 33.3502499,85.2407057 C33.3373154,85.2638342 33.3049791,85.3933538 33.2957401,85.4192577 L33.244926,85.7356554 L35.9436198,88.6091392 L36.2041578,88.8866811 C36.1126923,88.8607772 36.0239985,88.8293225 35.9288375,88.8098945 C35.811503,88.7858409 35.6858534,88.7784398 35.5629755,88.7636375 C35.4724339,88.753461 35.3865118,88.7340331 35.2931985,88.7294074 C35.2858074,88.7284822 35.2784162,88.7294074 35.271949,88.7294074 C34.0912127,88.6794498 32.5852658,89.3742297 31.9727242,92.8805091 C31.9616375,92.9387929 31.9505508,92.9915258 31.9403879,93.0516599 C30.8816056,99.5933225 33.5183985,111.918033 36.8841437,112.853349 C37.0088693,112.88943 37.1391384,112.89313 37.2675596,112.905157 C37.3359277,112.911633 37.403372,112.932911 37.472664,112.932911 C42.1170782,112.931986 48.5806392,98.9956822 49.9433826,94.8029493 C51.2802569,93.9740241 52.5533826,91.4243392 52.9968516,89.4241873 C53.2185861,88.4259616 53.3497791,87.0697068 52.7215313,86.2740867" id="Fill-89" fill="#005082"></path>
64
+ <path d="M240.838977,185.911479 L240.838977,185.878174 L240.838977,185.911479 Z" id="Fill-1" fill="#07A8DC"></path>
65
+ <path d="M245.137855,86.333239 L238.456255,81.7713753 C237.582251,84.3987719 237.822463,88.2436524 239.962202,89.7821596 C240.194099,89.9496099 240.441702,90.0976323 240.719794,90.2058736 C243.023986,91.0986334 244.812644,88.02902 245.50926,86.5867272 L245.137855,86.333239 Z" id="Fill-33" fill="#0C4A6C"></path>
66
+ <path d="M247.724573,101.110217 C247.441861,98.4606173 245.908197,96.2883894 243.804491,95.0422262 C243.570746,95.1042106 243.318523,95.1412162 243.041355,95.1412162 C242.519355,95.1412162 241.926215,95.0320497 241.277642,94.8118665 C240.91178,94.6869726 240.679882,94.5204475 240.532983,94.3465212 C240.478473,94.3816765 240.417496,94.4075804 240.350052,94.4168318 C240.31864,94.4214575 237.311365,94.8497972 235.855309,96.3078173 C235.776778,96.3864542 235.676997,96.4243849 235.574445,96.4336363 L233.222211,98.8676788 L231.147146,101.043607 L233.479978,98.8204966 C233.663833,98.6456452 233.956707,98.6521212 234.133171,98.8371491 C234.308711,99.0221771 234.302243,99.3154463 234.116541,99.4912229 L230.603896,102.839303 L230.721231,103.066888 L237.721574,107.697212 C237.754834,107.667607 237.788095,107.642628 237.821355,107.613949 C238.013525,107.446499 238.306399,107.467777 238.4727,107.661131 C238.639925,107.854485 238.619599,108.14683 238.426505,108.313355 C237.559893,109.061793 236.684965,109.726968 235.811886,110.343111 L236.249811,110.129404 L236.075196,122.858401 C236.30155,122.906508 236.530675,122.952765 236.76442,122.993471 C236.769964,122.994396 236.775507,122.995321 236.781974,122.996246 C240.116307,123.572608 244.068725,123.410709 246.240799,123.248809 L246.242647,123.248809 C246.505033,123.230307 246.742473,123.209954 246.948502,123.192376 C247.108335,122.245958 248.843408,111.601301 247.724573,101.110217" id="Fill-35" fill="#0C4A6C"></path>
67
+ <path d="M237.817936,94.1142186 L237.814241,94.1179192 C237.81886,94.1160689 237.824404,94.1142186 237.829947,94.1123684 C237.825328,94.1132935 237.821632,94.1132935 237.817936,94.1142186" id="Fill-37" fill="#07A8DC"></path>
68
+ <path d="M240.687089,76.2809489 C238.431864,75.5251098 235.556706,75.7082875 234.215213,77.7565467 L245.470087,85.4407567 C246.580607,81.6190048 244.488912,77.5548662 240.687089,76.2809489" id="Fill-41" fill="#FFFFFF"></path>
69
+ <path d="M233.374469,136.620131 C232.146614,136.802383 231.050876,136.881945 230.066005,136.87917 C229.797152,136.878245 229.530147,136.876394 229.279772,136.861592 L229.261294,137.782106 C229.50705,137.795983 229.753729,137.80986 230.017039,137.81171 C230.044756,137.81171 230.068777,137.814486 230.09557,137.814486 C231.11832,137.814486 232.259329,137.721047 233.509358,137.534169 C233.762505,137.497163 233.936197,137.261252 233.898317,137.009614 C233.861361,136.757051 233.624844,136.581275 233.374469,136.620131" id="Fill-45" fill="#FFFFFF"></path>
70
+ <path d="M247.873412,123.099862 C247.855858,123.101712 247.517713,123.142418 246.948594,123.192376 C246.741642,123.209954 246.505125,123.230307 246.241815,123.248809 L246.239968,123.248809 C244.068817,123.410709 240.116399,123.572608 236.782067,122.996246 C236.775599,122.995321 236.769132,122.994396 236.764513,122.993471 C236.530768,122.952765 236.301642,122.906508 236.074364,122.858401 L236.249904,110.128479 L235.811978,110.343111 C234.174838,111.499536 232.552481,112.413574 231.006807,113.066722 C230.582739,113.247125 230.166063,113.408099 229.756778,113.547795 L229.280049,136.861315 C229.530424,136.877042 229.79743,136.878892 230.066283,136.879817 C231.051153,136.881668 232.146891,136.803031 233.374746,136.619853 C233.624198,136.580997 233.861638,136.757699 233.898594,137.009337 C233.936474,137.2619 233.762782,137.497811 233.509635,137.534816 C232.259607,137.721694 231.117674,137.814208 230.095847,137.814208 C230.069054,137.814208 230.044109,137.811433 230.017316,137.811433 C229.754007,137.809583 229.507327,137.795706 229.260647,137.781828 L228.751582,162.683813 L229.304994,162.683813 L235.529267,162.683813 L236.062353,123.796492 C238.055192,124.202628 240.279005,124.334923 242.268148,124.334923 C244.001373,124.334923 245.548895,124.239634 246.599362,124.153596 C246.632622,124.150821 246.664035,124.148045 246.697295,124.14527 C246.780445,124.137869 246.862672,124.131393 246.939355,124.123992 C246.974463,124.121216 247.006799,124.118441 247.04006,124.115665 C247.162014,124.103639 247.276576,124.093462 247.377281,124.08236 C247.717274,124.049055 247.932541,124.024077 247.985203,124.017601 C248.23835,123.987071 248.418509,123.756711 248.388021,123.503223 C248.356608,123.249735 248.122863,123.061931 247.873412,123.099862" id="Fill-47" fill="#78DCFA"></path>
71
+ <path d="M232.999091,78.0453753 L233.384355,78.308115 L233.765923,78.5680792 L238.455608,81.7709127 L245.138132,86.3327764 L245.509537,86.5862647 L246.082351,86.9785239 C246.161806,87.032182 246.252348,87.059011 246.341965,87.059011 C246.489788,87.059011 246.63484,86.9887004 246.723534,86.8564055 C246.867661,86.6454736 246.813151,86.3577552 246.602503,86.2143585 L246.274521,85.9904747 L245.872627,85.7157082 L245.46981,85.4409418 L234.214935,77.7567317 L233.854617,77.5097194 L233.471201,77.24883 L230.742942,75.3855988 C230.534142,75.2431272 230.245888,75.2949351 230.100836,75.506792 C229.957633,75.7177239 230.012142,76.0054423 230.22279,76.1497641 L232.999091,78.0453753 Z" id="Fill-51" fill="#78DCFA"></path>
72
+ <path d="M245.469902,85.4406642 L245.87272,85.7154307 L246.274614,85.9901972 C247.719583,81.6124363 245.349796,76.8683201 240.979778,75.403824 C237.847778,74.3528653 234.888546,75.125357 233.471293,77.2485525 L233.854709,77.510367 L234.215028,77.7564542 C235.557445,75.708195 238.431679,75.5250173 240.686904,76.2808564 C244.488727,77.5556989 246.580422,81.6189123 245.469902,85.4406642" id="Fill-53" fill="#005082"></path>
73
+ <polygon id="Clip-59" points="226.626549 123.7964 246.94059 123.7964 246.94059 188.16956 226.626549 188.16956"></polygon>
74
+ <path d="M246.696925,124.145177 C246.664589,124.147953 246.633177,124.150728 246.599917,124.153504 C245.549449,124.240467 244.001003,124.334831 242.267779,124.334831 C240.279559,124.334831 238.054823,124.202536 236.061984,123.7964 L235.528897,162.68372 L229.305548,162.68372 C229.405329,167.1836 229.64277,171.512328 229.865428,175.312802 C229.883906,175.611622 229.900536,175.911367 229.91809,176.203711 C230.161074,180.312257 230.370798,183.729723 230.339386,185.944507 C229.038543,186.082353 228.029651,186.225749 227.648083,186.36267 C226.302894,186.843743 226.205885,187.613459 227.840253,187.999242 C229.474621,188.3841 241.007587,187.999242 241.007587,187.999242 L241.007587,187.910429 L241.007587,187.570902 L241.007587,187.231376 L241.007587,186.557875 L241.007587,186.218348 C241.007587,186.112882 241.008511,186.012967 241.008511,185.909352 L241.008511,185.878822 C241.008511,185.774281 241.009435,185.673441 241.009435,185.57075 C241.008511,185.455108 241.009435,185.344091 241.009435,185.230299 C241.008511,181.972882 241.077803,178.921772 241.196986,176.031635 C241.205301,175.850308 241.211768,175.66528 241.219159,175.484878 C242.228051,152.504409 246.575895,140.373052 246.920508,126.200838 C246.937138,125.513459 246.942681,124.821454 246.93991,124.124824 C246.863226,124.1313 246.781,124.137776 246.696925,124.145177" id="Fill-58" fill="#0C4A6C"></path>
75
+ <path d="M247.377188,124.082823 C247.276484,124.093925 247.162845,124.103176 247.039967,124.115203 C247.006707,124.117978 246.974371,124.121679 246.939263,124.124454 C246.942034,124.822009 246.936491,125.514014 246.920785,126.200468 C246.576173,140.372682 242.228328,152.504964 241.219436,175.485433 C241.211121,175.665835 241.204654,175.849938 241.197263,176.031265 C241.07808,178.921402 241.007865,181.972512 241.008788,185.230854 C241.008788,185.344646 241.007865,185.455663 241.008788,185.57038 C241.008788,185.673071 241.007865,185.774836 241.007865,185.878452 L241.007865,185.908982 C241.007865,186.012597 241.006941,186.113437 241.006941,186.217978 L241.006941,186.557504 L241.006941,187.231931 L241.006941,187.570532 L241.006941,187.910059 C244.117691,187.866577 247.123118,187.768512 247.36333,187.760186 L247.691312,187.749084 L247.691312,186.199475 C247.756909,184.872825 249.753443,144.068615 247.377188,124.082823" id="Fill-61" fill="#61798E"></path>
76
+ <path d="M232.162851,89.0826576 L229.571284,89.6307558 L227.019563,93.9254901 L225.025135,99.3726596 C223.991957,101.874644 223.291509,103.747673 222.923791,104.991747 C222.556073,106.235822 222.281724,107.660757 222.100742,109.266553 L222.923791,112.691445 L227.434603,113.572909 L234.444409,110.478679 L237.721112,107.696472 L230.511045,102.927377 L227.906977,104.991747 L227.568443,104.452932 L230.260914,101.649971 L232.553371,89.9686295 L232.162851,89.0826576 Z" id="Path-2" fill="#FFFFFF"></path>
77
+ <path d="M233.104064,78.7567688 L230.020948,81.1822378 L231.336143,83.9465039 L232.075858,87.945298 L233.385515,89.0826576 C234.891206,90.3123102 235.650276,90.8135013 235.662726,90.5862309 C235.665128,90.5423861 236.308438,91.3805296 237.981693,91.8590057 C238.084018,91.888266 237.600791,94.1948651 237.721112,94.2198184 C238.232638,94.3259031 239.622787,94.2983727 240.320664,93.9254901 C240.83878,93.6486557 240.694612,94.0174079 240.708872,93.2765716 C240.719101,92.7451712 240.952643,93.0316789 240.981559,92.4261163 C240.986506,92.3225239 240.846157,90.8518178 240.846157,90.7721537 C240.846157,90.7120738 240.606466,90.3010384 240.579147,90.1499998 C240.461024,89.4969216 239.73882,86.7040467 238.412535,81.7713753 L233.914962,78.4219572 L233.104064,78.7567688 Z" id="Path-3" fill="#FFFFFF"></path>
78
+ <path d="M243.996476,93.9439929 C243.564094,94.3149739 242.677156,94.3112734 241.575874,93.9356667 C241.359683,93.8625807 241.210013,93.7645158 241.220175,93.7016063 C241.294087,93.2510633 242.719655,92.3351751 243.764579,92.3333248 L243.767351,92.3333248 C244.235765,92.3333248 244.268101,92.5248287 244.283807,92.6173427 C244.389131,93.2455125 244.292122,93.692355 243.996476,93.9439929 M243.767351,91.4081851 L243.762731,91.4081851 C242.483138,91.4100354 240.547581,92.4600689 240.324922,93.5064019 C240.291662,93.5036265 240.258402,93.4953002 240.224218,93.4999259 C240.146611,93.5110276 239.058264,93.666451 237.829485,94.1123684 C237.823942,94.1142186 237.818398,94.1160689 237.814703,94.1179192 C237.784214,94.1290209 237.753726,94.1401226 237.723237,94.1521494 C237.477482,94.2437382 237.228954,94.3473538 236.980427,94.4639214 C236.332777,94.7664421 235.700834,95.1550008 235.201931,95.653651 C235.021772,95.8340533 235.021772,96.1263974 235.201931,96.3077248 C235.292473,96.3974633 235.410731,96.4427952 235.52899,96.4427952 C235.544696,96.4427952 235.558554,96.4353941 235.57426,96.4335438 C235.676813,96.4242924 235.777517,96.3863617 235.855124,96.3077248 C237.311181,94.8497047 240.319379,94.421365 240.349867,94.4167393 C240.417312,94.4074879 240.478289,94.381584 240.532798,94.3473538 C240.679697,94.5212801 240.911595,94.6868801 241.278381,94.8117739 C241.92603,95.0319572 242.51917,95.1411237 243.04117,95.1411237 C243.319262,95.1411237 243.570561,95.1041181 243.804306,95.0421337 C244.109191,94.9616466 244.378044,94.8339773 244.595159,94.6489494 C244.980423,94.3195996 245.398947,93.6738522 245.194767,92.4637695 C245.083899,91.8022946 244.550813,91.4081851 243.767351,91.4081851" id="Fill-49" fill="#78DCFA"></path>
79
+ <path d="M237.194493,92.4261163 L237.014334,91.8784336 L237.333077,91.8590057 L237.194493,92.4261163 Z M237.821817,107.614134 C237.788557,107.642814 237.754373,107.667792 237.721112,107.696472 C236.589342,108.668793 235.478822,109.502344 234.40341,110.208226 C229.335852,113.539654 225.079473,114.015176 223.280652,112.515524 C220.465548,110.163819 224.154656,101.611828 225.927608,97.5014325 C226.429282,96.3394571 226.790525,95.5003554 226.894001,95.0784917 C227.903817,90.940342 229.664758,89.7913185 230.62376,89.4749208 C231.405374,89.2177319 232.006829,89.3861074 232.205466,89.5507822 C232.474319,89.7996448 232.098295,91.6998817 231.210433,93.7758951 C231.197498,93.808275 231.187335,93.8406548 231.180868,93.874885 L229.598238,102.51939 L227.568443,104.452932 C227.383665,104.629634 227.376273,104.921978 227.551813,105.107931 C227.643279,105.20322 227.765233,105.251327 227.887187,105.251327 C228.00175,105.251327 228.116312,105.208771 228.20593,105.123658 L230.511045,102.927377 L230.603434,102.838563 L234.117003,99.4914079 C234.301781,99.3147062 234.309173,99.0223621 234.133633,98.8373342 C233.956245,98.6513811 233.664295,98.6458303 233.479516,98.8206817 L231.146684,101.043792 L230.737399,101.434201 L232.080741,94.0922928 C232.498341,93.1116448 233.222673,91.2021565 233.185718,89.9189878 C233.886953,90.510152 234.706447,90.993075 235.663601,91.3131733 C235.762457,91.3464783 235.842836,91.3714571 235.93153,91.4001364 C235.924139,91.4658213 235.927834,91.5333565 235.949084,91.5981163 L236.822164,94.2467912 C236.851728,94.3356046 236.90901,94.4086906 236.981073,94.4632738 C237.228677,94.3467062 237.478128,94.2440157 237.72296,94.1515018 L238.379849,91.4695219 C238.414957,91.3270504 238.379849,91.1762526 238.286535,91.0633856 C238.254199,91.0254548 238.2117,91.0023263 238.170125,90.9764224 C238.133169,90.9542191 238.097137,90.9366414 238.055562,90.9246146 C237.975183,90.8496783 237.869859,90.7997208 237.752525,90.7978705 C237.022649,90.7839934 236.694666,90.6831532 235.955551,90.4361409 C234.05233,89.7987196 232.710836,88.4794705 232.056719,86.7392828 C232.269215,86.7864649 232.535296,86.8290213 232.841105,86.8290213 C232.931647,86.8290213 233.024036,86.8253208 233.119197,86.8179196 C233.373268,86.7957163 233.561742,86.5709074 233.539569,86.3164939 C233.517396,86.0620805 233.285498,85.8705766 233.039742,85.8955554 C232.45307,85.9464381 231.956939,85.7558593 231.954167,85.754009 C231.89319,85.7299554 231.829442,85.720704 231.767541,85.7225543 C231.647434,85.1369409 231.581838,84.5235733 231.607707,83.8694995 C231.631728,83.2663085 231.221519,82.8213163 230.861201,82.4281319 C230.515665,82.0534504 230.311484,81.8092135 230.383548,81.5927308 C230.492567,81.2661565 230.848266,81.0524493 231.418309,80.7305007 C232.136174,80.3252895 233.095176,79.7729811 233.765923,78.5684493 L233.384355,78.308485 L232.999091,78.0457453 C232.454918,79.0735755 231.666836,79.5278191 230.964677,79.924704 C230.33181,80.2818079 229.735898,80.6185588 229.507696,81.2994615 C229.257321,82.050675 229.769158,82.607609 230.180291,83.0553766 C230.432514,83.329218 230.693052,83.6123107 230.683813,83.8334191 C230.613597,85.6059867 231.035817,87.1824247 231.868245,88.4572671 C231.429396,88.3851062 230.901852,88.4091599 230.334581,88.5960381 C229.193573,88.9725699 227.11204,90.2871934 225.9969,94.8592336 C225.911902,95.2043107 225.545116,96.0563643 225.079473,97.1350772 C223.074624,101.782054 219.343017,110.431184 222.68936,113.226031 C223.531027,113.929138 224.667417,114.265888 226.004291,114.265888 C227.12867,114.265888 228.403643,114.006849 229.756224,113.54798 C230.166433,113.408284 230.583109,113.246384 231.007176,113.066907 C232.55285,112.413759 234.174284,111.499721 235.812348,110.343296 C236.684503,109.727153 237.560355,109.061978 238.426043,108.312615 C238.619137,108.147015 238.639463,107.853745 238.473162,107.660391 C238.305937,107.467037 238.013987,107.446684 237.821817,107.614134 L237.821817,107.614134 Z" id="Fill-63" fill="#005082"></path>
80
+ <path d="M233.392485,82.5427567 C233.35091,82.7675657 233.499657,82.9831232 233.723239,83.0247545 L233.803618,83.0386316 C234.0272,83.0802629 234.243391,82.9313154 234.284043,82.7074316 L234.437409,81.8711053 C234.478984,81.6472215 234.331161,81.431664 234.105731,81.3900327 L234.0272,81.3752305 C233.80177,81.3345243 233.587427,81.4825467 233.545851,81.7073556 L233.392485,82.5427567 Z" id="Fill-65" fill="#005082"></path>
81
+ </g>
82
+ </g>
83
+ <g id="Group" transform="translate(172.000000, 100.000000)"></g>
84
+ <g id="Page-1" transform="translate(0.000000, 163.000000)"></g>
85
+ <g id="Group-19" transform="translate(35.000000, 20.744000)"></g>
86
+ </g>
87
+ </g>
88
+ </g>
89
+ </g>
90
+ </svg>
img/svg/icon-block-applause-round.svg ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="16" cy="16" r="16" fill="#F3F4F5"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M25.6284 20.5812L22.8187 24.4318C21.8707 25.731 20.0506 26.0155 18.7513 25.0675L10.6092 19.1263C9.79788 18.5344 9.61989 17.3955 10.2119 16.5842C10.2848 16.4843 10.3695 16.3929 10.4557 16.3117L10.2911 16.1916C9.47984 15.5996 9.30185 14.4608 9.89382 13.6495C10.0354 13.4555 10.2079 13.2931 10.4029 13.1741C10.2079 12.6264 10.2768 12.0011 10.6457 11.4955C11.212 10.7195 12.2808 10.5264 13.0836 11.0311C13.1389 10.9183 13.2001 10.8098 13.273 10.7099C13.865 9.8986 15.0038 9.72061 15.8151 10.3126L21.4294 14.4092L21.7107 12.4433C21.7946 11.8469 22.2496 11.3591 22.8389 11.2305L24.8027 10.7986L26.145 18.3545C26.2819 19.13 26.0917 19.9462 25.6284 20.5812ZM24.71 18.6049L23.6377 12.5432L23.1543 12.65L22.5231 17.0091L14.957 11.4884C14.957 11.4884 14.5687 11.4032 14.4486 11.5678C14.3285 11.7324 14.3635 11.9561 14.5281 12.0762L18.7667 15.1691L17.9088 16.3448L12.3298 12.274C12.1652 12.1539 11.9415 12.1888 11.8214 12.3534C11.7013 12.518 11.7362 12.7418 11.9008 12.8619L17.4798 16.9327L16.6219 18.1085L11.5779 14.428C11.4133 14.3079 11.1896 14.3428 11.0694 14.5074C10.9493 14.6721 10.9843 14.8958 11.1489 15.0159L16.1929 18.6964L15.335 19.8721L11.8959 17.3627C11.7313 17.2426 11.5076 17.2776 11.3875 17.4422C11.2674 17.6068 11.3023 17.8305 11.4669 17.9506L19.6091 23.8917C20.2558 24.3636 21.1709 24.2205 21.6428 23.5739L24.4568 19.7174C24.6884 19.3999 24.7763 18.9955 24.71 18.6049Z" fill="#636D75"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M22.3289 20.7811L19.5192 24.6318C18.5711 25.931 16.751 26.2155 15.4518 25.2675L7.30959 19.3263C6.49832 18.7344 6.32032 17.5955 6.91229 16.7842C6.98522 16.6843 7.0699 16.5929 7.15617 16.5117L6.99156 16.3916C6.18028 15.7996 6.00229 14.6608 6.59426 13.8495C6.73582 13.6555 6.90836 13.4931 7.10331 13.3741C6.90834 12.8264 6.97727 12.2011 7.34618 11.6955C7.91241 10.9195 8.98121 10.7264 9.78406 11.2311C9.83935 11.1183 9.90051 11.0098 9.97344 10.9099C10.5654 10.0986 11.7043 9.92061 12.5156 10.5126L18.1298 14.6092L18.4111 12.6433C18.495 12.0468 18.95 11.5591 19.5393 11.4305L21.5031 10.9986L22.8455 18.5545C22.9823 19.33 22.7921 20.1462 22.3289 20.7811Z" fill="#F3F4F5"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M22.3289 20.7811L19.5192 24.6318C18.5711 25.931 16.751 26.2155 15.4518 25.2675L7.30959 19.3263C6.49832 18.7344 6.32032 17.5955 6.91229 16.7842C6.98522 16.6843 7.0699 16.5929 7.15617 16.5117L6.99156 16.3916C6.18028 15.7996 6.00229 14.6608 6.59426 13.8495C6.73582 13.6555 6.90836 13.4931 7.10331 13.3741C6.90834 12.8264 6.97727 12.2011 7.34618 11.6955C7.91241 10.9195 8.98121 10.7264 9.78406 11.2311C9.83935 11.1183 9.90051 11.0098 9.97344 10.9099C10.5654 10.0986 11.7043 9.92061 12.5156 10.5126L18.1298 14.6092L18.4111 12.6433C18.495 12.0468 18.95 11.5591 19.5393 11.4305L21.5031 10.9986L22.8455 18.5545C22.9823 19.33 22.7921 20.1462 22.3289 20.7811ZM21.4105 18.8049L20.3381 12.7432L19.8548 12.85L19.2235 17.2091L11.6575 11.6884C11.6575 11.6884 11.2692 11.6032 11.1491 11.7678C11.029 11.9324 11.0639 12.1561 11.2285 12.2762L15.4672 15.3691L14.6092 16.5448L9.03023 12.474C8.86562 12.3539 8.64191 12.3888 8.5218 12.5534C8.4017 12.718 8.43666 12.9417 8.60126 13.0619L14.1803 17.1327L13.3223 18.3085L8.27831 14.628C8.1137 14.5079 7.89 14.5428 7.76989 14.7074C7.64978 14.872 7.68474 15.0958 7.84935 15.2159L12.8934 18.8964L12.0355 20.0721L8.59634 17.5627C8.43174 17.4426 8.20803 17.4776 8.08792 17.6422C7.96781 17.8068 8.00277 18.0305 8.16738 18.1506L16.3096 24.0917C16.9562 24.5636 17.8714 24.4205 18.3432 23.7739L21.1572 19.9174C21.3889 19.5999 21.4767 19.1955 21.4105 18.8049Z" fill="#636D75"/>
6
+ <rect x="16.3392" y="6.31195" width="1.5" height="3" fill="#636D75"/>
7
+ <rect x="20.8494" y="6.41901" width="1.5" height="3" transform="rotate(35 20.8494 6.41901)" fill="#636D75"/>
8
+ <rect x="12.0994" y="7.2793" width="1.5" height="3" transform="rotate(-35 12.0994 7.2793)" fill="#636D75"/>
9
+ </svg>
img/svg/icon-block-feedbackButton-round.svg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="16" cy="16" r="16" fill="#F3F4F5"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9 9.25V21.6893L10.4268 20.2626C10.755 19.9344 11.2001 19.75 11.6642 19.75H22.75C22.8881 19.75 23 19.6381 23 19.5V9.5C23 9.36193 22.8881 9.25 22.75 9.25H9ZM7.5 9C7.5 8.30965 8.05964 7.75 8.75 7.75H22.75C23.7165 7.75 24.5 8.5335 24.5 9.5V19.5C24.5 20.4665 23.7165 21.25 22.75 21.25H11.6642C11.5979 21.25 11.5343 21.2763 11.4874 21.3232L7.5 25.3107V9Z" fill="#636D75"/>
4
+ <rect x="11" y="13.75" width="1.5" height="1.5" fill="#636D75"/>
5
+ <rect x="15.25" y="13.75" width="1.5" height="1.5" fill="#636D75"/>
6
+ <rect x="19.5" y="13.75" width="1.5" height="1.5" fill="#636D75"/>
7
+ </svg>
img/svg/icon-block-nps-round.svg ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="16" cy="16" r="16" fill="#F3F4F5"/>
3
+ <path d="M8.49707 19V14.3857H8.54102L11.8369 19H13.0576V11.9541H11.6465V16.5439H11.6074L8.31641 11.9541H7.08594V19H8.49707ZM13.7344 11.9541V19H15.209V16.7783H16.5273C18.0117 16.7783 19.042 15.8115 19.042 14.3662C19.042 12.916 18.0459 11.9541 16.6006 11.9541H13.7344ZM15.209 13.1211H16.21C17.0547 13.1211 17.543 13.5703 17.543 14.3711C17.543 15.1768 17.0498 15.626 16.2051 15.626H15.209V13.1211ZM19.1523 16.9932C19.1963 18.3164 20.2754 19.1221 21.9697 19.1221C23.7178 19.1221 24.8262 18.2578 24.8262 16.8906C24.8262 15.8164 24.2109 15.2109 22.7998 14.9082L21.9453 14.7275C21.1348 14.542 20.793 14.2979 20.793 13.8633C20.793 13.3408 21.2812 12.9941 22.0088 12.9941C22.7461 12.9941 23.2686 13.3555 23.3174 13.9512H24.6992C24.6748 12.6768 23.6445 11.832 22.0039 11.832C20.4316 11.832 19.3086 12.6914 19.3086 13.9902C19.3086 15.0205 19.9482 15.6797 21.2471 15.958L22.165 16.1582C23.0146 16.3486 23.3516 16.6025 23.3516 17.0615C23.3516 17.5791 22.8145 17.9551 22.0283 17.9551C21.2471 17.9551 20.6416 17.5742 20.5732 16.9932H19.1523Z" fill="#636D75"/>
4
+ </svg>
img/svg/icon-block-poll-round.svg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="16" cy="16" r="16" fill="#F3F4F5"/>
3
+ <path d="M8.75 22L8.75 10C8.75 9.30964 9.30964 8.75 10 8.75L22 8.75C22.6904 8.75 23.25 9.30964 23.25 10L23.25 22C23.25 22.6904 22.6904 23.25 22 23.25L10 23.25C9.30964 23.25 8.75 22.6904 8.75 22Z" stroke="#636D75" stroke-width="1.5"/>
4
+ <rect x="19" y="21" width="6" height="1.5" transform="rotate(-90 19 21)" fill="#636D75"/>
5
+ <rect x="15.5" y="21" width="9" height="1.5" transform="rotate(-90 15.5 21)" fill="#636D75"/>
6
+ <rect x="12" y="21" width="5" height="1.5" transform="rotate(-90 12 21)" fill="#636D75"/>
7
+ </svg>
img/svg/icon-block-quiz-round.svg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="16" cy="16" r="16" fill="#F3F4F5"/>
3
+ <path d="M15.1667 21H16.6667V19.5H15.1667V21Z" fill="#636D75"/>
4
+ <path d="M15.9167 12C14.3052 12 13 13.3259 13 14.963H14.4583C14.4583 14.1481 15.1146 13.4815 15.9167 13.4815C16.7187 13.4815 17.375 14.1481 17.375 14.963C17.375 16.4444 15.1875 16.2593 15.1875 18.6667H16.6458C16.6458 17 18.8333 16.8148 18.8333 14.963C18.8333 13.3259 17.5281 12 15.9167 12Z" fill="#636D75"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4444 9.325H13.3702H15.23H16.77H18.6298H19.5556H22.2222C22.4677 9.325 22.6667 9.53766 22.6667 9.8V23.1C22.6667 23.3623 22.4677 23.575 22.2222 23.575H9.77778C9.53232 23.575 9.33333 23.3623 9.33333 23.1V9.8C9.33333 9.53766 9.53232 9.325 9.77778 9.325H12.4444ZM16 6C14.8389 6 13.8511 6.79307 13.4851 7.9H9.77778C8.79594 7.9 8 8.75066 8 9.8V23.1C8 24.1493 8.79594 25 9.77778 25H22.2222C23.2041 25 24 24.1493 24 23.1V9.8C24 8.75066 23.2041 7.9 22.2222 7.9H18.5149C18.1489 6.79307 17.1611 6 16 6Z" fill="#636D75"/>
6
+ <path d="M16.75 7.75C16.75 8.16421 16.4142 8.5 16 8.5C15.5858 8.5 15.25 8.16421 15.25 7.75C15.25 7.33579 15.5858 7 16 7C16.4142 7 16.75 7.33579 16.75 7.75Z" fill="#F3F4F5"/>
7
+ </svg>
img/svg/icon-block-rating-round.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="16" cy="16" r="16" fill="#F3F4F5"/>
3
+ <path d="M15.7758 12.7042C15.8675 12.5184 16.1325 12.5184 16.2242 12.7042L17.0439 14.3652C17.0803 14.439 17.1507 14.4902 17.2322 14.502L19.0652 14.7683C19.2702 14.7981 19.3521 15.0501 19.2037 15.1948L17.8773 16.4877C17.8184 16.5451 17.7915 16.6278 17.8054 16.7089L18.1186 18.5345C18.1536 18.7388 17.9392 18.8945 17.7558 18.7981L16.1163 17.9362C16.0435 17.8979 15.9565 17.8979 15.8837 17.9362L14.2442 18.7981C14.0608 18.8945 13.8464 18.7388 13.8814 18.5345L14.1946 16.7089C14.2085 16.6278 14.1816 16.5451 14.1227 16.4877L12.7963 15.1948C12.6479 15.0501 12.7298 14.7981 12.9348 14.7683L14.7678 14.502C14.8493 14.4902 14.9197 14.439 14.9561 14.3652L15.7758 12.7042Z" fill="#636D75"/>
4
+ <path d="M24.0258 12.7042C24.1175 12.5184 24.3825 12.5184 24.4742 12.7042L25.2939 14.3652C25.3303 14.439 25.4007 14.4902 25.4822 14.502L27.3152 14.7683C27.5202 14.7981 27.6021 15.0501 27.4537 15.1948L26.1273 16.4877C26.0684 16.5451 26.0415 16.6278 26.0554 16.7089L26.3686 18.5345C26.4036 18.7388 26.1892 18.8945 26.0058 18.7981L24.3663 17.9362C24.2935 17.8979 24.2065 17.8979 24.1337 17.9362L22.4942 18.7981C22.3108 18.8945 22.0964 18.7388 22.1314 18.5345L22.4446 16.7089C22.4585 16.6278 22.4316 16.5451 22.3727 16.4877L21.0463 15.1948C20.8979 15.0501 20.9798 14.7981 21.1848 14.7683L23.0178 14.502C23.0993 14.4902 23.1697 14.439 23.2061 14.3652L24.0258 12.7042Z" fill="#636D75"/>
5
+ <path d="M7.52582 12.7042C7.61752 12.5184 7.88248 12.5184 7.97418 12.7042L8.79393 14.3652C8.83035 14.439 8.90074 14.4902 8.98216 14.502L10.8152 14.7683C11.0202 14.7981 11.1021 15.0501 10.9537 15.1948L9.62735 16.4877C9.56843 16.5451 9.54154 16.6278 9.55545 16.7089L9.86856 18.5345C9.90359 18.7388 9.68923 18.8945 9.50583 18.7981L7.86634 17.9362C7.7935 17.8979 7.7065 17.8979 7.63366 17.9362L5.99417 18.7981C5.81077 18.8945 5.59641 18.7388 5.63144 18.5345L5.94455 16.7089C5.95846 16.6278 5.93157 16.5451 5.87265 16.4877L4.54628 15.1948C4.3979 15.0501 4.47977 14.7981 4.68483 14.7683L6.51784 14.502C6.59926 14.4902 6.66965 14.439 6.70607 14.3652L7.52582 12.7042Z" fill="#636D75"/>
6
+ </svg>
img/svg/icon-block-survey-round.svg ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="16" cy="16" r="16" fill="#F3F4F5"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4444 9.325H13.3702H15.23H16.77H18.6298H19.5556H22.2222C22.4677 9.325 22.6667 9.53766 22.6667 9.8V23.1C22.6667 23.3623 22.4677 23.575 22.2222 23.575H9.77778C9.53232 23.575 9.33333 23.3623 9.33333 23.1V9.8C9.33333 9.53766 9.53232 9.325 9.77778 9.325H12.4444ZM16 6C14.8389 6 13.8511 6.79307 13.4851 7.9H9.77778C8.79594 7.9 8 8.75066 8 9.8V23.1C8 24.1493 8.79594 25 9.77778 25H22.2222C23.2041 25 24 24.1493 24 23.1V9.8C24 8.75066 23.2041 7.9 22.2222 7.9H18.5149C18.1489 6.79307 17.1611 6 16 6Z" fill="#636D75"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M21 13.5H11V12H21V13.5Z" fill="#636D75"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M21 17.5H11V16H21V17.5Z" fill="#636D75"/>
6
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18 21.5H11V20H18V21.5Z" fill="#636D75"/>
7
+ <path d="M16.75 7.75C16.75 8.16421 16.4142 8.5 16 8.5C15.5858 8.5 15.25 8.16421 15.25 7.75C15.25 7.33579 15.5858 7 16 7C16.4142 7 16.75 7.33579 16.75 7.75Z" fill="#F3F4F5"/>
8
+ </svg>
img/svg/icon-block-voting-round.svg ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="16" cy="16" r="16" fill="#F3F4F5"/>
3
+ <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="7" y="7" width="18" height="17">
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M22.6998 12.775H17.4941L18.2778 9.00475L18.3026 8.74075C18.3026 8.4025 18.1623 8.089 17.9396 7.86625L17.0651 7L11.6366 12.4368C11.3313 12.7337 11.1498 13.1462 11.1498 13.5999H7.84991V21.9324H11.1499V21.8678C11.1595 22.7672 11.8983 23.5 12.7998 23.5H20.2248C20.9096 23.5 21.4953 23.0875 21.7428 22.4935L24.2343 16.6773C24.3086 16.4875 24.3498 16.2895 24.3498 16.075V14.425C24.3498 13.5175 23.6073 12.775 22.6998 12.775ZM11.1499 21.8678V13.5999H11.1498C11.1498 13.6 11.1498 13.6 11.1498 13.6V21.85C11.1498 21.8559 11.1499 21.8619 11.1499 21.8678ZM22.6998 16.075L20.2248 21.85H12.7998V13.6L16.3803 10.0195L15.4645 14.425H22.6998V16.075Z" fill="white"/>
5
+ </mask>
6
+ <g mask="url(#mask0)">
7
+ <rect x="5.10016" y="4.5" width="22" height="22" fill="#636D75"/>
8
+ </g>
9
+ </svg>
img/svg/lock.svg ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="45" cy="45" r="45" fill="#F3F4F5"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M41 36.4284C41 34.5456 42.7288 32.9165 45 32.9165C47.2712 32.9165 49 34.5456 49 36.4284V41.6665H41V36.4284ZM38.3333 41.6665V36.4284C38.3333 33.0514 41.3801 30.4165 45 30.4165C48.6198 30.4165 51.6667 33.0514 51.6667 36.4284V41.6665H53.3333C54.2538 41.6665 55 42.4127 55 43.3332V56.6665C55 57.587 54.2538 58.3332 53.3333 58.3332H36.6667C35.7462 58.3332 35 57.587 35 56.6665V43.3332C35 42.4127 35.7462 41.6665 36.6667 41.6665H38.3333Z" fill="#2B2D2F"/>
4
+ </svg>
img/video/applause-block-tutorial.mp4 ADDED
Binary file
img/video/embed-crowdsignal.mp4 ADDED
Binary file
img/video/feedback-button-block-tutorial.mp4 ADDED
Binary file
img/video/nps-block-tutorial.mp4 ADDED
Binary file
img/video/poll-block-tutorial.mp4 ADDED
Binary file
img/video/slider-crowdsignal.mp4 ADDED
Binary file
img/video/survey-embed-tutorial.mp4 ADDED
Binary file
img/video/vote-block-tutorial.mp4 ADDED
Binary file
partials/api-key-page.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Crowdsignal legacy plugin
4
+ *
5
+ * @package crowdsignal
6
+ */
7
+
8
+ ?>
9
+ <h2 id="polldaddy-header"><?php esc_html_e( 'Crowdsignal', 'polldaddy' ); ?></h2>
10
+ <p>
11
+ <?php
12
+ /* translators: name of the rating being deleted */
13
+ printf( __( 'Before you can use the Crowdsignal plugin, you need to enter your <a href="%s">Crowdsignal.com</a> account details.', 'polldaddy' ), 'https://crowdsignal.com/' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- fixed input
14
+ ?>
15
+ </p>
16
+
17
+ <form action="" method="post">
18
+ <table class="form-table">
19
+ <tbody>
20
+ <tr class="form-field form-required">
21
+ <th valign="top" scope="row">
22
+ <label for="polldaddy-email"><?php esc_html_e( 'Crowdsignal Email Address', 'polldaddy' ); ?></label>
23
+ </th>
24
+ <td>
25
+ <input type="text" name="polldaddy_email" id="polldaddy-email" aria-required="true" size="40" />
26
+ </td>
27
+ </tr>
28
+ <tr class="form-field form-required">
29
+ <th valign="top" scope="row">
30
+ <label for="polldaddy-password"><?php esc_html_e( 'Crowdsignal Password', 'polldaddy' ); ?></label>
31
+ </th>
32
+ <td>
33
+ <input type="password" name="polldaddy_password" id="polldaddy-password" aria-required="true" size="40" />
34
+ </td>
35
+ </tr>
36
+ </tbody>
37
+ </table>
38
+ <p class="submit">
39
+ <?php wp_nonce_field( 'polldaddy-account' ); ?>
40
+ <input type="hidden" name="action" value="account" />
41
+ <input type="hidden" name="account" value="import" />
42
+ <input class="button-secondary" type="submit" value="<?php echo esc_attr( __( 'Submit', 'polldaddy' ) ); ?>" />
43
+ </p>
44
+ </form>
partials/crowdsignal-landing-page.php ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Crowdsignal legacy plugin
4
+ *
5
+ * @package crowdsignal
6
+ */
7
+
8
+ ?>
9
+
10
+ <div class="cs-wrapper-row cs-background-fill cs-centered">
11
+ <div class="cs-dashboard__crowdsignal-header">
12
+ <a href="https://crowdsignal.com" target="_blank" rel="noopener" class="cs-dashboard__crowdsignal-header-link">
13
+ <h2 class="cs-dashboard__crowdsignal-header-brand">
14
+ <img class="cs-dashboard__crowdsignal-header-logo" src="<?php echo esc_html( $resource_path ); ?>/img/svg/cs-logo2.svg" title="Crowdsignal" loading="lazy" width="40" alt="Crowdsignal Logo">
15
+ <?php esc_html_e( 'Crowdsignal', 'polldaddy' ); ?>
16
+ </h2>
17
+ </a>
18
+ <div class="cs-dashboard__crowdsignal-header-actions" id="dashboard-crowdsignal-header-actions"></div>
19
+ </div>
20
+ </div>
21
+
22
+ <div class="cs-wrapper-row cs-background-fill cs-centered">
23
+ <div class="crowdsignal-landing__container w-container">
24
+ <div class="crowdsignal-landing__hero">
25
+ <div class="crowdsignal-landing__hero-left">
26
+ <div class="crowdsignal-landing__hero-headline"><?php esc_html_e( 'Looking for insights?' ); ?><br><?php esc_html_e( 'Start asking!' ); ?></div>
27
+ <div class="crowdsignal-landing__hero-subline">
28
+ <strong><?php esc_html_e( 'Crowdsignal', 'polldaddy' ); ?></strong>
29
+ <?php esc_html_e( 'is a collection of powerful blocks that help you to collect feedback, analyze incoming responses and learn from your audience.' ); ?>
30
+ </div>
31
+ </div>
32
+ <div class="crowdsignal-landing__hero-right">
33
+ <div class="crowdsignal-landing__herogif">
34
+ <img src="<?php echo esc_html( $resource_path ); ?>/img/gif/poll-block-v1.1.gif" loading="lazy" alt="Crowdsignal Poll Block" class="crowdsignal-landing__image">
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+
41
+ <div class="cs-wrapper-row cs-centered">
42
+ <div class="crowdsignal-landing__blocks-cta">
43
+ <h3 class="crowdsignal-landing__blocks-cta-title">
44
+ <?php esc_html_e( 'Have you discovered our blocks yet?', 'polldaddy' ); ?>
45
+ <br />
46
+ <?php esc_html_e( 'They are available in your editor:', 'polldaddy' ); ?>
47
+ </h3>
48
+ </div>
49
+ </div>
50
+
51
+ <div class="cs-wrapper-row cs-centered">
52
+ <div class="crowdsignal-landing__card-container">
53
+ <div class="crowdsignal-landing__card cs-background-fill">
54
+ <div class="crowdsignal-landing__card-icon">
55
+ <img src="<?php echo esc_html( $resource_path ); ?>/img/item-icons/icon-block-poll.png"
56
+ title="<?php esc_html_e( 'Poll block', 'polldaddy' ); ?>"
57
+ alt="<?php esc_html_e( 'Poll block icon', 'polldaddy' ); ?>" />
58
+ </div>
59
+ <div class="crowdsignal-landing__card-title"><?php esc_html_e( 'Poll', 'polldaddy' ); ?></div>
60
+ <div class="crowdsignal-landing__card-body"><?php esc_html_e( 'Create polls and get your audience’s opinion.', 'polldaddy' ); ?></div>
61
+ <div class="crowdsignal-landing__card-footer" id="poll-tutorial"></div>
62
+ </div>
63
+
64
+ <div class="crowdsignal-landing__card cs-background-fill">
65
+ <div class="crowdsignal-landing__card-icon">
66
+ <img src="<?php echo esc_html( $resource_path ); ?>/img/item-icons/icon-block-survey-embed.png"
67
+ title="<?php esc_html_e( 'Survey embed block', 'polldaddy' ); ?>"
68
+ alt="<?php esc_html_e( 'Survey embed block icon', 'polldaddy' ); ?>" />
69
+ </div>
70
+ <div class="crowdsignal-landing__card-title"><?php esc_html_e( 'Survey Embed', 'polldaddy' ); ?></div>
71
+ <div class="crowdsignal-landing__card-body"><?php esc_html_e( 'Create surveys in minutes with 14 question and form types and embed them into your page.', 'polldaddy' ); ?></div>
72
+ <div class="crowdsignal-landing__card-footer" id="survey-embed-tutorial"></div>
73
+ </div>
74
+
75
+ <div class="crowdsignal-landing__card cs-background-fill">
76
+ <div class="crowdsignal-landing__card-icon">
77
+ <img src="<?php echo esc_html( $resource_path ); ?>/img/item-icons/icon-block-feedback.png"
78
+ title="<?php esc_html_e( 'Feedback Button block', 'polldaddy' ); ?>"
79
+ alt="<?php esc_html_e( 'Feedback Button block icon', 'polldaddy' ); ?>" />
80
+ </div>
81
+ <div class="crowdsignal-landing__card-title"><?php esc_html_e( 'Feedback Button', 'polldaddy' ); ?></div>
82
+ <div class="crowdsignal-landing__card-body"><?php esc_html_e( 'A floating always visible button that allows your audience to share feedback anytime.', 'polldaddy' ); ?></div>
83
+ <div class="crowdsignal-landing__card-footer" id="feedback-button-tutorial"></div>
84
+ </div>
85
+ <div class="crowdsignal-landing__card cs-background-fill">
86
+ <div class="crowdsignal-landing__card-icon">
87
+ <img src="<?php echo esc_html( $resource_path ); ?>/img/item-icons/icon-block-nps.png"
88
+ title="<?php esc_html_e( 'Measure NPS block', 'polldaddy' ); ?>"
89
+ alt="<?php esc_html_e( 'Measure NPS block icon', 'polldaddy' ); ?>" />
90
+ </div>
91
+ <div class="crowdsignal-landing__card-title"><?php esc_html_e( 'Measure NPS', 'polldaddy' ); ?></div>
92
+ <div class="crowdsignal-landing__card-body"><?php esc_html_e( 'Calculate your Net Promoter Score! Collect feedback and track customer satisfaction over time.', 'polldaddy' ); ?></div>
93
+ <div class="crowdsignal-landing__card-footer" id="nps-tutorial"></div>
94
+ </div>
95
+
96
+ <div class="crowdsignal-landing__card cs-background-fill">
97
+ <div class="crowdsignal-landing__card-icon">
98
+ <img src="<?php echo esc_html( $resource_path ); ?>/img/item-icons/icon-block-voting.png"
99
+ title="<?php esc_html_e( 'Voting block', 'polldaddy' ); ?>"
100
+ alt="<?php esc_html_e( 'Voting block icon', 'polldaddy' ); ?>" />
101
+ </div>
102
+ <div class="crowdsignal-landing__card-title"><?php esc_html_e( 'Voting', 'polldaddy' ); ?></div>
103
+ <div class="crowdsignal-landing__card-body"><?php esc_html_e( 'Allow your audience to rate your work or express their opinion.', 'polldaddy' ); ?></div>
104
+ <div class="crowdsignal-landing__card-footer" id="vote-tutorial"></div>
105
+ </div>
106
+
107
+ <div class="crowdsignal-landing__card cs-background-fill">
108
+ <div class="crowdsignal-landing__card-icon">
109
+ <img src="<?php echo esc_html( $resource_path ); ?>/img/item-icons/icon-block-applause.png"
110
+ title="<?php esc_html_e( 'Applause block', 'polldaddy' ); ?>"
111
+ alt="<?php esc_html_e( 'Applause block icon', 'polldaddy' ); ?>" />
112
+ </div>
113
+ <div class="crowdsignal-landing__card-title"><?php esc_html_e( 'Applause', 'polldaddy' ); ?></div>
114
+ <div class="crowdsignal-landing__card-body"><?php esc_html_e( 'Let your audience cheer with a big round of applause.', 'polldaddy' ); ?></div>
115
+ <div class="crowdsignal-landing__card-footer" id="applause-tutorial"></div>
116
+ </div>
117
+ </div>
118
+ </div>
119
+
120
+ <div class="cs-wrapper-row cs-centered">
121
+ <div class="crowdsignal-landing__blocks-cta">
122
+ <h3 class="crowdsignal-landing__blocks-cta-title crowdsignal-landing__blocks-export-showcase">
123
+ <?php esc_html_e( 'Analyze responses in real time, export your results everywhere!', 'polldaddy' ); ?>
124
+ </h3>
125
+ </div>
126
+ </div>
127
+
128
+ <div class="cs-wrapper-row cs-centered">
129
+ <div class="crowdsignal-landing__blocks-cta crowdsignal-landing__blocks-export-showcase">
130
+ <img src="<?php echo esc_html( $resource_path ); ?>/img/export-everywhere.png"
131
+ alt="<?php esc_html_e( 'Export showcase image', 'polldady' ); ?>"
132
+ title="<?php esc_html_e( 'Export showcase', 'polldady' ); ?>" width="583px" />
133
+ </div>
134
+ </div>
135
+
136
+ <div class="cs-wrapper-row cs-centered">
137
+ <div class="cs-dashboard__footer">
138
+ <div class="cs-dashboard__footer-left">
139
+ <a href="https://crowdsignal.com" target="_blank" rel="noopener">
140
+ <img class="cs-dashboard__crowdsignal-header-logo" src="<?php echo esc_html( $resource_path ); ?>/img/svg/cs-logo2.svg" title="Crowdsignal" loading="lazy" width="40" alt="Crowdsignal Logo" />
141
+ </a>
142
+ <br />
143
+ What is Crowdsignal? <a href="https://crowdsignal.com" target="_blank" rel="noopener">Learn more here.</a>
144
+ </div>
145
+ <div class="cs-dashboard__footer-right">
146
+ <a class="cs-dashboard__a8c-link" href="https://automattic.com" rel="noreferrer noopener" target="_blank">An <span>Automattic</span> Company</a>
147
+ </div>
148
+ </div>
149
+ </div>
150
+
151
+ <script>
152
+ jQuery( document ).ready( function() {
153
+ const el = wp.element.createElement;
154
+ const render = wp.element.render;
155
+ const useState = wp.element.useState;
156
+ const Fragment = wp.element.Fragment;
157
+
158
+ const ModalButton = ( { videoSrc, headline, footer } ) => {
159
+ const imgPath = '<?php echo esc_url( $resource_path . 'img' ); // phpcs:ignore -- variable comes from controller ?>';
160
+ const videoPath = `${imgPath}/video/${videoSrc}`;
161
+
162
+ const [ isModalOpen, setModalOpen ] = useState( false );
163
+ const openModal = () => setModalOpen( true );
164
+ const closeModal = () => setModalOpen( false );
165
+
166
+ // const head = el( 'h2', {}, headline );
167
+ // const head2 = el( 'h2', {}, 'This is how it works:' );
168
+ const video = el( 'video', { className: 'cs-create-menu__video', src: `${videoPath}`, autoPlay: true, muted: true, loop: true }, null );
169
+ return el( Fragment, {},
170
+ el( wp.components.Button, { isSecondary: true, isSmall: true, onClick: openModal }, '<?php echo esc_js( 'Learn more', 'polldaddy' ); ?>' ),
171
+ isModalOpen && el( wp.components.Modal, { onRequestClose: closeModal, title: headline }, video, footer && footer )
172
+ );
173
+ };
174
+
175
+ const embedFooter = el( 'div', {}, 'Create a survey on: ', el( 'a', { href: 'https://app.crowdsignal.com' }, 'app.crowdsignal.com' ) );
176
+
177
+ render( el( ModalButton, { headline: 'Please find the Poll Block in your editor:', videoSrc: 'poll-block-tutorial.mp4' } ), document.getElementById( 'poll-tutorial' ) );
178
+ render( el( ModalButton, { headline: 'How to embed a Crowdsignal Survey into WordPress:', videoSrc: 'survey-embed-tutorial.mp4', footer: embedFooter } ), document.getElementById( 'survey-embed-tutorial' ) );
179
+ render( el( ModalButton, { headline: 'Please find the Feedback Button Block in your editor:', videoSrc: 'feedback-button-block-tutorial.mp4' } ), document.getElementById( 'feedback-button-tutorial' ) );
180
+ render( el( ModalButton, { headline: 'Please find the Measure NPS Block in your editor:', videoSrc: 'nps-block-tutorial.mp4' } ), document.getElementById( 'nps-tutorial' ) );
181
+ render( el( ModalButton, { headline: 'Please find the Vote Block in your editor:', videoSrc: 'vote-block-tutorial.mp4' } ), document.getElementById( 'vote-tutorial' ) );
182
+ render( el( ModalButton, { headline: 'Please find the Applause Block in your editor:', videoSrc: 'applause-block-tutorial.mp4' } ), document.getElementById( 'applause-tutorial' ) );
183
+ } );
184
+ </script>
partials/errors.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Crowdsignal legacy plugin
4
+ *
5
+ * @package crowdsignal
6
+ */
7
+
8
+ ?>
9
+ <div class="error" id="polldaddy-error">
10
+ <?php
11
+ foreach ( $error_codes as $error_code ) : // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer
12
+ foreach ( $errors->get_error_messages( $error_code ) as $error_message ) : // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer
13
+ ?>
14
+ <p>
15
+ <?php
16
+ // don't know why is this ternary here, truthy output (first) was unescaped. Leaving as it was, but strange.
17
+ echo $errors->get_error_data( $error_code ) ? esc_html( $error_message ) : esc_html( $error_message ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer
18
+ ?>
19
+ </p>
20
+ <?php
21
+ endforeach;
22
+ endforeach;
23
+ ?>
24
+ </div>
partials/index.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Crowdsignal legacy plugin
4
+ *
5
+ * @package crowdsignal
6
+ */
7
+
8
+ // silence is overrated.
partials/polls-table.php ADDED
@@ -0,0 +1,513 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Polls table view for Crowdsignal dashboard
4
+ *
5
+ * @package crowdsignal
6
+ */
7
+
8
+ ?>
9
+
10
+ <div class="cs-wrapper-row cs-background-fill">
11
+ <div class="cs-dashboard__crowdsignal-header">
12
+ <a href="https://crowdsignal.com" target="_blank" rel="noopener" class="cs-dashboard__crowdsignal-header-link">
13
+ <h2 class="cs-dashboard__crowdsignal-header-brand">
14
+ <img class="cs-dashboard__crowdsignal-header-logo" src="<?php echo esc_html( $resource_path ); ?>/img/svg/cs-logo2.svg" title="Crowdsignal" loading="lazy" width="40" alt="Crowdsignal Logo">
15
+ <?php esc_html_e( 'Crowdsignal', 'polldaddy' ); ?>
16
+ </h2>
17
+ </a>
18
+ <div class="cs-dashboard__crowdsignal-header-actions" id="dashboard-crowdsignal-header-actions"></div>
19
+ </div>
20
+
21
+ <div class='cs-dashboard__main'>
22
+ <div id="cs-dashboard-notice" class="cs-dashboard__header-notice"></div>
23
+ <div class="cs-dashboard__header">
24
+ <div class="cs-dashboard__header-left">
25
+ <div id="cs-dashboard-switch"></div>
26
+ </div>
27
+ <div class="cs-dashboard__header-right">
28
+ <div id="cs-dashboard-create-menu"></div>
29
+ </div>
30
+ </div>
31
+
32
+ <div class="item-container" id="dashboard-items">
33
+ <ol class="cs-dashboard__content">
34
+ <li class="cs-dashboard__content-item is-header">
35
+ <div class="cs-dashboard__content-item-attribute is-checkbox"></div>
36
+ <div class="cs-dashboard__content-item-attribute is-name">Name</div>
37
+ <div class="cs-dashboard__content-item-attribute is-type">Type</div>
38
+ <div class="cs-dashboard__content-item-attribute is-created">Created</div>
39
+ <div class="cs-dashboard__content-item-attribute is-status">Status</div>
40
+ <div class="cs-dashboard__content-item-attribute is-responses-total">Responses</div>
41
+ <div class="cs-dashboard__content-item-attribute is-source">Source</div>
42
+ <div class="cs-dashboard__content-item-attribute is-results-action"></div>
43
+ <div class="cs-dashboard__content-item-attribute is-edit-action"></div>
44
+ <div class="cs-dashboard__content-item-attribute is-edit-action"></div>
45
+ <div class="cs-dashboard__content-item-attribute is-edit-action"></div>
46
+ <div class="cs-dashboard__content-item-attribute is-edit-action"></div>
47
+ </li>
48
+ <?php
49
+ if ( ! is_array( $items ) ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer
50
+ $items = array();
51
+ }
52
+ foreach ( $items as $item ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
53
+ $item->_id = intval( $item->_id );
54
+
55
+ $delete_link = false;
56
+ $preview_link = false;
57
+ $close_link = false;
58
+ $open_link = false;
59
+ $edit_link = false;
60
+
61
+ $item_post_link = isset( $item->_source_link ) ? $item->_source_link : '';
62
+
63
+ $item_post_id = url_to_postid( $item_post_link );
64
+
65
+ $display_link = wp_parse_url( $item_post_link );
66
+ if ( isset( $display_link['query'] ) && '' !== $display_link['query'] ) {
67
+ $display_link = $display_link['path'] . '?' . $display_link['query'];
68
+ } elseif ( isset( $display_link['path'] ) && '' !== $display_link['path'] ) {
69
+ $display_link = $display_link['path'];
70
+ } else {
71
+ $display_link = $item_post_link;
72
+ }
73
+
74
+ if ( 'poll' === $item->type ) {
75
+ $item->name = trim( wp_strip_all_tags( $item->name ) );
76
+ if ( 0 === strlen( $item->name ) ) {
77
+ $item->name = __( 'Unknown' );
78
+ }
79
+
80
+ $results_link = 'https://app.crowdsignal.com/polls/' . $item->_id . '/results';
81
+ if ( $item_post_link ) {
82
+ $edit_link = get_edit_post_link( $item_post_id );
83
+ } else {
84
+ $edit_link = add_query_arg(
85
+ array(
86
+ 'action' => 'edit',
87
+ 'poll' => $item->_id,
88
+ 'message' => false,
89
+ )
90
+ );
91
+ $delete_link = wp_nonce_url(
92
+ add_query_arg(
93
+ array(
94
+ 'action' => 'delete',
95
+ 'poll' => $item->_id,
96
+ 'message' => false,
97
+ )
98
+ ),
99
+ 'delete-poll_' . $item->_id
100
+ );
101
+ $preview = array( // phpcs:ignore -- for preview of polls
102
+ 'action' => 'preview',
103
+ 'poll' => $item->_id,
104
+ 'message' => false,
105
+ 'iframe' => 1,
106
+ 'TB_iframe' => 'true',
107
+ );
108
+
109
+ if ( isset( $_GET['iframe'] ) ) { // phpcs:ignore -- not actually processing a form
110
+ $preview['popup'] = 1; // phpcs:ignore -- for preview of polls
111
+ }
112
+ $preview_link = add_query_arg( $preview );
113
+
114
+ $close_link = wp_nonce_url(
115
+ add_query_arg(
116
+ array(
117
+ 'action' => 'close',
118
+ 'poll' => $item->_id,
119
+ 'message' => false,
120
+ )
121
+ ),
122
+ 'close-poll_' . $item->_id
123
+ );
124
+
125
+ $open_link = wp_nonce_url(
126
+ add_query_arg(
127
+ array(
128
+ 'action' => 'open',
129
+ 'poll' => $item->_id,
130
+ 'message' => false,
131
+ )
132
+ ),
133
+ 'open-poll_' . $item->_id
134
+ );
135
+ }
136
+ $icon_url = 'img/svg/icon-block-poll-round.svg';
137
+ switch ( $item->subtype ) {
138
+ case 'applause':
139
+ $icon_url = 'img/svg/icon-block-applause-round.svg';
140
+ break;
141
+ case 'vote':
142
+ $icon_url = 'img/svg/icon-block-voting-round.svg';
143
+ break;
144
+ }
145
+ } elseif ( 'survey' === $item->type ) {
146
+ $results_link = 'https://app.crowdsignal.com/surveys/' . $item->_id . '/report/overview';
147
+ $icon_url = 'img/svg/icon-block-survey-round.svg';
148
+ $edit_post = false;
149
+ switch ( $item->subtype ) {
150
+ case 'nps':
151
+ $edit_link = $item_post_id ? get_edit_post_link( $item_post_id ) : false;
152
+ $icon_url = 'img/svg/icon-block-nps-round.svg';
153
+ break;
154
+ case 'feedback':
155
+ $edit_link = $item_post_id ? get_edit_post_link( $item_post_id ) : false;
156
+ $icon_url = 'img/svg/icon-block-feedbackButton-round.svg';
157
+ break;
158
+ }
159
+ } elseif ( 'quiz' === $item->type ) {
160
+ $edit_post = false;
161
+ $item_post_link = false;
162
+ $results_link = 'https://app.crowdsignal.com/quizzes/' . $item->_id . '/report/overview';
163
+ $edit_link = 'https://app.crowdsignal.com/quizzes/' . $item->_id . '/question';
164
+ $icon_url = 'img/svg/icon-block-quiz-round.svg';
165
+ } else {
166
+ $edit_post = false;
167
+ $item_post_link = false;
168
+ $results_link = 'https://app.crowdsignal.com/ratings/' . $item->_id . '/results/';
169
+ $edit_link = 'https://app.crowdsignal.com/ratings/' . $item->_id . '/edit/';
170
+ $icon_url = 'img/svg/icon-block-rating-round.svg';
171
+ }
172
+
173
+ $icon_url = $resource_path . $icon_url; // phpcs:ignore -- variable comes from controller
174
+ $type_descriptor = $item->subtype
175
+ ? $item->subtype
176
+ : $item->type;
177
+
178
+ if ( strlen( $item->name ) > 25 ) {
179
+ $display_name = substr( $item->name, 0, 25 ) . '...';
180
+ } else {
181
+ $display_name = $item->name;
182
+ }
183
+ ?>
184
+ <li class="cs-dashboard__content-item">
185
+ <div class="cs-dashboard__content-item-attribute is-checkbox"></div>
186
+ <div class="cs-dashboard__content-item-attribute is-name">
187
+ <strong><a target="_blank" rel="noopener" href="<?php echo esc_url( $results_link ); ?>"><?php echo esc_html( $display_name ); ?></a></strong>
188
+ </div>
189
+ <div class="cs-dashboard__content-item-attribute is-type">
190
+ <img class="cs-dashboard__content-item-type-img" src="<?php echo esc_url( $icon_url ); ?>" title="<?php echo esc_attr( $type_descriptor ); ?>" alt="<?php echo esc_attr( $type_descriptor ); ?> icon" />
191
+ </div>
192
+ <div class="cs-dashboard__content-item-attribute is-created">
193
+ <?php echo esc_html( gmdate( 'M j', $item->_created ) ); ?>
194
+ </div>
195
+ <div class="cs-dashboard__content-item-attribute is-status" data-open="<?php echo $item->_closed ? 0 : 1; ?>">
196
+ <?php echo ! $item->_closed ? esc_html__( 'Open' ) : esc_html__( 'Closed' ); ?>
197
+ </div>
198
+ <div class="cs-dashboard__content-item-attribute is-responses-total">
199
+ <strong><?php echo esc_html( number_format_i18n( $item->_responses ) ); ?></strong>
200
+ </div>
201
+ <div class="cs-dashboard__content-item-attribute is-source">
202
+ <?php echo $item_post_link ? '<a href="' . esc_url( $item_post_link ) . '">' . esc_url( $display_link ) . '</a>' : ''; ?>
203
+ </div>
204
+ <div class="cs-dashboard__content-item-attribute is-results-action">
205
+ <a target="_blank" rel="noopener" href="<?php echo esc_url( $results_link ); ?>"><?php esc_html_e( 'Results' ); ?></a>
206
+ </div>
207
+ <div class="cs-dashboard__content-item-attribute is-edit-action">
208
+ <?php if ( $edit_link ) { ?>
209
+ <a target="<?php echo $item_post_id ? '' : '_blank'; ?>" rel="noopener" href="<?php echo esc_url( $edit_link ); ?>"><?php esc_html_e( 'Edit' ); ?></a>
210
+ <?php } ?>
211
+ </div>
212
+ <div class="cs-dashboard__content-item-attribute is-edit-action">
213
+ <?php if ( $open_link || $close_link ) { ?>
214
+ <a target="_blank" rel="noopener" href="<?php echo $item->_closed ? esc_url( $open_link ) : esc_url( $close_link ); ?>"><?php $item->_closed ? esc_html_e( 'Open' ) : esc_html_e( 'Close' ); ?></a>
215
+ <?php } ?>
216
+ </div>
217
+ <div class="cs-dashboard__content-item-attribute is-edit-action">
218
+ <?php if ( $delete_link ) { ?>
219
+ <a target="_blank" rel="noopener" class="delete-poll delete" href="<?php esc_url( $delete_link ); ?>"><?php esc_html_e( 'Delete' ); ?></a>
220
+ <?php } ?>
221
+ </div>
222
+ <div class="cs-dashboard__content-item-attribute is-edit-action">
223
+ <?php if ( $preview_link ) { ?>
224
+ <a class='thickbox' href="<?php echo esc_url( $preview_link ); ?>"><?php esc_html_e( 'Preview' ); ?></a>
225
+ <?php } ?>
226
+ </div>
227
+ </li>
228
+ <?php } ?>
229
+ </ol>
230
+ </div>
231
+ <div class="tablenav" <?php echo ( '' === $page_links ) ? 'style="display:none;"' : ''; // phpcs:ignore -- output from paginate_links ?>>
232
+ <div class="tablenav-pages"><?php echo $page_links; ?></div> <?php // phpcs:ignore -- output from paginate_links ?>
233
+ </div>
234
+ </div>
235
+
236
+ <div class="cs-dashboard__footer">
237
+ <div class="cs-dashboard__footer-left">
238
+ <a href="https://crowdsignal.com" target="_blank" rel="noopener">
239
+ <img class="cs-dashboard__crowdsignal-header-logo" src="<?php echo esc_html( $resource_path ); ?>/img/svg/cs-logo2.svg" title="Crowdsignal" loading="lazy" width="40" alt="Crowdsignal Logo" />
240
+ </a>
241
+ <br />
242
+ What is Crowdsignal? <a href="https://crowdsignal.com" target="_blank" rel="noopener">Learn more here.</a>
243
+ </div>
244
+ <div class="cs-dashboard__footer-right">
245
+ <a class="cs-dashboard__a8c-link" href="https://automattic.com" rel="noreferrer noopener" target="_blank">An <span>Automattic</span> Company</a>
246
+ </div>
247
+ </div>
248
+ </div>
249
+
250
+ <div id="cs-dashboard__modal-request"></div>
251
+
252
+ <script type="text/javascript">
253
+
254
+ jQuery( document ).ready(function(){
255
+ const currentUserName = '<?php echo esc_js( $current_user_name ); // phpcs:ignore -- output from main handler file ?>';
256
+ const currentView = '<?php echo esc_js( $view ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer ?>';
257
+ const el = wp.element.createElement;
258
+ const render = wp.element.render;
259
+ const useState = wp.element.useState;
260
+ const Fragment = wp.element.Fragment;
261
+ const connectedAccountEmail = '<?php echo esc_js( $connected_account_email ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer ?>';
262
+ const csFormsAccountEmail = '<?php echo esc_js( $cs_forms_account_email ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer ?>';
263
+ const currentUserOwnsConnection = <?php echo ( $current_user_owns_connection ) ? 'true' : 'false'; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer ?>;
264
+ const imgPath = '<?php echo esc_url( $resource_path . 'img' ); // phpcs:ignore -- variable comes from controller ?>';
265
+ const hasCrowdsignalBlocks = <?php echo $has_crowdsignal_blocks ? 'true' : 'false'; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer ?>;
266
+ const hasMultipleAccounts = <?php echo $has_multiple_accounts ? 'true' : 'false'; // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer ?>;
267
+ const globalAccountName = '<?php echo esc_js( $global_user_name ); // phpcs:ignore -- variable comes from controller ?>';
268
+ const globalAccountId = '<?php echo esc_js( $global_user_id ); // phpcs:ignore -- variable comes from controller ?>';
269
+
270
+ plugin = new Plugin( {
271
+ <?php /* translators: name of the rating being deleted */ ?>
272
+ delete_rating: '<?php echo esc_js( __( 'Are you sure you want to delete the rating for "%s"?', 'polldaddy' ) ); ?>',
273
+ <?php /* translators: name of the poll being deleted */ ?>
274
+ delete_poll: '<?php echo esc_js( __( 'Are you sure you want to delete the poll %s?', 'polldaddy' ) ); ?>',
275
+ delete_answer: '<?php echo esc_js( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>',
276
+ delete_answer_title: '<?php echo esc_js( __( 'delete this answer', 'polldaddy' ) ); ?>',
277
+ standard_styles: '<?php echo esc_js( __( 'Standard Styles', 'polldaddy' ) ); ?>',
278
+ custom_styles: '<?php echo esc_js( __( 'Custom Styles', 'polldaddy' ) ); ?>'
279
+ } );
280
+
281
+ if ( 'me' !== currentView && ! currentUserOwnsConnection ) {
282
+ const RestrictionModal = () => {
283
+ const [ isModalOpen, setModalOpen ] = useState( false );
284
+ const openModal = () => setModalOpen( true );
285
+ const closeModal = () => setModalOpen( false );
286
+ const linkClickHandler = ( e ) => {
287
+ e.preventDefault();
288
+ openModal();
289
+ return false;
290
+ }
291
+ jQuery( '.is-name a' ).on( 'click', linkClickHandler );
292
+ jQuery( '.is-results-action a' ).on( 'click', linkClickHandler );
293
+ const shallNotPass = el( 'img', { src: `${imgPath}/svg/lock.svg` } );
294
+ const modalContentHeadline = el( 'div', { className: 'cs-dashboard__modal-request-headline' }, 'You need access to this Crowdsignal page.' );
295
+ const modalContentCta = el( 'div', { className: 'cs-dashboard__modal-request-text' }, 'Please ask the project owner' );
296
+ const modalContentCtaEmail = el( 'div', { className: 'cs-dashboard__modal-request-text is-email' }, connectedAccountEmail );
297
+ const modalContentCtaEnd = el( 'div', { className: 'cs-dashboard__modal-request-text' }, 'for access to a Team account.' );
298
+ const modalContent = el(
299
+ 'div',
300
+ { className: 'cs-dashboard__modal-request-body' },
301
+ shallNotPass,
302
+ modalContentHeadline,
303
+ modalContentCta,
304
+ modalContentCtaEmail,
305
+ modalContentCtaEnd
306
+ );
307
+ return el(
308
+ Fragment,
309
+ {},
310
+ '',
311
+ isModalOpen && el( wp.components.Modal, { className: 'cs-dashboard__modal-request', onRequestClose: closeModal, title: 'Request access', contentLabel: 'Request access' }, modalContent )
312
+ );
313
+ }
314
+
315
+ render(
316
+ el( RestrictionModal ),
317
+ document.getElementById( 'cs-dashboard__modal-request' )
318
+ );
319
+ }
320
+
321
+ // jQuery( '#filter-polls' ).click( function(){
322
+ // if( jQuery( '#filter-options' ).val() == 'blog' ){
323
+ // window.location = '<?php // echo add_query_arg( array( 'page' => 'polls', 'view' => 'blog' ), admin_url( 'admin.php' ) ); // phpcs:ignore -- controlled plain text ?>';
324
+ // } else {
325
+ // window.location = '<?php // echo add_query_arg( array( 'page' => 'polls' ), admin_url( 'admin.php' ) ); // phpcs:ignore -- controlled plain text ?>';
326
+ // }
327
+ // } );
328
+
329
+ render(
330
+ wp.components.DropdownMenu(
331
+ {
332
+ label: connectedAccountEmail || 'Account',
333
+ text: connectedAccountEmail || 'Account',
334
+ toggleProps: {
335
+ iconPosition: 'right',
336
+ className: 'cs-account__dropdown-menu-toggle',
337
+ },
338
+ popoverProps: {
339
+ position: 'bottom center',
340
+ },
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=pollsettings', '_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' ) },
348
+ ]
349
+ }
350
+ ),
351
+ document.getElementById( 'dashboard-crowdsignal-header-actions' )
352
+ );
353
+
354
+ // create new dropdown with modals:
355
+ const ModalButton = ( { label, iconUrl, videoSrc, headline, footer } ) => {
356
+ const videoPath = `${imgPath}/video/${videoSrc}`;
357
+ const csImageUrlPath = 'https://app.crowdsignal.com/images/item-icons';
358
+ const iconPath = `${csImageUrlPath}/${iconUrl}`;
359
+
360
+ const [ isModalOpen, setModalOpen ] = useState( false );
361
+ const openModal = () => setModalOpen( true );
362
+ const closeModal = () => setModalOpen( false );
363
+
364
+ const buttonIcon = el( 'img', { className: 'cs-create-menu__item-image-icon', src: iconPath, alt: label }, null );
365
+ // const head = el( 'h2', {}, headline );
366
+ // const head2 = el( 'h2', {}, 'This is how it works:' );
367
+ const video = el( 'video', { className: 'cs-create-menu__video', src: `${videoPath}`, autoPlay: true, muted: true, loop: true }, null );
368
+ return el( Fragment, {},
369
+ el( wp.components.Button, { isSecondary: true, className: 'cs-create-menu__item', onClick: openModal }, buttonIcon, label ),
370
+ isModalOpen && el( wp.components.Modal, { className: 'cs-create-menu__modal', contentLabel: `${label} video tutorial`, onRequestClose: closeModal, title: headline }, video, footer )
371
+ );
372
+ }
373
+
374
+ const CreateMenuDropdown = () => {
375
+ const toggle = ( { isOpen, onToggle } ) => el(
376
+ wp.components.Button,
377
+ {
378
+ isPrimary: true,
379
+ className: isOpen ? 'cs-create-menu__dropdown-toggle is-active' : 'cs-create-menu__dropdown-toggle',
380
+ onClick: onToggle,
381
+ 'aria-expanded': isOpen
382
+ },
383
+ 'Create new', el( wp.components.Icon, { icon: 'arrow-down-alt2' }, null )
384
+ );
385
+
386
+ const embedFooter = el( 'div', {}, 'Create a survey on: ', el( 'a', { href: 'https://app.crowdsignal.com' }, 'app.crowdsignal.com' ) );
387
+ const sublistItems = [
388
+ { headline: 'Please find the Poll Block in your editor:', videoSrc: 'poll-block-tutorial.mp4', iconUrl: 'icon-block-poll-round.svg', label: 'Poll' },
389
+ { headline: 'How to embed a Crowdsignal Survey into WordPress:', videoSrc: 'survey-embed-tutorial.mp4', iconUrl: 'icon-block-survey-round.svg', label: 'Survey', footer: embedFooter },
390
+ { headline: 'Please find the Feedback Button Block in your editor:', videoSrc: 'feedback-button-block-tutorial.mp4', iconUrl: 'icon-block-feedbackButton-round.svg', label: 'Feedback' },
391
+ { headline: 'Please find the Measure NPS Block in your editor:', videoSrc: 'nps-block-tutorial.mp4', iconUrl: 'icon-block-nps-round.svg', label: 'NPS' },
392
+ { headline: 'Please find the Vote Block in your editor:', videoSrc: 'vote-block-tutorial.mp4', iconUrl: 'icon-block-voting-round.svg', label: 'Voting' },
393
+ { headline: 'Please find the Applause Block in your editor:', videoSrc: 'applause-block-tutorial.mp4', iconUrl: 'icon-block-applause-round.svg', label: 'Applause' },
394
+ ];
395
+ const sublist = () => el(
396
+ 'div',
397
+ { className: 'cs-create-menu__dropdown-list' },
398
+ sublistItems.map( item => el( ModalButton, item ) )
399
+ );
400
+
401
+ var dropdownProps = {
402
+ className: 'cs-create-menu__dropdown',
403
+ contentClassName: 'cs-create-menu__drowpdown-list-container',
404
+ position: 'bottom center',
405
+ renderToggle: toggle,
406
+ renderContent: sublist,
407
+ popoverProps: { noArrow: false },
408
+ };
409
+
410
+ return el( wp.components.Dropdown, dropdownProps, null );
411
+ }
412
+
413
+ render(
414
+ el( CreateMenuDropdown, {} ),
415
+ document.getElementById( 'cs-dashboard-create-menu' )
416
+ );
417
+
418
+ // notification
419
+ const Notification = () => {
420
+ const [ visible, setVisible ] = useState( true );
421
+ const editorLink = el( 'a', { href: '<?php echo esc_url( add_query_arg( array( 'action' => 'create-poll' ) ) ); ?>' }, 'create poll page' );
422
+ const csLink = el( 'a', { href: 'https://app.crowdsignal.com', target: '_blank' }, 'Crowdsignal dashboard' );
423
+ const settingsLink = el( 'a', { href: 'options-general.php?page=polls&action=options' }, 'here' );
424
+ const learnMoreLink = el( 'a', { href: 'https://crowdsignal.com/support/welcome-to-the-new-crowdsignal-area-in-wp-admin/', target: '_blank' }, 'Learn more.' );
425
+ const noticeOptions = { onRemove: () => {
426
+ window.localStorage.setItem( 'makingChangesNoticeClosed', true );
427
+ setVisible( false );
428
+ } };
429
+ return visible && el(
430
+ wp.components.Notice,
431
+ noticeOptions,
432
+ 'We made some changes here. ', learnMoreLink
433
+ );
434
+ }
435
+
436
+ const hasClosedNotice = window.localStorage.getItem( 'makingChangesNoticeClosed' );
437
+
438
+ render(
439
+ ! hasClosedNotice && el( Notification ),
440
+ document.getElementById( 'cs-dashboard-notice' )
441
+ );
442
+
443
+
444
+ // switch buttons
445
+ const ButtonGroup = () => {
446
+ const meAvatarUrl = '<?php echo esc_js( get_avatar_url( $user_id, array( 'size' => 16 ) ) ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer ?>';
447
+ const meGravatar = el( 'img', { width: 16, src: meAvatarUrl, alt: 'User avatar', title: 'User avatar', className: 'cs-dashboard-switch__avatar' } );
448
+ const [ isVisible, setVisible ] = useState( false );
449
+ const hidePopover = () => setVisible( false );
450
+ const showPopover = () => setVisible( true );
451
+ let otherAvatarUrl = null;
452
+ let otherGravatar = null;
453
+ if ( hasMultipleAccounts && globalAccountId ) {
454
+ otherAvatarUrl = '<?php echo esc_js( get_avatar_url( $global_user_id, array( 'size' => 16 ) ) ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- output from page renderer ?>';
455
+ otherGravatar = el( 'img', { width: 16, src: otherAvatarUrl, alt: globalAccountName, title: globalAccountName, className: 'cs-dashboard-switch__avatar' } );
456
+ }
457
+ const meButton = el(
458
+ wp.components.Button,
459
+ {
460
+ href: '?post_type=feedback&page=polls&view=me',
461
+ isSecondary: true,
462
+ className: 'me' === currentView && 'is-current',
463
+ },
464
+ el( 'span', { className: 'cs-dashboard-switch__text' }, 'Me', meGravatar )
465
+ );
466
+ const otherButton = hasMultipleAccounts
467
+ ? el(
468
+ wp.components.Button,
469
+ {
470
+ href: '?post_type=feedback&page=polls&view=blog',
471
+ isSecondary: true,
472
+ className: 'blog' === currentView && 'is-current',
473
+ },
474
+ el( 'span', { className: 'cs-dashboard-switch__text' }, globalAccountName, otherGravatar )
475
+ )
476
+ : null;
477
+ const csformsButton = hasCrowdsignalBlocks
478
+ ? el(
479
+ Fragment,
480
+ {},
481
+ el(
482
+ wp.components.Button,
483
+ {
484
+ href: '?post_type=feedback&page=polls&view=csforms',
485
+ isSecondary: true,
486
+ className: 'csforms' === currentView && 'is-current',
487
+ onMouseOver: showPopover,
488
+ onMouseOut: hidePopover,
489
+ },
490
+ 'On This Site'
491
+ ),
492
+ isVisible && el(
493
+ wp.components.Popover,
494
+ { noArrow: false, position: 'middle right', className: 'cs-dashboard-switch__popover' },
495
+ 'This WordPress site is connected',
496
+ el( 'br' ),
497
+ 'to Crowdsignal account:',
498
+ el( 'br' ),
499
+ csFormsAccountEmail
500
+ )
501
+ )
502
+ : null;
503
+ return ( hasMultipleAccounts || hasCrowdsignalBlocks ) && el( wp.components.ButtonGroup, { className: 'cs-dashboard-switch' }, meButton, otherButton, csformsButton );
504
+ }
505
+ const buttonGroupContainer = document.getElementById( 'cs-dashboard-switch' );
506
+ if ( buttonGroupContainer ) {
507
+ render(
508
+ el( ButtonGroup ),
509
+ buttonGroupContainer
510
+ );
511
+ }
512
+ });
513
+ </script>
partials/settings.php ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Crowdsignal legacy plugin
4
+ *
5
+ * @package polldaddy
6
+ */
7
+
8
+ ?>
9
+ <?php // phpcs:ignoreFile -- too many legacy warnings, needs full linter ?>
10
+ <div id="options-page" class="cs-wrapper-row cs-background-fill">
11
+ <div class="icon32" id="icon-options-general"></div>
12
+ <h2>
13
+ <?php _e( 'Crowdsignal Settings', 'polldaddy' ); ?>
14
+ </h2>
15
+ <?php if ( $controller->is_admin || $controller->multiple_accounts ) { ?>
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
+ if ( is_object( $poll ) ) {
53
+ ?>
54
+ <h3><?php _e( 'General Settings', 'polldaddy' ); ?></h3>
55
+ <form action="" method="post">
56
+ <table class="form-table">
57
+ <tbody>
58
+ <tr valign="top">
59
+ <th valign="top" scope="row">
60
+ <label><?php _e( 'Default poll settings', 'polldaddy' ); ?></label>
61
+ </th>
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
+ <form action="" method="post">
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
+ $previous_settings = get_option( 'polldaddy_settings' );
178
+ if ( is_array( $previous_settings ) && !empty( $previous_settings ) ) {
179
+ echo "<h3>" . __( 'Restore Previous Settings', 'polldaddy' ) . "</h3>";
180
+ echo "<p>" . __( 'The connection settings for this site were reset but a backup was made. The following settings can be restored:', 'polldaddy' ) . "</p>";
181
+ echo "<table>";
182
+ foreach( $previous_settings as $key => $value ) {
183
+ if ( $value != '' ) {
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
+ <form action="" method="post">
201
+ <p class="submit">
202
+ <?php wp_nonce_field( 'polldaddy-restore' . $current_user->ID ); ?>
203
+ <input type="hidden" name="action" value="restore-account" />
204
+ <input type="hidden" name="account" value="import" />
205
+ <input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Restore', 'polldaddy' ) ); ?>" />
206
+ </p>
207
+ </form>
208
+ <br />
209
+ <?php
210
+ if (
211
+ $show_reset_form
212
+ && isset( $settings[ 'pd-rating-posts-id' ] )
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
+ </div>
234
+ </div>
polldaddy-client.php CHANGED
@@ -3,6 +3,7 @@
3
  require_once dirname( __FILE__ ) . '/polldaddy-xml.php';
4
 
5
  class api_client {
 
6
  var $partnerGUID;
7
  var $userCode;
8
  var $admin = 0;
@@ -27,22 +28,28 @@ class api_client {
27
  $this->requests[] = $this->request_xml;
28
 
29
  if ( function_exists( 'wp_remote_post' ) ) {
30
- $response = wp_remote_post( polldaddy_api_url( '/' ), array(
31
  'headers' => array( 'Content-Type' => 'text/xml; charset=utf-8', 'Content-Length' => strlen( $this->request_xml ) ),
32
  'user-agent' => 'Polldaddy PHP Client/0.1',
33
  'timeout' => $timeout,
34
  'body' => $this->request_xml
35
  ) );
36
-
37
  if ( !$response || is_wp_error( $response ) ) {
38
  $this->errors[-1] = "Can't connect";
39
  return false;
40
  }
41
  $this->response_xml = wp_remote_retrieve_body( $response );
42
  } else {
 
 
 
 
 
 
 
43
  $fp = fsockopen(
44
- polldaddy_api_url( '/', POLLDADDY_API_VERSION, 'tls' ),
45
- 443,
46
  $err_num,
47
  $err_str,
48
  $timeout
@@ -59,8 +66,8 @@ class api_client {
59
  if ( !isset( $parsed['path']) || !$path = $parsed['path'] . ( isset($parsed['query']) ? '?' . $parsed['query'] : '' ) )
60
  $path = '/';
61
 
62
- $request = 'POST ' . polldaddy_api_path( $path ) . " HTTP/1.0\r\n";
63
- $request .= 'Host: ' . POLLDADDY_API_HOST . "\r\n";
64
  $request .= "User-agent: Polldaddy PHP Client/0.1\r\n";
65
  $request .= "Content-Type: text/xml; charset=utf-8\r\n";
66
  $request .= 'Content-Length: ' . strlen( $this->request_xml ) . "\r\n";
@@ -91,6 +98,7 @@ class api_client {
91
  foreach ( $this->response->errors->error as $error )
92
  $this->errors[$error->_id] = $error->___content;
93
  }
 
94
  return true;
95
  }
96
 
@@ -284,6 +292,41 @@ function sync_rating( ){
284
  return false;
285
  }
286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  /**
288
  * @return array|false Array of Polldaddy Polls or false on failure
289
  */
3
  require_once dirname( __FILE__ ) . '/polldaddy-xml.php';
4
 
5
  class api_client {
6
+ var $polldaddy_url = 'http://api.polldaddy.com/';
7
  var $partnerGUID;
8
  var $userCode;
9
  var $admin = 0;
28
  $this->requests[] = $this->request_xml;
29
 
30
  if ( function_exists( 'wp_remote_post' ) ) {
31
+ $response = wp_remote_post( $this->polldaddy_url, array(
32
  'headers' => array( 'Content-Type' => 'text/xml; charset=utf-8', 'Content-Length' => strlen( $this->request_xml ) ),
33
  'user-agent' => 'Polldaddy PHP Client/0.1',
34
  'timeout' => $timeout,
35
  'body' => $this->request_xml
36
  ) );
 
37
  if ( !$response || is_wp_error( $response ) ) {
38
  $this->errors[-1] = "Can't connect";
39
  return false;
40
  }
41
  $this->response_xml = wp_remote_retrieve_body( $response );
42
  } else {
43
+ $parsed = parse_url( $this->polldaddy_url );
44
+
45
+ if ( !isset( $parsed['host'] ) && !isset( $parsed['scheme'] ) ) {
46
+ $this->errors[-1] = 'Invalid API URL';
47
+ return false;
48
+ }
49
+
50
  $fp = fsockopen(
51
+ $parsed['host'],
52
+ $parsed['scheme'] == 'ssl' || $parsed['scheme'] == 'https' && extension_loaded('openssl') ? 443 : 80,
53
  $err_num,
54
  $err_str,
55
  $timeout
66
  if ( !isset( $parsed['path']) || !$path = $parsed['path'] . ( isset($parsed['query']) ? '?' . $parsed['query'] : '' ) )
67
  $path = '/';
68
 
69
+ $request = "POST $path HTTP/1.0\r\n";
70
+ $request .= "Host: {$parsed['host']}\r\n";
71
  $request .= "User-agent: Polldaddy PHP Client/0.1\r\n";
72
  $request .= "Content-Type: text/xml; charset=utf-8\r\n";
73
  $request .= 'Content-Length: ' . strlen( $this->request_xml ) . "\r\n";
98
  foreach ( $this->response->errors->error as $error )
99
  $this->errors[$error->_id] = $error->___content;
100
  }
101
+
102
  return true;
103
  }
104
 
292
  return false;
293
  }
294
 
295
+ /**
296
+ * Get dashboard items from Crowdsignal platform.
297
+ *
298
+ * @param int $start Collection: start offset.
299
+ * @param int $end Collection: amount of items to get from $start.
300
+ * @param int $folder_id Folder ID to retrieve contents from.
301
+ * @param string $source_link_match If provided, retrieve only items that match the source_link.
302
+ * @return array|false Array of Polldaddy items or false on failure
303
+ */
304
+ public function get_items( $start = 0, $end = 0, $folder_id = 0, $source_link_match = '' ) {
305
+ $start = (int) $start;
306
+ $end = (int) $end;
307
+ $folder_id = (int) $folder_id;
308
+ $source_link_match = (string) $source_link_match;
309
+
310
+ if ( ! $start && ! $end && ! $folder_id && ! $source_link_match ) {
311
+ $pos = $this->add_request( 'getitems' );
312
+ } else {
313
+ $pos = $this->add_request( 'getitems', new Polldaddy_List( null, compact( 'start', 'end', 'source_link_match' ) ) );
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 ) ) {
321
+ $r->items->item = array( $r->items->item );
322
+ }
323
+ }
324
+ return $r->items;
325
+ }
326
+ return false;
327
+ }
328
+
329
+
330
  /**
331
  * @return array|false Array of Polldaddy Polls or false on failure
332
  */
polldaddy-org.php CHANGED
@@ -19,9 +19,8 @@ class WPORG_Polldaddy extends WP_Polldaddy {
19
  $this->polldaddy_client_class = 'WPORG_Polldaddy_Client';
20
  $this->use_ssl = (int) get_option( 'polldaddy_use_ssl' );
21
  $this->multiple_accounts = (bool) get_option( 'polldaddy_multiple_accounts' );
22
- $this->inline = (bool) get_option( 'polldaddy_load_poll_inline' );
23
- $this->is_author = ( ( (bool) current_user_can('edit_others_posts')) or ( $this->multiple_accounts ) );
24
- return;
25
  }
26
 
27
  function log( $message ) {
@@ -320,69 +319,81 @@ class WPORG_Polldaddy extends WP_Polldaddy {
320
  function plugin_options_add() {
321
  if ( $this->is_admin ) {
322
  $inline = '';
323
- if ( $this->inline )
324
  $inline = 'checked="checked"';
 
325
 
326
  $checked = '';
327
- if ( $this->multiple_accounts )
328
  $checked = 'checked="checked"';
 
329
 
330
  $rating_title_filter = get_option( 'pd-rating-title-filter' );
331
 
332
- if ( $rating_title_filter === false )
333
  $rating_title_filter = 'wp_title';
 
334
 
335
- ?><tr class="form-field form-required">
336
- <th valign="top" scope="row">
337
- <label for="polldaddy-load-poll-inline">
338
- <?php _e( 'Load Shortcodes Inline', 'polldaddy' ); ?>
339
- </label>
340
- </th>
341
- <td>
342
- <input type="checkbox" name="polldaddy-load-poll-inline" id="polldaddy-load-poll-inline" value="1" <?php echo $inline ?> style="width: auto" />
343
- <span class="description">
344
- <label for="polldaddy-load-poll-inline"><?php _e( 'This will load the Crowdsignal shortcodes inline rather than in the page footer.', 'polldaddy' ); ?></label>
345
- </span>
346
- </td>
347
- </tr><tr class="form-field form-required">
348
- <th valign="top" scope="row">
349
- <label for="polldaddy-multiple-accounts">
350
- <?php _e( 'Multiple Crowdsignal Accounts', 'polldaddy' ); ?>
351
- </label>
352
- </th>
353
- <td>
354
- <input type="checkbox" name="polldaddy-multiple-accounts" id="polldaddy-multiple-accounts" value="1" <?php echo $checked ?> style="width: auto" />
355
- <span class="description">
356
- <label for="polldaddy-multiple-accounts"><?php _e( 'This setting will allow each blog user to import a Crowdsignal account.', 'polldaddy' ); ?></label>
357
- </span>
358
- </td>
359
- </tr>
360
- <tr class="form-field form-required">
361
- <th valign="top" scope="row">
362
- <label for="polldaddy-sync-account">
363
- <?php _e( 'Sync Ratings Account', 'polldaddy' ); ?>
364
- </label>
365
- </th>
366
- <td>
367
- <input type="checkbox" name="polldaddy-sync-account" id="polldaddy-sync-account" value="1" style="width: auto" />
368
- <span class="description">
369
- <label for="polldaddy-sync-account"><?php _e( 'This will synchronize your ratings Crowdsignal account.', 'polldaddy' ); ?></label>
370
- </span>
371
- </td>
372
- </tr>
373
- <tr class="form-field form-required">
374
- <th valign="top" scope="row">
375
- <label for="polldaddy-ratings-title-filter">
376
- <?php _e( 'Ratings Title Filter', 'polldaddy' ); ?>
377
- </label>
378
- </th>
379
- <td>
380
- <input type="text" name="polldaddy-ratings-title-filter" id="polldaddy-ratings-title-filter" value="<?php echo esc_attr( $rating_title_filter ); ?>" style="width: auto" />
381
- <span class="description">
382
- <label for="polldaddy-ratings-title-filter"><?php _e( 'This setting allows you to specify a filter to use with your ratings title.', 'polldaddy' ); ?></label>
383
- </span>
384
- </td>
385
- </tr><?php }
 
 
 
 
 
 
 
 
 
386
  return parent::plugin_options_add();
387
  }
388
  }
19
  $this->polldaddy_client_class = 'WPORG_Polldaddy_Client';
20
  $this->use_ssl = (int) get_option( 'polldaddy_use_ssl' );
21
  $this->multiple_accounts = (bool) get_option( 'polldaddy_multiple_accounts' );
22
+ $this->inline = (bool) get_option( 'polldaddy_load_poll_inline' );
23
+ $this->is_author = ( ( (bool) current_user_can( 'edit_others_posts' ) ) || ( $this->multiple_accounts ) );
 
24
  }
25
 
26
  function log( $message ) {
319
  function plugin_options_add() {
320
  if ( $this->is_admin ) {
321
  $inline = '';
322
+ if ( $this->inline ) {
323
  $inline = 'checked="checked"';
324
+ }
325
 
326
  $checked = '';
327
+ if ( $this->multiple_accounts ) {
328
  $checked = 'checked="checked"';
329
+ }
330
 
331
  $rating_title_filter = get_option( 'pd-rating-title-filter' );
332
 
333
+ if ( $rating_title_filter === false ) {
334
  $rating_title_filter = 'wp_title';
335
+ }
336
 
337
+ ?>
338
+ <tr class="form-field form-required">
339
+ <th valign="top" scope="row">
340
+ <label for="polldaddy-load-poll-inline"><?php esc_html_e( 'Load Shortcodes Inline', 'polldaddy' ); ?></label>
341
+ </th>
342
+ <td>
343
+ <input type="checkbox" name="polldaddy-load-poll-inline" id="polldaddy-load-poll-inline" value="1" <?php echo $inline ?> style="width: auto" />
344
+ <span class="description">
345
+ <label for="polldaddy-load-poll-inline"><?php esc_html_e( 'This will load the Crowdsignal shortcodes inline rather than in the page footer.', 'polldaddy' ); ?></label>
346
+ </span>
347
+ </td>
348
+ </tr>
349
+ <?php
350
+ if ( $this->multiple_accounts ) {
351
+ ?>
352
+ <tr class="form-field form-required">
353
+ <th valign="top" scope="row">
354
+ <label for="polldaddy-multiple-accounts"><?php esc_html_e( 'Multiple Crowdsignal Accounts', 'polldaddy' ); ?></label>
355
+ </th>
356
+ <td>
357
+ <input type="checkbox" name="polldaddy-multiple-accounts" id="polldaddy-multiple-accounts" value="1" <?php echo $checked ?> style="width: auto" />
358
+ <span class="description">
359
+ <label for="polldaddy-multiple-accounts">
360
+ <?php esc_html_e( 'This setting will allow each blog user to import a Crowdsignal account.', 'polldaddy' ); ?>
361
+ <br />
362
+ <strong>
363
+ <?php esc_html_e( 'Warning', 'polldaddy' ); ?>
364
+ <?php esc_html_e( 'This is a deprecated feature and is not supported anymore. If you disable this Multi User Access you won\'t be able to activate it again.', 'polldaddy' ); ?>
365
+ </strong>
366
+
367
+ </label>
368
+ </span>
369
+ </td>
370
+ </tr>
371
+ <?php
372
+ }
373
+ ?>
374
+ <tr class="form-field form-required">
375
+ <th valign="top" scope="row">
376
+ <label for="polldaddy-sync-account"><?php esc_html_e( 'Sync Ratings Account', 'polldaddy' ); ?></label>
377
+ </th>
378
+ <td>
379
+ <input type="checkbox" name="polldaddy-sync-account" id="polldaddy-sync-account" value="1" style="width: auto" />
380
+ <span class="description">
381
+ <label for="polldaddy-sync-account"><?php esc_html_e( 'This will synchronize your ratings Crowdsignal account.', 'polldaddy' ); ?></label>
382
+ </span>
383
+ </td>
384
+ </tr>
385
+ <tr class="form-field form-required">
386
+ <th valign="top" scope="row">
387
+ <label for="polldaddy-ratings-title-filter"><?php esc_html_e( 'Ratings Title Filter', 'polldaddy' ); ?></label>
388
+ </th>
389
+ <td>
390
+ <input type="text" name="polldaddy-ratings-title-filter" id="polldaddy-ratings-title-filter" value="<?php echo esc_attr( $rating_title_filter ); ?>" style="width: auto" />
391
+ <span class="description">
392
+ <label for="polldaddy-ratings-title-filter"><?php esc_html_e( 'This setting allows you to specify a filter to use with your ratings title.', 'polldaddy' ); ?></label>
393
+ </span>
394
+ </td>
395
+ </tr>
396
+ <?php }
397
  return parent::plugin_options_add();
398
  }
399
  }
polldaddy-xml.php CHANGED
@@ -1,786 +1,836 @@
1
- <?php
2
-
3
- class Ghetto_XML_Object {
4
- function __construct( $args = null, $attributes = null ) {
5
- if ( get_object_vars( $this ) )
6
- $this->___restrict = true;
7
- else
8
- $this->___restrict = false;
9
-
10
- if ( !is_null( $args ) )
11
- $this->set_args( $args );
12
- if ( !is_array( $attributes ) )
13
- return false;
14
-
15
- $atts = array();
16
- foreach ( $attributes as $key => $value )
17
- $atts["_$key"] = $value;
18
-
19
- $this->set_args( $atts );
20
- }
21
-
22
- function xml( $prepend_ns = true, $pad = 0 ) {
23
- $x = '';
24
- $atts = get_object_vars( $this );
25
-
26
- $ns = $atts['___ns'];
27
- if ( $prepend_ns )
28
- $name = "$ns:{$atts['___name']}";
29
- else
30
- $name = $atts['___name'];
31
-
32
- $_prepend_ns = $prepend_ns;
33
-
34
- $prepend_ns = 'all' === $prepend_ns;
35
-
36
- // added this to remove the Warning ( PHP Notice: Undefined index ) in following condition
37
- if ( !isset( $atts['___cdata'] ) )
38
- $atts['___cdata'] = '';
39
-
40
- if ( !$cdata = $atts['___cdata'] )
41
- $cdata = array();
42
-
43
- $x = "<$name";
44
-
45
- if ( isset( $atts['___content'] ) ) {
46
- $inner = in_array( '___content', $cdata ) ? '<![CDATA[' . $atts['___content'] . ']]>' : $atts['___content'];
47
- $empty = false;
48
- } else {
49
- $inner = "\n";
50
- $empty = true;
51
- }
52
-
53
- unset($atts['___ns'], $atts['___name'], $atts['___content'], $atts['___ns_full'], $atts['___restrict'], $atts['___cdata']);
54
-
55
- $_pad = str_repeat( "\t", $pad + 1 );
56
-
57
- foreach ( $atts as $key => $value ) {
58
- if ( is_null( $value ) )
59
- continue;
60
- if ( '_' == $key[0] ) {
61
- $key = substr( $key, 1 );
62
- $x .= " $key='$value'";
63
- continue;
64
- }
65
-
66
- $_key = $key;
67
- if ( $prepend_ns )
68
- $key = "$ns:$key";
69
-
70
- $empty = false;
71
- if ( false === $value ) {
72
- $inner .= "$_pad<$key />\n";
73
- }
74
- elseif ( is_array( $value ) ) {
75
- foreach ( $value as $array_value ) {
76
- if ( is_a( $array_value, 'Ghetto_XML_Object' ) )
77
- $inner .= $_pad . $array_value->xml( $_prepend_ns, $pad + 1 ) . "\n";
78
- else
79
- $inner .= in_array( $_key, $cdata ) ? "$_pad<$key>" . '<![CDATA[' . $array_value . ']]>' . "</$key>\n" : "$_pad<$key>$array_value</$key>\n";
80
- }
81
- }
82
- else {
83
- if ( is_a( $value, 'Ghetto_XML_Object' ) )
84
- $inner .= $_pad . $value->xml( $_prepend_ns, $pad + 1 ) . "\n";
85
- else{
86
- $inner .= in_array( $_key, $cdata ) ? "$_pad<$key>" . '<![CDATA[' . $value . ']]>' . "</$key>\n" : "$_pad<$key>$value</$key>\n";
87
- }
88
- }
89
- }
90
- if ( $empty )
91
- return $x . ' />';
92
- if ( "\n" == substr( $inner, -1 ) )
93
- $inner .= str_repeat( "\t", $pad );
94
-
95
- return $x . ">$inner</$name>";
96
- }
97
-
98
- function set_args( $array ) {
99
- if ( is_scalar( $array ) ) {
100
- $this->___content = $array;
101
- return;
102
- }
103
-
104
- $atts = get_object_vars( $this );
105
- foreach ( $array as $key => $value ) {
106
- if ( 0 === strpos( $key, $this->___ns_full ) )
107
- $key = substr( $key, strlen( $this->___ns_full ) + 1 );
108
- if ( is_null( $value ) || ( $this->___restrict && ! array_key_exists( $key, $atts ) ) )
109
- continue;
110
-
111
- $this->$key = $value;
112
- }
113
- }
114
- }
115
-
116
- class Polldaddy_XML_Object extends Ghetto_XML_Object {
117
- var $___ns;
118
- var $___ns_full;
119
-
120
- function __construct( $args = null, $attributes = null ) {
121
- $this->___ns = 'pd';
122
- $this->___ns_full = polldaddy_api_url( '/pdapi.xsd' );
123
-
124
- parent::__construct( $args, $attributes );
125
- }
126
- }
127
-
128
- class Polldaddy_XML_Root extends Polldaddy_XML_Object {
129
- function xml( $prepend_ns = true, $pad = 0 ) {
130
- $xml = parent::xml( $prepend_ns, $pad );
131
- if ( !$pad ) {
132
- $pos = strpos( $xml, '>' );
133
- $xml = substr_replace( $xml, " xmlns:$this->___ns='$this->___ns_full'", $pos, 0 );
134
- }
135
- return $xml;
136
- }
137
- }
138
-
139
- class Polldaddy_Access extends Polldaddy_XML_Root {
140
- var $___name = 'pdAccess';
141
-
142
- var $_partnerGUID;
143
- var $_partnerUserID;
144
-
145
- var $demands;
146
- }
147
-
148
- class Polldaddy_Initiate extends Polldaddy_XML_Root {
149
- var $___cdata = array( 'Email', 'Password' );
150
- var $___name = 'pdInitiate';
151
-
152
- var $_partnerGUID;
153
- var $_partnerUserID;
154
-
155
- var $Email;
156
- var $Password;
157
- }
158
-
159
- class Polldaddy_Request extends Polldaddy_XML_Root {
160
- var $___name = 'pdRequest';
161
-
162
- var $_partnerGUID;
163
- var $_version;
164
- var $_admin;
165
-
166
- var $userCode;
167
- var $demands;
168
- }
169
-
170
- class Polldaddy_Response extends Polldaddy_XML_Root {
171
- var $___name = 'pdResponse';
172
-
173
- var $_partnerGUID;
174
- var $_partnerUserID;
175
-
176
- var $userCode;
177
- var $demands;
178
- var $errors;
179
- var $queries;
180
- }
181
-
182
- class Polldaddy_Errors extends Polldaddy_XML_Object {
183
- var $___name = 'errors';
184
-
185
- var $error;
186
- }
187
-
188
- class Polldaddy_Error extends Polldaddy_XML_Object {
189
- var $___cdata = array( '___content' );
190
- var $___name = 'error';
191
-
192
- var $___content;
193
-
194
- var $_id;
195
- }
196
-
197
- class Polldaddy_Queries extends Polldaddy_XML_Object {
198
- var $___name = 'queries';
199
-
200
- var $query;
201
- }
202
-
203
- class Polldaddy_Query extends Polldaddy_XML_Object {
204
- var $___cdata = array( 'text' );
205
- var $___name = 'query';
206
-
207
- var $_id;
208
-
209
- var $time;
210
- var $text;
211
- var $caller;
212
- }
213
-
214
- class Polldaddy_Demands extends Polldaddy_XML_Object {
215
- var $___name = 'demands';
216
-
217
- var $demand;
218
- }
219
-
220
- class Polldaddy_Demand extends Polldaddy_XML_Object {
221
- var $___name = 'demand';
222
-
223
- var $_id;
224
-
225
- var $account;
226
- var $poll;
227
- var $polls;
228
- var $emailAddress;
229
- var $message;
230
- var $list;
231
- var $search;
232
- var $result;
233
- var $comments; //need to add an request object for each new type
234
- var $comment;
235
- var $extensions;
236
- var $folders;
237
- var $styles;
238
- var $style;
239
- var $packs;
240
- var $pack;
241
- var $languages;
242
- var $activity;
243
- var $rating_result;
244
- var $rating;
245
- var $nonce;
246
- var $partner;
247
- var $media;
248
- }
249
-
250
- class Polldaddy_Partner extends Polldaddy_XML_Object {
251
- var $___cdata = array( 'name' );
252
- var $___name = 'partner';
253
-
254
- var $_role;
255
- var $_users;
256
-
257
- var $name;
258
- }
259
-
260
- class Polldaddy_Account extends Polldaddy_XML_Object {
261
- var $___cdata = array( 'userName', 'email', 'password', 'firstName', 'lastName', 'websiteURL', 'avatarURL', 'bio' );
262
- var $___name = 'account';
263
-
264
- var $userName;
265
- var $email;
266
- var $password;
267
- var $firstName;
268
- var $lastName;
269
- var $countryCode;
270
- var $gender;
271
- var $yearOfBirth;
272
- var $websiteURL;
273
- var $avatarURL;
274
- var $bio;
275
- var $src;
276
- }
277
-
278
- class Polldaddy_List extends Polldaddy_XML_Object {
279
- var $___name = 'list';
280
-
281
- var $_start;
282
- var $_end;
283
- var $_id;
284
-
285
- var $period;
286
- }
287
-
288
- class Polldaddy_Polls extends Polldaddy_XML_Object {
289
- var $___name = 'polls';
290
-
291
- var $_total;
292
-
293
- var $poll;
294
- }
295
-
296
- class Polldaddy_Search extends Polldaddy_XML_Object {
297
- var $___cdata = array( '___content' );
298
- var $___name = 'search';
299
-
300
- var $___content;
301
-
302
- var $poll;
303
- }
304
-
305
- class Polldaddy_Poll extends Polldaddy_XML_Object {
306
- var $___cdata = array( '___content', 'question', 'mediaCode', 'url' );
307
- var $___name = 'poll';
308
-
309
- var $___content;
310
-
311
- var $_id;
312
- var $_created;
313
- var $_responses;
314
- var $_folderID;
315
- var $_owner;
316
- var $_closed;
317
-
318
- var $question;
319
- var $multipleChoice;
320
- var $randomiseAnswers;
321
- var $otherAnswer;
322
- var $resultsType;
323
- var $blockRepeatVotersType;
324
- var $blockExpiration;
325
- var $comments;
326
- var $makePublic;
327
- var $closePoll;
328
- var $closePollNow;
329
- var $closeDate;
330
- var $styleID;
331
- var $packID;
332
- var $folderID;
333
- var $languageID;
334
- var $parentID;
335
- var $keyword;
336
- var $sharing;
337
- var $rank;
338
- var $url;
339
- var $choices;
340
- var $mediaType; // new
341
- var $mediaCode; // new
342
- var $answers;
343
- }
344
-
345
- class Polldaddy_Poll_Result extends Polldaddy_XML_Object {
346
- var $___name = 'result';
347
-
348
- var $_id;
349
-
350
- var $answers;
351
- var $otherAnswers;
352
- }
353
-
354
- class Polldaddy_Poll_Answers extends Polldaddy_XML_Object {
355
- var $___name = 'answers';
356
-
357
- var $answer;
358
- }
359
-
360
- class Polldaddy_Poll_Answer extends Polldaddy_XML_Object {
361
- var $___cdata = array( '___content', 'text', 'mediaCode' );
362
- var $___name = 'answer';
363
-
364
- var $_id;
365
- var $_total;
366
- var $_percent;
367
-
368
- var $___content;
369
-
370
- var $text; //removed ___content and replaced it with text node
371
- var $mediaType; // new
372
- var $mediaCode; // new
373
- }
374
-
375
- class Polldaddy_Other_Answers extends Polldaddy_XML_Object {
376
- var $___name = 'otherAnswers';
377
-
378
- var $otherAnswer;
379
- }
380
-
381
- class Polldaddy_Other_Answer extends Polldaddy_XML_Object {
382
- var $___cdata = array( '___content' );
383
- var $___name = 'otherAnswer';
384
-
385
- var $___content;
386
- }
387
-
388
- class Polldaddy_Comments extends Polldaddy_XML_Object {
389
- var $___cdata = array( '___content' );
390
- var $___name = 'comments';
391
-
392
- var $___content;
393
-
394
- var $_id;
395
-
396
- var $comment;
397
- }
398
-
399
- class Polldaddy_Comment extends Polldaddy_XML_Object {
400
- var $___cdata = array( 'name', 'email', 'text', 'url' );
401
- var $___name = 'comment';
402
-
403
- var $_id; //_ means variable corresponds to an attribute
404
- var $_method;
405
- var $_type;
406
-
407
- var $poll; // without _ means variable corresponds to an element
408
- var $name;
409
- var $email;
410
- var $text;
411
- var $url;
412
- var $date;
413
- var $ip;
414
- }
415
-
416
- class Polldaddy_Extensions extends Polldaddy_XML_Object {
417
- var $___name = 'extensions';
418
-
419
- var $folders;
420
- var $styles;
421
- var $packs;
422
- var $languages;
423
- }
424
-
425
- class Polldaddy_Folders extends Polldaddy_XML_Object {
426
- var $___name = 'folders';
427
-
428
- var $folder;
429
- }
430
-
431
- class Polldaddy_Folder extends Polldaddy_XML_Object {
432
- var $___cdata = array( '___content' );
433
- var $___name = 'folder';
434
-
435
- var $___content;
436
-
437
- var $_id;
438
- }
439
-
440
- class Polldaddy_Styles extends Polldaddy_XML_Object {
441
- var $___name = 'styles';
442
-
443
- var $style;
444
- }
445
-
446
- class Polldaddy_Style extends Polldaddy_XML_Object {
447
- var $___cdata = array( 'title', 'css' );
448
- var $___name = 'style';
449
-
450
- var $_id;
451
- var $_type;
452
- var $_retro;
453
- var $_direction;
454
-
455
- var $title;
456
- var $date;
457
- var $css;
458
- }
459
-
460
- class Polldaddy_Packs extends Polldaddy_XML_Object {
461
- var $___name = 'packs';
462
-
463
- var $pack;
464
- }
465
-
466
- class Polldaddy_Pack extends Polldaddy_XML_Object {
467
- var $___name = 'pack';
468
-
469
- var $_id;
470
- var $_date;
471
- var $_retro;
472
-
473
- var $pack;
474
- }
475
-
476
- class Custom_Pack extends Polldaddy_XML_Object {
477
- var $___name = 'pack';
478
-
479
- var $_type = 'user'; //type attribute is constant (for now)
480
-
481
- var $title;
482
- var $phrase;
483
-
484
- function xml( $prepend_ns = true, $pad = 0 ) {
485
- $xml = parent::xml( false, $pad );
486
- return $xml;
487
- }
488
- }
489
-
490
- class Custom_Pack_Phrase extends Polldaddy_XML_Object {
491
- var $___cdata = array( '___content' );
492
- var $___name = 'phrase';
493
-
494
- var $___content;
495
-
496
- var $_phraseID;
497
-
498
- function xml( $prepend_ns = true, $pad = 0 ) {
499
- $xml = parent::xml( false, $pad );
500
- return $xml;
501
- }
502
- }
503
-
504
- class Polldaddy_Languages extends Polldaddy_XML_Object {
505
- var $___name = 'languages';
506
-
507
- var $language;
508
- }
509
-
510
- class Polldaddy_Language extends Polldaddy_XML_Object {
511
- var $___cdata = array( '___content' );
512
- var $___name = 'language';
513
-
514
- var $___content;
515
-
516
- var $_id;
517
- }
518
-
519
- class Polldaddy_Activity extends Polldaddy_XML_Object {
520
- var $___cdata = array( '___content' );
521
- var $___name = 'activity';
522
-
523
- var $___content;
524
- }
525
-
526
- class Polldaddy_Nonce extends Polldaddy_XML_Object {
527
- var $___cdata = array( 'text', 'action' );
528
- var $___name = 'nonce';
529
-
530
- var $text;
531
- var $action;
532
- var $userCode;
533
- }
534
-
535
- class Polldaddy_Rating_Result extends Polldaddy_XML_Object {
536
- var $___name = 'rating_result';
537
-
538
- var $_id;
539
-
540
- var $ratings;
541
- }
542
-
543
- class Polldaddy_Ratings extends Polldaddy_XML_Object {
544
- var $___name = 'ratings';
545
-
546
- var $_total;
547
- var $rating;
548
- }
549
-
550
- class Polldaddy_Rating extends Polldaddy_XML_Object {
551
- var $___name = 'rating';
552
- var $___cdata = array( 'settings', 'name', 'title', 'permalink' );
553
-
554
- var $_id;
555
-
556
- var $_type;
557
- var $_votes;
558
- var $uid;
559
- var $total1;
560
- var $total2;
561
- var $total3;
562
- var $total4;
563
- var $total5;
564
- var $average_rating;
565
- var $date;
566
- var $title;
567
- var $permalink;
568
-
569
- var $name;
570
- var $folder_id;
571
- var $settings;
572
- }
573
-
574
- class Polldaddy_Email extends Polldaddy_XML_Object {
575
- var $___cdata = array( 'custom' );
576
- var $___name = 'emailAddress';
577
-
578
- var $_id;
579
- var $_owner;
580
-
581
- var $folderID;
582
- var $address;
583
- var $firstname;
584
- var $lastname;
585
- var $custom;
586
- var $status;
587
- }
588
-
589
- class Polldaddy_Email_Message extends Polldaddy_XML_Object {
590
- var $___cdata = array( 'text' );
591
- var $___name = 'message';
592
-
593
- var $_id;
594
- var $_owner;
595
-
596
- var $text;
597
- var $groups;
598
- }
599
-
600
- class Polldaddy_Media extends Polldaddy_XML_Object {
601
- var $___cdata = array( 'name', 'data', 'type', 'upload_result', 'img', 'img_small', 'url' );
602
- var $___name = 'media';
603
-
604
- var $_size;
605
- var $_id;
606
-
607
- var $name;
608
- var $type;
609
- var $ext;
610
- var $data;
611
- var $upload_result;
612
- var $img;
613
- var $img_small;
614
- var $url;
615
- }
616
-
617
- class Polldaddy_XML_Parser {
618
- var $parser;
619
- var $polldaddy_objects = array(
620
- 'pdapi.xsd:pdAccess' => 'Polldaddy_Access',
621
- 'pdapi.xsd:pdInitiate' => 'Polldaddy_Initiate',
622
- 'pdapi.xsd:pdRequest' => 'Polldaddy_Request',
623
- 'pdapi.xsd:pdResponse' => 'Polldaddy_Response',
624
- 'pdapi.xsd:errors' => 'Polldaddy_Errors',
625
- 'pdapi.xsd:error' => 'Polldaddy_Error',
626
- 'pdapi.xsd:demands' => 'Polldaddy_Demands',
627
- 'pdapi.xsd:demand' => 'Polldaddy_Demand',
628
- 'pdapi.xsd:queries' => 'Polldaddy_Queries',
629
- 'pdapi.xsd:query' => 'Polldaddy_Query',
630
- 'pdapi.xsd:account' => 'Polldaddy_Account',
631
- 'pdapi.xsd:list' => 'Polldaddy_List',
632
- 'pdapi.xsd:polls' => 'Polldaddy_Polls',
633
- 'pdapi.xsd:search' => 'Polldaddy_Search',
634
- 'pdapi.xsd:poll' => 'Polldaddy_Poll',
635
- 'pdapi.xsd:emailAddress' => 'Polldaddy_Email',
636
- 'pdapi.xsd:message' => 'Polldaddy_Email_Message',
637
- 'pdapi.xsd:answers' => 'Polldaddy_Poll_Answers',
638
- 'pdapi.xsd:answer' => 'Polldaddy_Poll_Answer',
639
- 'pdapi.xsd:otherAnswers' => 'Polldaddy_Other_Answers',
640
- 'pdapi.xsd:result' => 'Polldaddy_Poll_Result',
641
- 'pdapi.xsd:comments' => 'Polldaddy_Comments',
642
- 'pdapi.xsd:comment' => 'Polldaddy_Comment',
643
- 'pdapi.xsd:extensions' => 'Polldaddy_Extensions',
644
- 'pdapi.xsd:folders' => 'Polldaddy_Folders',
645
- 'pdapi.xsd:folder' => 'Polldaddy_Folder',
646
- 'pdapi.xsd:styles' => 'Polldaddy_Styles',
647
- 'pdapi.xsd:style' => 'Polldaddy_Style',
648
- 'pdapi.xsd:packs' => 'Polldaddy_Packs',
649
- 'pdapi.xsd:pack' => 'Polldaddy_Pack',
650
- 'pdapi.xsd:languages' => 'Polldaddy_Languages',
651
- 'pdapi.xsd:language' => 'Polldaddy_Language',
652
- 'pdapi.xsd:activity' => 'Polldaddy_Activity',
653
- 'pdapi.xsd:rating_result' => 'Polldaddy_Rating_Result',
654
- 'pdapi.xsd:ratings' => 'Polldaddy_Ratings',
655
- 'pdapi.xsd:rating' => 'Polldaddy_Rating',
656
- 'pdapi.xsd:nonce' => 'Polldaddy_Nonce',
657
- 'pdapi.xsd:partner' => 'Polldaddy_Partner',
658
- 'pdapi.xsd:media' => 'Polldaddy_Media',
659
- 'pack' => 'Custom_Pack',
660
- 'phrase' => 'Custom_Pack_Phrase'
661
- );// the parser matches the tag names to the class name and creates an object defined by that class
662
-
663
- function get_polldaddy_object( $tag ) {
664
- preg_match(
665
- sprintf( '#%s/(.*)#', polldaddy_api_url( '/' ) ),
666
- $tag,
667
- $matches
668
- );
669
-
670
- if ( ! empty( $matches ) && array_key_exists( $matches[ 1 ], $this->polldaddy_objects ) ) {
671
- return $this->polldaddy_objects[ $matches[ 1 ] ];
672
- }
673
-
674
- if ( array_key_exists( $tag, $this->polldaddy_objects ) ) {
675
- return $this->polldaddy_objects[ $tag ];
676
- }
677
-
678
- return null;
679
- }
680
-
681
- var $object_stack = array();
682
- var $object_pos = null;
683
-
684
- var $objects = array();
685
-
686
- function __construct( $xml = null ) {
687
- if ( is_null( $xml ) )
688
- return;
689
-
690
- return $this->parse( $xml );
691
- }
692
-
693
- function parse( $xml ) {
694
- $this->parser = xml_parser_create_ns( 'UTF-8' );
695
- xml_set_object( $this->parser, $this );
696
- xml_set_element_handler( $this->parser, 'tag_open', 'tag_close' );
697
- xml_set_character_data_handler( $this->parser, 'text' );
698
- xml_parser_set_option( $this->parser, XML_OPTION_CASE_FOLDING, 0 );
699
- xml_parser_set_option( $this->parser, XML_OPTION_SKIP_WHITE, 1 );
700
- xml_parse( $this->parser, $xml );
701
- xml_parser_free( $this->parser );
702
- return $this->objects;
703
- }
704
-
705
- function tag_open( &$parser, $tag, $attributes ) {
706
- $object_pos = $this->object_pos;
707
- if ( $this->object_stack ) {
708
- if ( isset( $this->object_stack[$object_pos]['args'][$tag] ) ) {
709
- if ( is_array( $this->object_stack[$object_pos]['args'][$tag] ) ) {
710
- $this->object_stack[$object_pos]['args'][$tag][] = false;
711
- } else {
712
- $this->object_stack[$object_pos]['args'][$tag] = array( $this->object_stack[$object_pos]['args'][$tag], false );
713
- }
714
- end( $this->object_stack[$object_pos]['args'][$tag] );
715
- $this->object_stack[$object_pos]['args_tag_pos'] = key( $this->object_stack[$object_pos]['args'][$tag] );
716
- } else {
717
- $this->object_stack[$object_pos]['args'][$tag] = false;
718
- }
719
- $this->object_stack[$object_pos]['args_tag'] = $tag;
720
- }
721
-
722
- if ( $this->get_polldaddy_object( $tag ) ) {
723
- $this->object_stack[] = array(
724
- 'tag' => $tag,
725
- 'atts' => $attributes,
726
- 'args' => array(),
727
- 'parent' => $this->object_pos,
728
- 'args_tag' => null,
729
- 'args_tag_pos' => null
730
- );
731
- end( $this->object_stack );
732
- $this->object_pos = key( $this->object_stack );
733
- }
734
- }
735
-
736
- function text( &$parser, $text ) {
737
- if ( !$this->object_stack )
738
- return;
739
-
740
- $text = trim( $text );
741
- if ( !strlen( $text ) )
742
- return;
743
-
744
- if ( $this->object_stack[$this->object_pos]['args_tag_pos'] ) {
745
- if ( isset($this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']]) )
746
- $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] .= $text;
747
- else
748
- $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] = $text;
749
- } elseif ( $this->object_stack[$this->object_pos]['args_tag'] ) {
750
- if ( isset($this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']]) )
751
- $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] .= $text;
752
- else
753
- $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] = $text;
754
- } else {
755
- if ( isset($this->object_stack[$this->object_pos]['args']['___content']) )
756
- $this->object_stack[$this->object_pos]['args']['___content'] .= $text;
757
- else
758
- $this->object_stack[$this->object_pos]['args']['___content'] = $text;
759
- }
760
- }
761
-
762
- function tag_close( &$parser, $tag ) {
763
- if ( $this->get_polldaddy_object( $tag ) ) {
764
- if ( $tag !== $this->object_stack[$this->object_pos]['tag'] )
765
- die( 'damn' );
766
-
767
- $new = $this->get_polldaddy_object( $tag );
768
- $new_object = new $new( $this->object_stack[$this->object_pos]['args'], $this->object_stack[$this->object_pos]['atts'] );
769
-
770
- if ( is_numeric( $this->object_stack[$this->object_pos]['parent'] ) ) {
771
- $this->object_pos = $this->object_stack[$this->object_pos]['parent'];
772
- if ( $this->object_stack[$this->object_pos]['args_tag_pos'] ) {
773
- $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] = $new_object;
774
- } elseif ( $this->object_stack[$this->object_pos]['args_tag'] ) {
775
- $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] = $new_object;
776
- }
777
- } else {
778
- $this->object_pos = null;
779
- $this->objects[] = $new_object;
780
- }
781
-
782
- array_pop( $this->object_stack );
783
- }
784
- }
785
- }
786
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
+
3
+ class Ghetto_XML_Object {
4
+ function __construct( $args = null, $attributes = null ) {
5
+ if ( get_object_vars( $this ) )
6
+ $this->___restrict = true;
7
+ else
8
+ $this->___restrict = false;
9
+
10
+ if ( !is_null( $args ) )
11
+ $this->set_args( $args );
12
+ if ( !is_array( $attributes ) )
13
+ return false;
14
+
15
+ $atts = array();
16
+ foreach ( $attributes as $key => $value )
17
+ $atts["_$key"] = $value;
18
+
19
+ $this->set_args( $atts );
20
+ }
21
+
22
+ function xml( $prepend_ns = true, $pad = 0 ) {
23
+ $x = '';
24
+ $atts = get_object_vars( $this );
25
+
26
+ $ns = $atts['___ns'];
27
+ if ( $prepend_ns )
28
+ $name = "$ns:{$atts['___name']}";
29
+ else
30
+ $name = $atts['___name'];
31
+
32
+ $_prepend_ns = $prepend_ns;
33
+
34
+ $prepend_ns = 'all' === $prepend_ns;
35
+
36
+ // added this to remove the Warning ( PHP Notice: Undefined index ) in following condition
37
+ if ( !isset( $atts['___cdata'] ) )
38
+ $atts['___cdata'] = '';
39
+
40
+ if ( !$cdata = $atts['___cdata'] )
41
+ $cdata = array();
42
+
43
+ $x = "<$name";
44
+
45
+ if ( isset( $atts['___content'] ) ) {
46
+ $inner = in_array( '___content', $cdata ) ? '<![CDATA[' . $atts['___content'] . ']]>' : $atts['___content'];
47
+ $empty = false;
48
+ } else {
49
+ $inner = "\n";
50
+ $empty = true;
51
+ }
52
+
53
+ unset($atts['___ns'], $atts['___name'], $atts['___content'], $atts['___ns_full'], $atts['___restrict'], $atts['___cdata']);
54
+
55
+ $_pad = str_repeat( "\t", $pad + 1 );
56
+
57
+ foreach ( $atts as $key => $value ) {
58
+ if ( is_null( $value ) )
59
+ continue;
60
+ if ( '_' == $key[0] ) {
61
+ $key = substr( $key, 1 );
62
+ $x .= " $key='$value'";
63
+ continue;
64
+ }
65
+
66
+ $_key = $key;
67
+ if ( $prepend_ns )
68
+ $key = "$ns:$key";
69
+
70
+ $empty = false;
71
+ if ( false === $value ) {
72
+ $inner .= "$_pad<$key />\n";
73
+ } elseif ( is_array( $value ) ) {
74
+ foreach ( $value as $array_value ) {
75
+ if ( is_a( $array_value, 'Ghetto_XML_Object' ) )
76
+ $inner .= $_pad . $array_value->xml( $_prepend_ns, $pad + 1 ) . "\n";
77
+ else
78
+ $inner .= in_array( $_key, $cdata ) ? "$_pad<$key>" . '<![CDATA[' . $array_value . ']]>' . "</$key>\n" : "$_pad<$key>$array_value</$key>\n";
79
+ }
80
+ } else {
81
+ if ( is_a( $value, 'Ghetto_XML_Object' ) )
82
+ $inner .= $_pad . $value->xml( $_prepend_ns, $pad + 1 ) . "\n";
83
+ else{
84
+ $inner .= in_array( $_key, $cdata ) ? "$_pad<$key>" . '<![CDATA[' . $value . ']]>' . "</$key>\n" : "$_pad<$key>$value</$key>\n";
85
+ }
86
+ }
87
+ }
88
+ if ( $empty )
89
+ return $x . ' />';
90
+ if ( "\n" == substr( $inner, -1 ) )
91
+ $inner .= str_repeat( "\t", $pad );
92
+
93
+ return $x . ">$inner</$name>";
94
+ }
95
+
96
+ function set_args( $array ) {
97
+ if ( is_scalar( $array ) ) {
98
+ $this->___content = $array;
99
+ return;
100
+ }
101
+
102
+ $atts = get_object_vars( $this );
103
+ foreach ( $array as $key => $value ) {
104
+ if ( 0 === strpos( $key, $this->___ns_full ) )
105
+ $key = substr( $key, strlen( $this->___ns_full ) + 1 );
106
+ if ( is_null( $value ) || ( $this->___restrict && !array_key_exists( $key, $atts ) ) )
107
+ continue;
108
+
109
+ $this->$key = $value;
110
+ }
111
+ }
112
+ }
113
+
114
+ class Polldaddy_XML_Object extends Ghetto_XML_Object {
115
+ var $___ns = 'pd';
116
+ var $___ns_full = 'http://api.polldaddy.com/pdapi.xsd';
117
+ }
118
+
119
+ class Polldaddy_XML_Root extends Polldaddy_XML_Object {
120
+ function xml( $prepend_ns = true, $pad = 0 ) {
121
+ $xml = parent::xml( $prepend_ns, $pad );
122
+ if ( !$pad ) {
123
+ $pos = strpos( $xml, '>' );
124
+ $xml = substr_replace( $xml, " xmlns:$this->___ns='$this->___ns_full'", $pos, 0 );
125
+ }
126
+ return $xml;
127
+ }
128
+ }
129
+
130
+ class Polldaddy_Access extends Polldaddy_XML_Root {
131
+ var $___name = 'pdAccess';
132
+
133
+ var $_partnerGUID;
134
+ var $_partnerUserID;
135
+
136
+ var $demands;
137
+ }
138
+
139
+ class Polldaddy_Initiate extends Polldaddy_XML_Root {
140
+ var $___cdata = array( 'Email', 'Password' );
141
+ var $___name = 'pdInitiate';
142
+
143
+ var $_partnerGUID;
144
+ var $_partnerUserID;
145
+
146
+ var $Email;
147
+ public $Password; // phpcs:ignore -- legacy code
148
+ }
149
+
150
+ class Polldaddy_Request extends Polldaddy_XML_Root {
151
+ var $___name = 'pdRequest';
152
+
153
+ var $_partnerGUID;
154
+ var $_version;
155
+ var $_admin;
156
+
157
+ var $userCode;
158
+ var $demands;
159
+ }
160
+
161
+ class Polldaddy_Response extends Polldaddy_XML_Root {
162
+ var $___name = 'pdResponse';
163
+
164
+ var $_partnerGUID;
165
+ var $_partnerUserID;
166
+
167
+ var $userCode;
168
+ var $demands;
169
+ var $errors;
170
+ var $queries;
171
+ }
172
+
173
+ class Polldaddy_Errors extends Polldaddy_XML_Object {
174
+ var $___name = 'errors';
175
+
176
+ var $error;
177
+ }
178
+
179
+ class Polldaddy_Error extends Polldaddy_XML_Object {
180
+ var $___cdata = array( '___content' );
181
+ var $___name = 'error';
182
+
183
+ var $___content;
184
+
185
+ var $_id;
186
+ }
187
+
188
+ class Polldaddy_Queries extends Polldaddy_XML_Object {
189
+ var $___name = 'queries';
190
+
191
+ var $query;
192
+ }
193
+
194
+ class Polldaddy_Query extends Polldaddy_XML_Object {
195
+ var $___cdata = array( 'text' );
196
+ var $___name = 'query';
197
+
198
+ var $_id;
199
+
200
+ var $time;
201
+ var $text;
202
+ var $caller;
203
+ }
204
+
205
+ class Polldaddy_Demands extends Polldaddy_XML_Object {
206
+ var $___name = 'demands';
207
+
208
+ var $demand;
209
+ }
210
+
211
+ class Polldaddy_Demand extends Polldaddy_XML_Object {
212
+ var $___name = 'demand';
213
+
214
+ var $_id;
215
+
216
+ var $account;
217
+ var $poll;
218
+ var $polls;
219
+ var $emailAddress;
220
+ var $message;
221
+ var $list;
222
+ var $search;
223
+ var $result;
224
+ public $comments; //need to add an request object for each new type
225
+ var $comment;
226
+ var $extensions;
227
+ var $folders;
228
+ var $styles;
229
+ var $style;
230
+ var $packs;
231
+ var $pack;
232
+ var $languages;
233
+ var $activity;
234
+ var $rating_result;
235
+ var $rating;
236
+ var $nonce;
237
+ var $partner;
238
+ var $media;
239
+ public $survey;
240
+ public $surveys;
241
+ public $item;
242
+ public $items;
243
+ }
244
+
245
+ class Polldaddy_Partner extends Polldaddy_XML_Object {
246
+ var $___cdata = array( 'name' );
247
+ var $___name = 'partner';
248
+
249
+ var $_role;
250
+ var $_users;
251
+
252
+ var $name;
253
+ }
254
+
255
+ class Polldaddy_Account extends Polldaddy_XML_Object {
256
+ var $___cdata = array( 'userName', 'email', 'password', 'firstName', 'lastName', 'websiteURL', 'avatarURL', 'bio' );
257
+ var $___name = 'account';
258
+
259
+ var $userName;
260
+ var $email;
261
+ var $password;
262
+ var $firstName;
263
+ var $lastName;
264
+ var $countryCode;
265
+ var $gender;
266
+ var $yearOfBirth;
267
+ var $websiteURL;
268
+ var $avatarURL;
269
+ var $bio;
270
+ var $src;
271
+ }
272
+
273
+ class Polldaddy_List extends Polldaddy_XML_Object {
274
+ var $___name = 'list';
275
+
276
+ var $_start;
277
+ var $_end;
278
+ var $_id;
279
+ public $_source_link_match;
280
+
281
+ var $period;
282
+ }
283
+
284
+ class Polldaddy_Polls extends Polldaddy_XML_Object {
285
+ var $___name = 'polls';
286
+
287
+ var $_total;
288
+
289
+ var $poll;
290
+ }
291
+
292
+ class Polldaddy_Item extends PollDaddy_XML_Object {
293
+ public $___cdata = array( 'name', 'type' );
294
+ public $___name = 'item';
295
+
296
+ public $_id;
297
+ public $_created;
298
+ public $_responses;
299
+ public $_folder_id;
300
+ public $_owner;
301
+ public $_closed;
302
+ public $_source;
303
+ public $_source_link;
304
+
305
+ public $name;
306
+ public $type;
307
+ public $subtype;
308
+ }
309
+
310
+ class PollDaddy_Items extends PollDaddy_XML_Object {
311
+ public $___name = 'items';
312
+
313
+ public $_total;
314
+
315
+ public $item;
316
+ }
317
+
318
+ class Polldaddy_Survey extends PollDaddy_XML_Object {
319
+ public $___cdata = array( 'name', 'title', 'custom_end_url', 'start_page_html', 'end_page_html', 'survey_xml', 'rule_xml' );
320
+ public $___name = 'survey';
321
+
322
+ public $_id;
323
+ public $_created;
324
+ public $_responses;
325
+ public $_folder_id;
326
+ public $_owner;
327
+ public $_closed;
328
+
329
+ public $name;
330
+ public $title;
331
+ public $multiple_responses;
332
+ public $custom_end_url;
333
+ public $style_id;
334
+ public $pack_id;
335
+ public $start_page;
336
+ public $start_page_html;
337
+ public $end_page;
338
+ public $end_page_html;
339
+ public $close_on_date;
340
+ public $close_date;
341
+ public $close_on_quota;
342
+ public $quota_amount;
343
+
344
+ public $survey_xml;
345
+ public $rule_xml;
346
+ }
347
+
348
+ class Polldaddy_Surveys extends Polldaddy_XML_Object {
349
+ public $___name = 'surveys';
350
+
351
+ public $_total;
352
+
353
+ public $survey;
354
+ }
355
+
356
+ class Polldaddy_Search extends Polldaddy_XML_Object {
357
+ var $___cdata = array( '___content' );
358
+ var $___name = 'search';
359
+
360
+ var $___content;
361
+
362
+ var $poll;
363
+ }
364
+
365
+ class Polldaddy_Poll extends Polldaddy_XML_Object {
366
+ var $___cdata = array( '___content', 'question', 'mediaCode', 'url' );
367
+ var $___name = 'poll';
368
+
369
+ var $___content;
370
+
371
+ var $_id;
372
+ var $_created;
373
+ var $_responses;
374
+ var $_folderID;
375
+ var $_owner;
376
+ var $_closed;
377
+ public $_source; // phpcs:ignore -- underscore for Crowdsignal legacy model
378
+ public $_source_link; // phpcs:ignore -- underscore for Crowdsignal legacy model
379
+
380
+ var $question;
381
+ var $multipleChoice;
382
+ var $randomiseAnswers;
383
+ var $otherAnswer;
384
+ var $resultsType;
385
+ public $blockRepeatVotersType; // phpcs:ignore -- legacy code
386
+ var $blockExpiration;
387
+ var $comments;
388
+ var $makePublic;
389
+ var $closePoll;
390
+ var $closePollNow;
391
+ var $closeDate;
392
+ var $styleID;
393
+ var $packID;
394
+ var $folderID;
395
+ var $languageID;
396
+ var $parentID;
397
+ var $keyword;
398
+ var $sharing;
399
+ var $rank;
400
+ var $url;
401
+ var $choices;
402
+ var $mediaType; // new
403
+ var $mediaCode; // new
404
+ var $answers;
405
+ }
406
+
407
+ class Polldaddy_Poll_Result extends Polldaddy_XML_Object {
408
+ var $___name = 'result';
409
+
410
+ var $_id;
411
+
412
+ var $answers;
413
+ var $otherAnswers;
414
+ }
415
+
416
+ class Polldaddy_Poll_Answers extends Polldaddy_XML_Object {
417
+ var $___name = 'answers';
418
+
419
+ var $answer;
420
+ }
421
+
422
+ class Polldaddy_Poll_Answer extends Polldaddy_XML_Object {
423
+ var $___cdata = array( '___content', 'text', 'mediaCode' );
424
+ var $___name = 'answer';
425
+
426
+ var $_id;
427
+ var $_total;
428
+ var $_percent;
429
+
430
+ var $___content;
431
+
432
+ var $text; //removed ___content and replaced it with text node
433
+ var $mediaType; // new
434
+ var $mediaCode; // new
435
+ }
436
+
437
+ class Polldaddy_Other_Answers extends Polldaddy_XML_Object {
438
+ var $___name = 'otherAnswers';
439
+
440
+ var $otherAnswer;
441
+ }
442
+
443
+ class Polldaddy_Other_Answer extends Polldaddy_XML_Object {
444
+ var $___cdata = array( '___content' );
445
+ var $___name = 'otherAnswer';
446
+
447
+ var $___content;
448
+ }
449
+
450
+ class Polldaddy_Comments extends Polldaddy_XML_Object {
451
+ var $___cdata = array( '___content' );
452
+ var $___name = 'comments';
453
+
454
+ var $___content;
455
+
456
+ var $_id;
457
+
458
+ var $comment;
459
+ }
460
+
461
+ class Polldaddy_Comment extends Polldaddy_XML_Object {
462
+ var $___cdata = array( 'name', 'email', 'text', 'url' );
463
+ var $___name = 'comment';
464
+
465
+ var $_id; //_ means variable corresponds to an attribute
466
+ var $_method;
467
+ var $_type;
468
+
469
+ var $poll; // without _ means variable corresponds to an element
470
+ var $name;
471
+ var $email;
472
+ var $text;
473
+ var $url;
474
+ var $date;
475
+ var $ip;
476
+ }
477
+
478
+ class Polldaddy_Extensions extends Polldaddy_XML_Object {
479
+ var $___name = 'extensions';
480
+
481
+ var $folders;
482
+ var $styles;
483
+ var $packs;
484
+ var $languages;
485
+ }
486
+
487
+ class Polldaddy_Folders extends Polldaddy_XML_Object {
488
+ var $___name = 'folders';
489
+
490
+ var $folder;
491
+ }
492
+
493
+ class Polldaddy_Folder extends Polldaddy_XML_Object {
494
+ var $___cdata = array( '___content' );
495
+ var $___name = 'folder';
496
+
497
+ var $___content;
498
+
499
+ var $_id;
500
+ }
501
+
502
+ class Polldaddy_Styles extends Polldaddy_XML_Object {
503
+ var $___name = 'styles';
504
+
505
+ var $style;
506
+ }
507
+
508
+ class Polldaddy_Style extends Polldaddy_XML_Object {
509
+ var $___cdata = array( 'title', 'css' );
510
+ var $___name = 'style';
511
+
512
+ var $_id;
513
+ var $_type;
514
+ var $_retro;
515
+ var $_direction;
516
+
517
+ var $title;
518
+ public $date;
519
+ var $css;
520
+ }
521
+
522
+ class Polldaddy_Packs extends Polldaddy_XML_Object {
523
+ var $___name = 'packs';
524
+
525
+ var $pack;
526
+ }
527
+
528
+ class Polldaddy_Pack extends Polldaddy_XML_Object {
529
+ var $___name = 'pack';
530
+
531
+ var $_id;
532
+ var $_date;
533
+ var $_retro;
534
+
535
+ var $pack;
536
+ }
537
+
538
+ class Custom_Pack extends Polldaddy_XML_Object {
539
+ var $___name = 'pack';
540
+
541
+ var $_type = 'user'; //type attribute is constant (for now)
542
+
543
+ var $title;
544
+ var $phrase;
545
+
546
+ function xml( $prepend_ns = true, $pad = 0 ) {
547
+ $xml = parent::xml( false, $pad );
548
+ return $xml;
549
+ }
550
+ }
551
+
552
+ class Custom_Pack_Phrase extends Polldaddy_XML_Object {
553
+ var $___cdata = array( '___content' );
554
+ var $___name = 'phrase';
555
+
556
+ var $___content;
557
+
558
+ var $_phraseID;
559
+
560
+ function xml( $prepend_ns = true, $pad = 0 ) {
561
+ $xml = parent::xml( false, $pad );
562
+ return $xml;
563
+ }
564
+ }
565
+
566
+ class Polldaddy_Languages extends Polldaddy_XML_Object {
567
+ var $___name = 'languages';
568
+
569
+ var $language;
570
+ }
571
+
572
+ class Polldaddy_Language extends Polldaddy_XML_Object {
573
+ var $___cdata = array( '___content' );
574
+ var $___name = 'language';
575
+
576
+ var $___content;
577
+
578
+ var $_id;
579
+ }
580
+
581
+ class Polldaddy_Activity extends Polldaddy_XML_Object {
582
+ var $___cdata = array( '___content' );
583
+ var $___name = 'activity';
584
+
585
+ var $___content;
586
+ }
587
+
588
+ class Polldaddy_Nonce extends Polldaddy_XML_Object {
589
+ var $___cdata = array( 'text', 'action' );
590
+ var $___name = 'nonce';
591
+
592
+ var $text;
593
+ var $action;
594
+ var $userCode;
595
+ }
596
+
597
+ class Polldaddy_Rating_Result extends Polldaddy_XML_Object {
598
+ var $___name = 'rating_result';
599
+
600
+ var $_id;
601
+
602
+ var $ratings;
603
+ }
604
+
605
+ class Polldaddy_Ratings extends Polldaddy_XML_Object {
606
+ var $___name = 'ratings';
607
+
608
+ var $_total;
609
+ var $rating;
610
+ }
611
+
612
+ class Polldaddy_Rating extends Polldaddy_XML_Object {
613
+ var $___name = 'rating';
614
+ var $___cdata = array( 'settings', 'name', 'title', 'permalink' );
615
+
616
+ var $_id;
617
+
618
+ var $_type;
619
+ var $_votes;
620
+ var $uid;
621
+ var $total1;
622
+ var $total2;
623
+ var $total3;
624
+ var $total4;
625
+ var $total5;
626
+ var $average_rating;
627
+ var $date;
628
+ var $title;
629
+ var $permalink;
630
+
631
+ var $name;
632
+ var $folder_id;
633
+ var $settings;
634
+ }
635
+
636
+ class Polldaddy_Email extends Polldaddy_XML_Object {
637
+ var $___cdata = array( 'custom' );
638
+ var $___name = 'emailAddress';
639
+
640
+ var $_id;
641
+ var $_owner;
642
+
643
+ var $folderID;
644
+ var $address;
645
+ var $firstname;
646
+ var $lastname;
647
+ var $custom;
648
+ var $status;
649
+ }
650
+
651
+ class Polldaddy_Email_Message extends Polldaddy_XML_Object {
652
+ var $___cdata = array( 'text' );
653
+ var $___name = 'message';
654
+
655
+ var $_id;
656
+ var $_owner;
657
+
658
+ var $text;
659
+ var $groups;
660
+ }
661
+
662
+ class Polldaddy_Media extends Polldaddy_XML_Object {
663
+ var $___cdata = array( 'name', 'data', 'type', 'upload_result', 'img', 'img_small', 'url' );
664
+ var $___name = 'media';
665
+
666
+ var $_size;
667
+ var $_id;
668
+
669
+ var $name;
670
+ var $type;
671
+ var $ext;
672
+ var $data;
673
+ var $upload_result;
674
+ var $img;
675
+ var $img_small;
676
+ var $url;
677
+ }
678
+
679
+ class Polldaddy_XML_Parser {
680
+ var $parser;
681
+ var $polldaddy_objects = array(
682
+ 'http://api.polldaddy.com/pdapi.xsd:pdAccess' => 'Polldaddy_Access',
683
+ 'http://api.polldaddy.com/pdapi.xsd:pdInitiate' => 'Polldaddy_Initiate',
684
+ 'http://api.polldaddy.com/pdapi.xsd:pdRequest' => 'Polldaddy_Request',
685
+ 'http://api.polldaddy.com/pdapi.xsd:pdResponse' => 'Polldaddy_Response',
686
+ 'http://api.polldaddy.com/pdapi.xsd:errors' => 'Polldaddy_Errors',
687
+ 'http://api.polldaddy.com/pdapi.xsd:error' => 'Polldaddy_Error',
688
+ 'http://api.polldaddy.com/pdapi.xsd:demands' => 'Polldaddy_Demands',
689
+ 'http://api.polldaddy.com/pdapi.xsd:demand' => 'Polldaddy_Demand',
690
+ 'http://api.polldaddy.com/pdapi.xsd:queries' => 'Polldaddy_Queries',
691
+ 'http://api.polldaddy.com/pdapi.xsd:query' => 'Polldaddy_Query',
692
+ 'http://api.polldaddy.com/pdapi.xsd:account' => 'Polldaddy_Account',
693
+ 'http://api.polldaddy.com/pdapi.xsd:list' => 'Polldaddy_List',
694
+ 'http://api.polldaddy.com/pdapi.xsd:polls' => 'Polldaddy_Polls',
695
+ 'http://api.polldaddy.com/pdapi.xsd:search' => 'Polldaddy_Search',
696
+ 'http://api.polldaddy.com/pdapi.xsd:poll' => 'Polldaddy_Poll',
697
+ 'http://api.polldaddy.com/pdapi.xsd:survey' => 'Polldaddy_Survey',
698
+ 'http://api.polldaddy.com/pdapi.xsd:surveys' => 'Polldaddy_Surveys',
699
+ 'http://api.polldaddy.com/pdapi.xsd:item' => 'Polldaddy_Item',
700
+ 'http://api.polldaddy.com/pdapi.xsd:items' => 'Polldaddy_Items',
701
+ 'http://api.polldaddy.com/pdapi.xsd:emailAddress' => 'Polldaddy_Email',
702
+ 'http://api.polldaddy.com/pdapi.xsd:message' => 'Polldaddy_Email_Message',
703
+ 'http://api.polldaddy.com/pdapi.xsd:answers' => 'Polldaddy_Poll_Answers',
704
+ 'http://api.polldaddy.com/pdapi.xsd:answer' => 'Polldaddy_Poll_Answer',
705
+ 'http://api.polldaddy.com/pdapi.xsd:otherAnswers' => 'Polldaddy_Other_Answers',
706
+ 'http://api.polldaddy.com/pdapi.xsd:result' => 'Polldaddy_Poll_Result',
707
+ 'http://api.polldaddy.com/pdapi.xsd:comments' => 'Polldaddy_Comments',
708
+ 'http://api.polldaddy.com/pdapi.xsd:comment' => 'Polldaddy_Comment',
709
+ 'http://api.polldaddy.com/pdapi.xsd:extensions' => 'Polldaddy_Extensions',
710
+ 'http://api.polldaddy.com/pdapi.xsd:folders' => 'Polldaddy_Folders',
711
+ 'http://api.polldaddy.com/pdapi.xsd:folder' => 'Polldaddy_Folder',
712
+ 'http://api.polldaddy.com/pdapi.xsd:styles' => 'Polldaddy_Styles',
713
+ 'http://api.polldaddy.com/pdapi.xsd:style' => 'Polldaddy_Style',
714
+ 'http://api.polldaddy.com/pdapi.xsd:packs' => 'Polldaddy_Packs',
715
+ 'http://api.polldaddy.com/pdapi.xsd:pack' => 'Polldaddy_Pack',
716
+ 'http://api.polldaddy.com/pdapi.xsd:languages' => 'Polldaddy_Languages',
717
+ 'http://api.polldaddy.com/pdapi.xsd:language' => 'Polldaddy_Language',
718
+ 'http://api.polldaddy.com/pdapi.xsd:activity' => 'Polldaddy_Activity',
719
+ 'http://api.polldaddy.com/pdapi.xsd:rating_result' => 'Polldaddy_Rating_Result',
720
+ 'http://api.polldaddy.com/pdapi.xsd:ratings' => 'Polldaddy_Ratings',
721
+ 'http://api.polldaddy.com/pdapi.xsd:rating' => 'Polldaddy_Rating',
722
+ 'http://api.polldaddy.com/pdapi.xsd:nonce' => 'Polldaddy_Nonce',
723
+ 'http://api.polldaddy.com/pdapi.xsd:partner' => 'Polldaddy_Partner',
724
+ 'http://api.polldaddy.com/pdapi.xsd:media' => 'Polldaddy_Media',
725
+ 'pack' => 'Custom_Pack',
726
+ 'phrase' => 'Custom_Pack_Phrase'
727
+ );// the parser matches the tag names to the class name and creates an object defined by that class
728
+
729
+ var $object_stack = array();
730
+ var $object_pos = null;
731
+
732
+ var $objects = array();
733
+
734
+ function __construct( $xml = null ) {
735
+ if ( is_null( $xml ) )
736
+ return;
737
+
738
+ return $this->parse( $xml );
739
+ }
740
+
741
+ function parse( $xml ) {
742
+ $this->parser = xml_parser_create_ns( 'UTF-8' );
743
+ xml_set_object( $this->parser, $this );
744
+ xml_set_element_handler( $this->parser, 'tag_open', 'tag_close' );
745
+ xml_set_character_data_handler( $this->parser, 'text' );
746
+ xml_parser_set_option( $this->parser, XML_OPTION_CASE_FOLDING, 0 );
747
+ xml_parser_set_option( $this->parser, XML_OPTION_SKIP_WHITE, 1 );
748
+
749
+ xml_parse( $this->parser, $xml );
750
+ xml_parser_free( $this->parser );
751
+ return $this->objects;
752
+ }
753
+
754
+ function tag_open( &$parser, $tag, $attributes ) {
755
+ $object_pos = $this->object_pos;
756
+ if ( $this->object_stack ) {
757
+ if ( isset( $this->object_stack[$object_pos]['args'][$tag] ) ) {
758
+ if ( is_array( $this->object_stack[$object_pos]['args'][$tag] ) ) {
759
+ $this->object_stack[$object_pos]['args'][$tag][] = false;
760
+ } else {
761
+ $this->object_stack[$object_pos]['args'][$tag] = array( $this->object_stack[$object_pos]['args'][$tag], false );
762
+ }
763
+ end( $this->object_stack[$object_pos]['args'][$tag] );
764
+ $this->object_stack[$object_pos]['args_tag_pos'] = key( $this->object_stack[$object_pos]['args'][$tag] );
765
+ } else {
766
+ $this->object_stack[$object_pos]['args'][$tag] = false;
767
+ }
768
+ $this->object_stack[$object_pos]['args_tag'] = $tag;
769
+ }
770
+
771
+ if ( isset( $this->polldaddy_objects[$tag] ) ) {
772
+ $this->object_stack[] = array(
773
+ 'tag' => $tag,
774
+ 'atts' => $attributes,
775
+ 'args' => array(),
776
+ 'parent' => $this->object_pos,
777
+ 'args_tag' => null,
778
+ 'args_tag_pos' => null
779
+ );
780
+ end( $this->object_stack );
781
+ $this->object_pos = key( $this->object_stack );
782
+ }
783
+ }
784
+
785
+ function text( &$parser, $text ) {
786
+ if ( !$this->object_stack )
787
+ return;
788
+
789
+ $text = trim( $text );
790
+ if ( !strlen( $text ) )
791
+ return;
792
+
793
+ if ( $this->object_stack[$this->object_pos]['args_tag_pos'] ) {
794
+ if ( isset($this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']]) )
795
+ $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] .= $text;
796
+ else
797
+ $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] = $text;
798
+ } elseif ( $this->object_stack[$this->object_pos]['args_tag'] ) {
799
+ if ( isset($this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']]) )
800
+ $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] .= $text;
801
+ else
802
+ $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] = $text;
803
+ } else {
804
+ if ( isset( $this->object_stack[ $this->object_pos ]['args']['___content'] ) ) {
805
+ $this->object_stack[ $this->object_pos ]['args']['___content'] .= $text;
806
+ } else {
807
+ $this->object_stack[ $this->object_pos ]['args']['___content'] = $text;
808
+ }
809
+ }
810
+ }
811
+
812
+ function tag_close( &$parser, $tag ) {
813
+ if ( isset( $this->polldaddy_objects[$tag] ) ) {
814
+ if ( $tag !== $this->object_stack[$this->object_pos]['tag'] )
815
+ die( 'damn' );
816
+
817
+ $new = $this->polldaddy_objects[$tag];
818
+ $new_object = new $new( $this->object_stack[$this->object_pos]['args'], $this->object_stack[$this->object_pos]['atts'] );
819
+
820
+ if ( is_numeric( $this->object_stack[$this->object_pos]['parent'] ) ) {
821
+ $this->object_pos = $this->object_stack[$this->object_pos]['parent'];
822
+ if ( $this->object_stack[$this->object_pos]['args_tag_pos'] ) {
823
+ $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']][$this->object_stack[$this->object_pos]['args_tag_pos']] = $new_object;
824
+ } elseif ( $this->object_stack[$this->object_pos]['args_tag'] ) {
825
+ $this->object_stack[$this->object_pos]['args'][$this->object_stack[$this->object_pos]['args_tag']] = $new_object;
826
+ }
827
+ } else {
828
+ $this->object_pos = null;
829
+ $this->objects[] = $new_object;
830
+ }
831
+
832
+ array_pop( $this->object_stack );
833
+ }
834
+ }
835
+ }
836
+ ?>
polldaddy.php CHANGED
@@ -1,11 +1,11 @@
1
- <?php
2
  /**
3
  * Plugin Name: Crowdsignal Polls & Ratings
4
  * Plugin URI: http://wordpress.org/extend/plugins/polldaddy/
5
  * Description: Create and manage Crowdsignal polls and ratings in WordPress
6
  * Author: Automattic, Inc.
7
  * Author URL: https://crowdsignal.com/
8
- * Version: 2.2.6
9
  */
10
 
11
  // To hardcode your Polldaddy PartnerGUID (API Key), add the (uncommented) line below with the PartnerGUID to your `wp-config.php`
@@ -16,7 +16,7 @@ if ( ! defined( 'POLLDADDY_API_HOST' ) ) {
16
  }
17
 
18
  if ( ! defined( 'POLLDADDY_API_VERSION' ) ) {
19
- define( 'POLLDADDY_API_VERSION', 'v1');
20
  }
21
 
22
  function polldaddy_api_path( $path, $version = POLLDADDY_API_VERSION ) {
@@ -54,13 +54,15 @@ class WP_Polldaddy {
54
  var $rating_user_code;
55
  var $has_feedback_menu;
56
 
 
 
57
  function __construct() {
58
  global $current_user;
59
  $this->log( 'Created WP_Polldaddy Object: constructor' );
60
  $this->errors = new WP_Error;
61
  $this->scheme = 'https';
62
- $this->version = '2.2.0';
63
- $this->multiple_accounts = true;
64
  $this->polldaddy_client_class = 'api_client';
65
  $this->polldaddy_clients = array();
66
  $this->is_admin = (bool) current_user_can( 'manage_options' );
@@ -70,6 +72,7 @@ class WP_Polldaddy {
70
  $this->rating_user_code = null;
71
  $this->id = ($current_user instanceof WP_User) ? intval( $current_user->ID ): 0;
72
  $this->has_feedback_menu = false;
 
73
 
74
  if ( class_exists( 'Jetpack' ) ) {
75
  if ( method_exists( 'Jetpack', 'is_active' ) && Jetpack::is_active() ) {
@@ -119,19 +122,19 @@ class WP_Polldaddy {
119
  }
120
  }
121
 
122
- /**
123
- * Remove the feedback "All Posts" submenu if not needed.
124
- */
125
  public function remove_feedback_menu() {
126
  remove_submenu_page( 'edit.php?post_type=feedback', 'edit.php?post_type=feedback' );
127
  }
128
 
129
- /**
130
- * Add the polldaddy option to the Jetpack options management whitelist.
131
- *
132
- * @param array $options The list of whitelisted option names.
133
- * @return array The updated whitelist
134
- */
135
  public static function add_to_jetpack_options_whitelist( $options ) {
136
  $options[] = 'polldaddy_api_key';
137
  return $options;
@@ -184,7 +187,7 @@ class WP_Polldaddy {
184
  add_action( "load-$hook", array( &$this, 'management_page_load' ) );
185
  }
186
 
187
- foreach( array( 'polls' => __( 'Polls', 'polldaddy' ), 'ratings' => __( 'Ratings', 'polldaddy' ) ) as $menu_slug => $page_title ) {
188
  $menu_title = $page_title;
189
 
190
  $hook = add_submenu_page( $this->has_feedback_menu ? 'feedback' : $slug, $menu_title, $menu_title, $capability, $menu_slug, $function, 99 );
@@ -192,7 +195,7 @@ class WP_Polldaddy {
192
  }
193
 
194
  // Add settings pages.
195
- foreach( array( 'pollsettings' => __( 'Poll', 'polldaddy' ), 'ratingsettings' => __( 'Rating', 'polldaddy' ) ) as $menu_slug => $page_title ) {
196
  // translators: %s placeholder is the setting page type (Poll or Rating).
197
  $settings_page_title = sprintf( esc_html__( '%s Settings', 'polldaddy' ), $page_title );
198
  $hook = add_options_page( $settings_page_title, $settings_page_title, $menu_slug == 'ratings' ? 'manage_options' : $capability, $menu_slug, array( $this, 'settings_page' ) );
@@ -339,71 +342,51 @@ class WP_Polldaddy {
339
  function print_errors() {
340
  if ( !$error_codes = $this->errors->get_error_codes() )
341
  return;
342
- ?>
343
-
344
- <div class="error" id="polldaddy-error">
345
-
346
- <?php
347
-
348
- foreach ( $error_codes as $error_code ) :
349
- foreach ( $this->errors->get_error_messages( $error_code ) as $error_message ) :
350
- ?>
351
-
352
- <p><?php echo $this->errors->get_error_data( $error_code ) ? $error_message : esc_html( $error_message ); ?></p>
353
-
354
- <?php
355
- endforeach;
356
- endforeach;
357
 
 
358
  $this->errors = new WP_Error;
359
- ?>
360
-
361
- </div>
362
- <br class="clear" />
363
-
364
- <?php
365
  }
366
 
367
  function api_key_page() {
368
  $this->print_errors();
369
- ?>
370
 
371
- <div class="wrap">
372
- <h2 id="polldaddy-header"><?php _e( 'Crowdsignal', 'polldaddy' ); ?></h2>
373
 
374
- <p><?php printf( __( 'Before you can use the Crowdsignal plugin, you need to enter your <a href="%s">Crowdsignal.com</a> account details.', 'polldaddy' ), 'https://app.crowdsignal.com/' ); ?></p>
375
 
376
- <form action="" method="post">
377
- <table class="form-table">
378
- <tbody>
379
- <tr class="form-field form-required">
380
- <th valign="top" scope="row">
381
- <label for="polldaddy-email"><?php _e( 'Crowdsignal Email Address', 'polldaddy' ); ?></label>
382
- </th>
383
- <td>
384
- <input type="text" name="polldaddy_email" id="polldaddy-email" aria-required="true" size="40" />
385
- </td>
386
- </tr>
387
- <tr class="form-field form-required">
388
- <th valign="top" scope="row">
389
- <label for="polldaddy-password"><?php _e( 'Crowdsignal Password', 'polldaddy' ); ?></label>
390
- </th>
391
- <td>
392
- <input type="password" name="polldaddy_password" id="polldaddy-password" aria-required="true" size="40" />
393
- </td>
394
- </tr>
395
- </tbody>
396
- </table>
397
- <p class="submit">
398
- <?php wp_nonce_field( 'polldaddy-account' ); ?>
399
- <input type="hidden" name="action" value="account" />
400
- <input type="hidden" name="account" value="import" />
401
- <input class="button-secondary" type="submit" value="<?php echo esc_attr( __( 'Submit', 'polldaddy' ) ); ?>" />
402
- </p>
403
- </form>
404
- </div>
405
 
406
- <?php
407
  }
408
 
409
  function media_buttons() {
@@ -411,6 +394,15 @@ class WP_Polldaddy {
411
  echo " <a href='admin.php?page=polls&iframe&TB_iframe=true' onclick='return false;' id='add_poll' class='button thickbox' title='" . esc_attr( $title ) . "'><img src='{$this->base_url}img/polldaddy@2x.png' width='15' height='15' alt='" . esc_attr( $title ) . "' style='margin: -2px 0 0 -1px; padding: 0 2px 0 0; vertical-align: middle;' /> " . esc_html( $title ) . "</a>";
412
  }
413
 
 
 
 
 
 
 
 
 
 
414
  function set_api_user_code() {
415
 
416
  $this->user_code = get_option( 'pd-usercode-'.$this->id );
@@ -429,6 +421,9 @@ class WP_Polldaddy {
429
  } else {
430
  update_option( 'pd-usercode-' . $this->id, $this->user_code, false );
431
  }
 
 
 
432
  } elseif ( get_option( 'polldaddy_api_key' ) ) {
433
  $this->contact_support_message( 'There was a problem linking your account', $polldaddy->errors );
434
  }
@@ -450,7 +445,8 @@ class WP_Polldaddy {
450
 
451
  require_once WP_POLLDADDY__POLLDADDY_CLIENT_PATH;
452
 
453
- wp_enqueue_script( 'polls', "{$this->base_url}js/polldaddy.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-form' ), $this->version );
 
454
  wp_enqueue_script( 'polls-common', "{$this->base_url}js/common.js", array(), $this->version );
455
 
456
  if ( $page == 'polls' ) {
@@ -1331,446 +1327,317 @@ class WP_Polldaddy {
1331
 
1332
  function settings_page() {
1333
  global $page, $action;
1334
- ?>
1335
- <div class="wrap" id="manage-polls">
1336
- <?php
1337
- $this->set_api_user_code();
 
 
1338
 
1339
- if ( isset( $_GET['page'] ) ) {
1340
- $page = $_GET['page'];
1341
- }
1342
- if ( 'pollsettings' === $page ) {
1343
- if ( ! $this->is_author ) { //check user privileges has access to action
1344
- return;
1345
- }
1346
- $this->plugin_options();
1347
- } elseif ( 'ratingsettings' === $page ) {
1348
- if ( 'update-rating' === $action ) {
1349
- $this->update_rating();
1350
- }
1351
 
1352
- $this->rating_settings();
1353
- }
1354
- ?>
1355
- </div>
1356
- <?php
 
1357
  }
1358
 
1359
  function management_page() {
1360
-
1361
  global $page, $action, $poll, $style, $rating;
1362
- $poll = (int) $poll;
1363
- $style = (int) $style;
1364
  $rating = esc_html( $rating );
1365
- ?>
1366
-
1367
- <div class="wrap" id="manage-polls">
1368
 
1369
- <?php
1370
- if ( $page == 'polls' ) {
1371
- if ( ! $this->is_author && in_array( $action, array( 'edit', 'edit-poll', 'create-poll', 'edit-style', 'create-style', 'list-styles' ) ) ) {//check user privileges has access to action
1372
- $action = '';
1373
- }
1374
- switch ( $action ) {
1375
- case 'preview' :
1376
- if ( isset( $_GET['iframe'] ) ):
1377
- if ( isset( $_GET['popup'] ) ) { ?>
1378
- <h2 id="poll-list-header"><?php printf( __( 'Preview Poll <a href="%s" class="add-new-h2">All Polls</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ) ); ?></h2>
1379
- <?php
1380
  }
1381
- endif;
1382
-
1383
- echo do_shortcode( "[crowdsignal poll=$poll cb=1]" );
1384
-
1385
- wp_print_scripts( 'polldaddy-poll-js' );
1386
- break;
1387
- case 'results' :
1388
- ?>
1389
-
1390
- <h2 id="poll-list-header"><?php printf( __( 'Poll Results <a href="%s" class="add-new-h2">All Polls</a> <a href="%s" class="add-new-h2">Edit Poll</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ), esc_url( add_query_arg( array( 'action' => 'edit-poll', 'poll' => $poll, 'message' => false ) ) ) ); ?></h2>
1391
-
1392
- <?php
1393
- $this->poll_results_page( $poll );
1394
- break;
1395
- case 'edit' :
1396
- case 'edit-poll' :
1397
- ?>
1398
-
1399
- <h2 id="poll-list-header"><?php printf( __( 'Edit Poll <a href="%s" class="add-new-h2">All Polls</a> <a href="%s" class="add-new-h2">View Results</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ), esc_url( add_query_arg( array( 'action' => 'results', 'poll' => $poll, 'message' => false ) ) ) ); ?></h2>
1400
-
1401
- <?php
1402
-
1403
- $this->poll_edit_form( $poll );
1404
- break;
1405
- case 'create-poll' :
1406
- ?>
1407
-
1408
- <h2 id="poll-list-header"><?php printf( __( 'Add New Poll <a href="%s" class="add-new-h2">All Polls</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ) ); ?></h2>
1409
-
1410
- <?php
1411
- $this->poll_edit_form();
1412
- break;
1413
- case 'list-styles' :
1414
- ?>
1415
-
1416
- <h2 id="polldaddy-header"><?php
1417
- if ( $this->is_author )
1418
- printf( __( 'Custom Styles <a href="%s" class="add-new-h2">Add New</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'create-style', 'poll' => false, 'message' => false ) ) ) );
1419
- else
1420
- _e( 'Custom Styles', 'polldaddy' ); ?></h2>
1421
-
1422
- <?php
1423
- $this->styles_table();
1424
- break;
1425
- case 'edit-style' :
1426
- ?>
1427
-
1428
- <h2 id="polldaddy-header"><?php printf( __( 'Edit Style <a href="%s" class="add-new-h2">List Styles</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'list-styles', 'style' => false, 'message' => false, 'preload' => false ) ) ) ); ?></h2>
1429
-
1430
- <?php
1431
-
1432
- $this->style_edit_form( $style );
1433
- break;
1434
- case 'create-style' :
1435
- ?>
1436
-
1437
- <h2 id="polldaddy-header"><?php printf( __( 'Create Style <a href="%s" class="add-new-h2">List Styles</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'list-styles', 'style' => false, 'message' => false, 'preload' => false ) ) ) ); ?></h2>
1438
 
1439
- <?php
1440
- $this->style_edit_form();
1441
- break;
1442
- default :
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1443
 
1444
- ?>
 
 
 
 
 
1445
 
1446
- <h2 id="poll-list-header"><?php
1447
- if ( $this->is_author && defined( 'WP_POLLDADDY__PARTNERGUID' ) && WP_POLLDADDY__PARTNERGUID )
1448
- printf( __( 'Crowdsignal Polls <a href="%s" class="add-new-h2">Add New</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'create-poll', 'poll' => false, 'message' => false ) ) ) );
1449
- else
1450
- _e( 'Crowdsignal Polls ', 'polldaddy' );
1451
- ?></h2><?php
1452
- $polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
1453
- $account = $polldaddy->get_account();
1454
- if ( !empty( $account ) )
1455
- $account_email = esc_attr( $account->email );
1456
- if ( isset( $account_email ) && current_user_can( 'manage_options' ) ) {
1457
- echo "<p>" . sprintf( __( 'Linked to WordPress.com Account: <strong>%1$s</strong> (<a target="_blank" href="%2$s">Settings</a> / <a target="_blank" href="%3$s">Crowdsignal.com</a>)', 'polldaddy' ), $account_email, admin_url( 'options-general.php?page=pollsettings' ), 'https://app.crowdsignal.com/' ) . "</p>";
1458
  }
 
 
 
 
 
1459
 
1460
- if ( ! is_plugin_active( 'crowdsignal-forms/crowdsignal-forms.php' ) ) {
1461
- echo "<p>" . sprintf(
1462
- esc_html__(
1463
- 'Did you know we have another plugin with new blocks? Poll, Applause, NPS and more. Look for the Crowdsignal Forms plugin or download it %s.',
1464
- 'polldaddy'
1465
- ),
1466
- sprintf( '<a href="%s">%s</a>',
1467
- 'https://wordpress.org/plugins/crowdsignal-forms/',
1468
- esc_html__( 'here', 'polldaddy' )
1469
- )
1470
- ) . "</p>";
1471
- }
1472
 
1473
- if ( !isset( $_GET['view'] ) )
1474
- $this->polls_table( 'user' );
1475
- else
1476
- $this->polls_table( 'blog' );
1477
 
1478
- }//end switch
1479
- } elseif ( $page == 'ratings' ) {
1480
- if ( !$this->is_admin && !in_array( $action, array( 'delete', 'reports' ) ) ) {//check user privileges has access to action
1481
- $action = 'reports';
1482
- }
1483
 
1484
- switch ( $action ) {
1485
- case 'delete' :
1486
- case 'reports' :
1487
- $this->rating_reports();
 
 
1488
  break;
1489
- }//end switch
 
 
 
 
1490
  }
1491
- ?>
1492
 
1493
- </div>
1494
-
1495
- <?php
1496
-
1497
- }
1498
 
1499
- function polls_table( $view = 'user' ) {
1500
- $page = 1;
1501
- if ( isset( $_GET['paged'] ) )
1502
- $page = absint( $_GET['paged'] );
1503
- $polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
1504
  $polldaddy->reset();
1505
 
1506
- if ( 'user' == $view )
1507
- $polls_object = $polldaddy->get_polls( ( $page - 1 ) * 10 + 1, $page * 10 );
1508
- else
1509
- $polls_object = $polldaddy->get_polls_by_parent_id( ( $page - 1 ) * 10 + 1, $page * 10 );
1510
 
1511
- $this->parse_errors( $polldaddy );
1512
- if ( in_array( 'API Key Not Found, 890', $polldaddy->errors ) )
1513
  return false;
1514
- $this->print_errors();
1515
- $polls = & $polls_object->poll;
1516
- $total_polls = 0;
1517
  if ( isset( $polls_object->_total ) ) {
1518
  $total_polls = $polls_object->_total;
1519
- } elseif ( ! empty( $polls ) ) {
1520
  $total_polls = count( $polls );
1521
  }
1522
- $class = '';
1523
-
1524
- $page_links = paginate_links( array(
1525
- 'base' => add_query_arg( 'paged', '%#%' ),
1526
- 'format' => '',
1527
- 'total' => ceil( $total_polls / 10 ),
1528
- 'current' => $page,
1529
- 'prev_text' => '&laquo;',
1530
- 'next_text' => '&raquo;'
1531
- ) );
1532
 
 
1533
 
1534
- ?>
1535
- <form method="post" action="">
1536
- <input type="hidden" name="iframe" id="iframe1" value="<?php echo isset( $_GET['iframe'] ) ? 1: 0;?>">
1537
- <div class="tablenav">
1538
-
1539
- <?php if ( $this->is_author ) { ?>
1540
- <div class="alignleft actions">
1541
- <select name="action">
1542
- <option selected="selected" value=""><?php _e( 'Actions', 'polldaddy' ); ?></option>
1543
- <option value="delete"><?php _e( 'Delete', 'polldaddy' ); ?></option>
1544
- <option value="close"><?php _e( 'Close', 'polldaddy' ); ?></option>
1545
- <option value="open"><?php _e( 'Open', 'polldaddy' ); ?></option>
1546
- </select>
1547
-
1548
- <input class="button-secondary action" type="submit" name="doaction" value="<?php _e( 'Apply', 'polldaddy' ); ?>" />
1549
- <?php wp_nonce_field( 'action-poll_bulk' ); ?>
1550
- </div>
1551
- <div class="alignleft actions">
1552
- <select name="filter" id="filter-options" style="margin-left:15px;">
1553
- <option <?php if ( ! isset( $_GET['view'] ) || $_GET['view'] !== 'blog' ): ?> selected="selected" <?php endif; ?> value=""><?php _e( 'View All Polls', 'polldaddy' ); ?></option>
1554
- <option <?php if ( isset( $_GET['view'] ) && $_GET['view'] === 'blog' ): ?> selected="selected" <?php endif; ?> value="blog"><?php _e( 'This Blog\'s Polls', 'polldaddy' ); ?></option>
1555
- </select>
1556
- <input class="button-secondary action" type="button" id="filter-polls" name="dofilter" value="<?php _e( 'Filter', 'polldaddy' ); ?>" />
1557
-
1558
-
1559
- </div>
1560
-
1561
-
1562
- <div class="tablenav-pages"><?php echo $page_links; ?></div>
1563
- </div>
1564
-
1565
- <?php } ?>
1566
- <table class="widefat">
1567
- <thead>
1568
- <tr>
1569
- <th id="cb" class="manage-column column-cb check-column" scope="col"><?php if ( $this->is_author ) { ?><input type="checkbox" /><?php } ?></th>
1570
- <th id="title" class="manage-column column-title" scope="col"><?php _e( 'Poll', 'polldaddy' ); ?></th>
1571
- <th id="votes" class="manage-column column-vote num" scope="col">&nbsp;</th>
1572
- </tr>
1573
- </thead>
1574
- <tbody>
1575
 
1576
- <?php
1577
- if ( $polls ) :
1578
- foreach ( $polls as $poll ) :
1579
- $poll_id = (int) $poll->_id;
1580
 
1581
- $poll->___content = trim( strip_tags( $poll->___content ) );
1582
- if ( strlen( $poll->___content ) == 0 ) {
1583
- $poll->___content = '-- empty HTML tag --';
 
1584
  }
1585
 
1586
- $poll_closed = (int) $poll->_closed;
1587
-
1588
- if ( $this->is_author and $this->can_edit( $poll ) ) {
1589
- $edit_link = esc_url( add_query_arg( array( 'action' => 'edit', 'poll' => $poll_id, 'message' => false ) ) );
1590
- $delete_link = esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'delete', 'poll' => $poll_id, 'message' => false ) ), "delete-poll_$poll_id" ) );
1591
- $open_link = esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'open', 'poll' => $poll_id, 'message' => false ) ), "open-poll_$poll_id" ) );
1592
- $close_link = esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'close', 'poll' => $poll_id, 'message' => false ) ), "close-poll_$poll_id" ) );
1593
- }
1594
- else {
1595
- $edit_link = false;
1596
- $delete_link = false;
1597
- $open_link = false;
1598
- $close_link = false;
1599
  }
1600
 
1601
- $class = $class ? '' : ' class="alternate"';
1602
- $results_link = esc_url( add_query_arg( array( 'action' => 'results', 'poll' => $poll_id, 'message' => false ) ) );
1603
- $preview = array( 'action' => 'preview', 'poll' => $poll_id, 'message' => false );
1604
-
1605
- if ( isset( $_GET['iframe'] ) ) {
1606
- $preview[ 'popup' ] = 1;
1607
  }
1608
 
1609
- $preview_link = esc_url( add_query_arg( $preview ) );
1610
-
1611
- list( $poll_time ) = explode( '.', $poll->_created );
1612
- $poll_time = strtotime( $poll_time );
1613
- ?>
1614
- <tr<?php echo $class; ?>>
1615
- <th class="check-column" scope="row"><?php if ( $this->is_author and $this->can_edit( $poll ) ) { ?><input type="checkbox" value="<?php echo (int) $poll_id; ?>" name="poll[]" /><?php } ?></th>
1616
- <td class="post-title column-title" style="padding-top:7px;">
1617
- <?php if ( $edit_link ) { ?>
1618
- <a class="row-title" style="display:block;" href="<?php echo $edit_link; ?>"><strong><?php echo esc_html( $poll->___content ); ?></strong></a>
1619
-
1620
- <abbr title="<?php echo date( __( 'Y/m/d g:i:s A', 'polldaddy' ), $poll_time ); ?>"> <?php _e( 'created', 'polldaddy' ); ?> <?php echo date( __( 'M d, Y', 'polldaddy' ), $poll_time ); ?></abbr>
1621
-
1622
- <div class="row-actions">
1623
- <span class="edit"><a href="<?php echo $edit_link; ?>"><?php _e( 'Edit', 'polldaddy' ); ?></a></span><span> | </span>
1624
- <?php } else { ?>
1625
- <strong><?php echo esc_html( $poll->___content ); ?></strong>
1626
- <div class="row-actions">
1627
-
1628
- <?php } ?>
1629
-
1630
- <?php if ( !isset( $_GET['iframe'] ) ):?>
1631
- <span class="shortcode"><a href="javascript:void(0);" class="polldaddy-show-shortcode"><?php _e( 'Embed &amp; Link', 'polldaddy' ); ?></a></span>
1632
- <?php else: ?>
1633
- <input type="hidden" class="polldaddy-poll-id" value="<?php echo $poll_id; ?>" />
1634
- <span><a href="javascript:void(0);" class="polldaddy-send-to-editor"><?php _e( 'Embed in Post', 'polldaddy' ); ?></a></span>
1635
- <?php endif; ?>
1636
-
1637
-
1638
- <?php
1639
- if ( $poll_closed == 2 ) {
1640
- if ( $open_link ) { ?>
1641
- <span> | </span><span class="open"><a class="open-poll" href="<?php echo $open_link; ?>"><?php _e( 'Open', 'polldaddy' ); ?></a></span>
1642
- <?php } } else {
1643
- if ( $close_link ) { ?>
1644
- <span> | </span><span class="close"><a class="close-poll" href="<?php echo $close_link; ?>"><?php _e( 'Close', 'polldaddy' ); ?></a></span>
1645
- <?php } }
1646
- if ( !isset( $_GET['iframe'] ) ): ?>
1647
- <span> | </span><span class="view"><a class="thickbox" href="<?php echo $preview_link; ?>"><?php _e( 'Preview', 'polldaddy' ); ?></a></span>
1648
- <?php else: ?>
1649
- <span> | </span><span class="view"><a href="<?php echo $preview_link; ?>"><?php _e( 'Preview', 'polldaddy' ); ?></a></span>
1650
- <?php endif;
1651
- if ( $delete_link ) { ?>
1652
- <span> | </span><span class="delete"><a class="delete-poll delete" href="<?php echo $delete_link; ?>"><?php _e( 'Delete', 'polldaddy' ); ?></a></span>
1653
- <?php }
1654
- if ( $poll->_responses > 0 ):?>
1655
- <span> | </span><span class="results"><a href="<?php echo $results_link; ?>"><?php _e( 'Results', 'polldaddy' ); ?></a></span>
1656
- <?php endif; ?>
1657
-
1658
- <?php $this->poll_table_add_option( $poll_id ); ?>
1659
- </div>
1660
- </td>
1661
- <td class="poll-votes column-vote num"><?php echo number_format_i18n( $poll->_responses ); ?><span class="votes-label"><?php _e( 'votes', 'polldaddy' ); ?></span></td>
1662
- </tr>
1663
- <tr class="polldaddy-shortcode-row <?php if ( $class ): ?> alternate <?php endif; ?>" style="display: none;">
1664
- <td colspan="4" style="padding:10px 0px 10px 20px;">
1665
-
1666
- <a style="display:block;font-size:12px;font-weight:bold;" href="<?php echo $edit_link; ?>"><?php echo esc_html( $poll->___content ); ?></a>
1667
-
1668
- <div class="pd-embed-col">
1669
- <h4 style="color:#666;font-weight:normal;"><?php _e( 'WordPress Shortcode', 'polldaddy' ); ?></h4>
1670
- <input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="[crowdsignal poll=<?php echo (int) $poll_id; ?>]"/>
1671
- </div>
1672
-
1673
- <div class="pd-embed-col">
1674
- <h4 style="color:#666;font-weight:normal;"><?php _e( 'Direct URL', 'polldaddy' ); ?></h4>
1675
- <input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="https://poll.fm/<?php echo (int) $poll_id; ?>"/>
1676
- </div>
1677
-
1678
- <br class="clearing" />
1679
-
1680
-
1681
- <h4 style="padding-top:10px;color:#666;font-weight:normal;"><?php _e( 'JavaScript', 'polldaddy' ); ?></h4>
1682
- <pre class="hardbreak" style="max-width:542px;text-wrap:word-wrap;margin-bottom:20px;">&lt;script type="text/javascript" language="javascript"
1683
- src="https://static.polldaddy.com/p/<?php echo (int) $poll_id; ?>.js"&gt;&lt;/script&gt;
1684
- &lt;noscript&gt;
1685
- &lt;a href="https://poll.fm/<?php echo (int) $poll_id; ?>/"&gt;<?php echo trim( strip_tags( $poll->___content ) ); ?>&lt;/a&gt;&lt;br/&gt;
1686
- &lt;span style="font:9px;"&gt;(&lt;a href="https://crowdsignal.com"&gt;polls&lt;/a&gt;)&lt;/span&gt;
1687
- &lt;/noscript&gt;</pre>
1688
- <p class="submit" style="clear:both;padding:0px;">
1689
- <a href="#" class="button pd-embed-done"><?php _e( 'Done', 'polldaddy' ); ?></a>
1690
- </p>
1691
-
1692
- </td>
1693
- </tr>
1694
-
1695
- <?php
1696
- endforeach;
1697
- elseif ( $total_polls ) : // $polls
1698
- ?>
1699
-
1700
- <tr>
1701
- <td colspan="4"><?php printf( __( 'What are you doing here? <a href="%s">Go back</a>.', 'polldaddy' ), esc_url( add_query_arg( 'paged', false ) ) ); ?></td>
1702
- </tr>
1703
-
1704
- <?php
1705
- else : // $polls
1706
- ?>
1707
-
1708
- <tr>
1709
- <td colspan="4" id="empty-set"><?php
1710
- if ( $this->is_author ) { ?>
1711
-
1712
- <h3 style="margin-bottom:0px;"><?php _e( 'You haven\'t created any polls for this blog.', 'polldaddy');?> </h3>
1713
- <p style="margin-bottom:20px;"><?php _e( 'Why don\'t you go ahead and get started on that?', 'polldaddy' ); ?></p>
1714
- <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'create-poll' ) ) ); ?>" class="button-primary"><?php _e( 'Create a Poll Now', 'polldaddy' ); ?></a>
1715
-
1716
- <?php
1717
- } else { ?>
1718
-
1719
- <p id="no-polls"><?php _e( 'No one has created any polls for this blog.', 'polldaddy' ); ?></p>
1720
-
1721
- <?php }
1722
- ?></td>
1723
- </tr>
1724
- <?php endif; // $polls ?>
1725
-
1726
- </tbody>
1727
- </table>
1728
-
1729
-
1730
-
1731
-
1732
-
1733
-
1734
- <?php $this->poll_table_extra(); ?>
1735
- </form>
1736
- <div class="tablenav" <?php if ( $page_links == '' ) { ?> style="display:none;" <?php } ?> >
1737
- <div class="tablenav-pages"><?php echo $page_links; ?></div>
1738
- </div>
1739
 
 
1740
 
 
 
 
 
1741
 
 
 
 
1742
 
1743
- <script type="text/javascript">
1744
- jQuery( document ).ready(function(){
1745
- plugin = new Plugin( {
1746
- delete_rating: '<?php echo esc_js( __( 'Are you sure you want to delete the rating for "%s"?', 'polldaddy' ) ); ?>',
1747
- delete_poll: '<?php echo esc_js( __( 'Are you sure you want to delete the poll %s?', 'polldaddy' ) ); ?>',
1748
- delete_answer: '<?php echo esc_js( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>',
1749
- delete_answer_title: '<?php echo esc_js( __( 'delete this answer', 'polldaddy' ) ); ?>',
1750
- standard_styles: '<?php echo esc_js( __( 'Standard Styles', 'polldaddy' ) ); ?>',
1751
- custom_styles: '<?php echo esc_js( __( 'Custom Styles', 'polldaddy' ) ); ?>'
1752
- } );
1753
 
1754
- jQuery( '#filter-polls' ).click( function(){
 
 
 
 
 
 
 
 
 
1755
 
 
1756
 
1757
- if( jQuery( '#filter-options' ).val() == 'blog' ){
1758
- window.location = '<?php echo add_query_arg( array( 'page' => 'polls', 'view' => 'blog' ), admin_url( 'admin.php' ) ); ?>';
1759
- } else {
1760
- window.location = '<?php echo add_query_arg( array( 'page' => 'polls' ), admin_url( 'admin.php' ) ); ?>';
1761
- }
 
 
 
 
 
 
 
1762
 
 
 
 
1763
 
 
1764
 
1765
- } );
 
 
 
 
 
 
1766
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1767
 
1768
- });
1769
- </script>
 
 
 
 
1770
 
1771
- <?php
1772
  }
1773
 
 
1774
  function poll_table_add_option() {}
1775
 
1776
  function poll_table_extra() {}
@@ -4950,11 +4817,15 @@ src="https://static.polldaddy.com/p/<?php echo (int) $poll_id; ?>.js"&gt;&lt;/sc
4950
  if ( isset( $_POST['polldaddy_email'] ) ) {
4951
  $account_email = false;
4952
  } else {
4953
- $polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
4954
- $account = $polldaddy->get_account();
4955
-
4956
- if ( !empty( $account ) )
4957
- $account_email = esc_attr( $account->email );
 
 
 
 
4958
 
4959
  $polldaddy->reset();
4960
  $poll = $polldaddy->get_poll( 1 );
@@ -5016,243 +4887,31 @@ src="https://static.polldaddy.com/p/<?php echo (int) $poll_id; ?>.js"&gt;&lt;/sc
5016
  153 => __( 'Sunset Medium', 'polldaddy' ),
5017
  154 => __( 'Sunset Wide', 'polldaddy' ),
5018
  155 => __( 'Music Medium', 'polldaddy' ),
5019
- 156 => __( 'Music Wide', 'polldaddy' )
5020
  );
5021
 
5022
  $polldaddy->reset();
5023
  $styles = $polldaddy->get_styles();
5024
 
5025
- if ( !empty( $styles ) && !empty( $styles->style ) && count( $styles->style ) > 0 ) {
5026
  foreach ( (array) $styles->style as $style ) {
5027
  $options[ (int) $style->_id ] = $style->title;
5028
  }
5029
  }
5030
  }
5031
- $this->print_errors();
5032
- ?>
5033
- <div id="options-page" class="wrap">
5034
- <div class="icon32" id="icon-options-general"><br/></div>
5035
- <h2>
5036
- <?php _e( 'Poll Settings', 'polldaddy' ); ?>
5037
- </h2>
5038
- <?php if ( $this->is_admin || $this->multiple_accounts ) { ?>
5039
- <h3>
5040
- <?php _e( 'Crowdsignal Account Info', 'polldaddy' ); ?>
5041
- </h3>
5042
- <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>
5043
- <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>
5044
- <?php if ( isset( $account_email ) && $account_email != false ) { ?>
5045
- <p><?php printf( __( 'Your account is currently linked to this API key: <strong>%s</strong>', 'polldaddy' ), WP_POLLDADDY__PARTNERGUID ); ?></p>
5046
- <br />
5047
- <h3><?php _e( 'Link to a different Crowdsignal account', 'polldaddy' ); ?></h3>
5048
- <?php } else { ?>
5049
- <br />
5050
- <h3><?php _e( 'Link to your Crowdsignal account', 'polldaddy' ); ?></h3>
5051
- <?php } ?>
5052
- <form action="" method="post">
5053
- <table class="form-table">
5054
- <tbody>
5055
- <tr class="form-field form-required">
5056
- <th valign="top" scope="row">
5057
- <label for="polldaddy-key">
5058
- <?php _e( 'Crowdsignal.com API Key', 'polldaddy' ); ?>
5059
- </label>
5060
- </th>
5061
- <td>
5062
- <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' ] ); ?>" />
5063
- </td>
5064
- </tr>
5065
- </tbody>
5066
- </table>
5067
- <p class="submit">
5068
- <?php wp_nonce_field( 'polldaddy-account' ); ?>
5069
- <input type="hidden" name="action" value="import-account" />
5070
- <input type="hidden" name="account" value="import" />
5071
- <input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Link Account', 'polldaddy' ) ); ?>" />
5072
- </p>
5073
- </form>
5074
 
5075
- <?php
5076
- } ?>
5077
- <?php
5078
- // if not connected to a Polldaddy account can't save defaults so don't show the form.
5079
- if ( false == is_object( $poll ) ) {
5080
- echo "</div>";
5081
- } else {
5082
- ?>
5083
- <h3>
5084
- <?php _e( 'General Settings', 'polldaddy' ); ?>
5085
- </h3>
5086
- <form action="" method="post">
5087
- <table class="form-table">
5088
- <tbody>
5089
- <tr valign="top">
5090
- <th valign="top" scope="row">
5091
- <label>
5092
- <?php _e( 'Default poll settings', 'polldaddy' ); ?>
5093
- </label>
5094
- </th>
5095
- <td>
5096
- <fieldset>
5097
- <legend class="screen-reader-text"><span>poll-defaults</span></legend><?php
5098
- foreach ( array( 'randomiseAnswers' => __( 'Randomize answer order', 'polldaddy' ), 'otherAnswer' => __( 'Allow other answers', 'polldaddy' ), 'multipleChoice' => __( 'Multiple choice', 'polldaddy' ), 'sharing' => __( 'Sharing', 'polldaddy' ) ) as $option => $label ) :
5099
- $checked = 'yes' === $poll->$option ? ' checked="checked"' : '';
5100
- ?>
5101
- <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 />
5102
 
5103
- <?php endforeach; ?>
5104
- <br class="clear" />
5105
- <br class="clear" />
5106
- <div class="field">
5107
- <label for="resultsType" class="pd-label">
5108
- <?php _e( 'Results Display', 'polldaddy' ); ?></label>
5109
- <select id="resultsType" name="resultsType">
5110
- <option <?php echo $poll->resultsType == 'show' ? 'selected="selected"':''; ?> value="show"><?php _e( 'Show', 'polldaddy' ); ?></option>
5111
- <option <?php echo $poll->resultsType == 'hide' ? 'selected="selected"':''; ?> value="hide"><?php _e( 'Hide', 'polldaddy' ); ?></option>
5112
- <option <?php echo $poll->resultsType == 'percent' ? 'selected="selected"':''; ?> value="percent"><?php _e( 'Percentages', 'polldaddy' ); ?></option>
5113
- </select>
5114
- </div>
5115
- <br class="clear" />
5116
- <div class="field">
5117
- <label for="styleID" class="pd-label">
5118
- <?php _e( 'Poll style', 'polldaddy' ); ?></label>
5119
- <select id="styleID" name="styleID"><?php
5120
- foreach ( (array) $options as $styleID => $label ) :
5121
- $selected = $styleID == $poll->styleID ? ' selected="selected"' : ''; ?>
5122
- <option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo esc_html( $label ); ?></option><?php
5123
- endforeach;?>
5124
- </select>
5125
- </div>
5126
- </div>
5127
- <br class="clear" />
5128
- <div class="field">
5129
- <label for="blockRepeatVotersType" class="pd-label">
5130
- <?php _e( 'Repeat Voting', 'polldaddy' ); ?></label>
5131
- <select id="poll-block-repeat" name="blockRepeatVotersType">
5132
- <option <?php echo $poll->blockRepeatVotersType == 'off' ? 'selected="selected"':''; ?> value="off"><?php _e( 'Off', 'polldaddy' ); ?></option>
5133
- <option <?php echo $poll->blockRepeatVotersType == 'cookie' ? 'selected="selected"':''; ?> value="cookie"><?php _e( 'Cookie', 'polldaddy' ); ?></option>
5134
- <option <?php echo $poll->blockRepeatVotersType == 'cookieip' ? 'selected="selected"':''; ?> value="cookieip"><?php _e( 'Cookie & IP address', 'polldaddy' ); ?></option>
5135
- </select>
5136
- </div>
5137
- <br class="clear" />
5138
- <div class="field">
5139
-
5140
- <label for="blockExpiration" class="pd-label"><?php _e( 'Block expiration limit', 'polldaddy' ); ?></label>
5141
-
5142
-
5143
- <select id="blockExpiration" name="blockExpiration">
5144
- <option value="3600" <?php echo $poll->blockExpiration == 3600 ? 'selected="selected"':''; ?>><?php printf( __( '%d hour', 'polldaddy' ), 1 ); ?></option>
5145
- <option value="10800" <?php echo (int) $poll->blockExpiration == 10800 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d hours', 'polldaddy' ), 3 ); ?></option>
5146
- <option value="21600" <?php echo (int) $poll->blockExpiration == 21600 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d hours', 'polldaddy' ), 6 ); ?></option>
5147
- <option value="43200" <?php echo (int) $poll->blockExpiration == 43200 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d hours', 'polldaddy' ), 12 ); ?></option>
5148
- <option value="86400" <?php echo (int) $poll->blockExpiration == 86400 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d day', 'polldaddy' ), 1 ); ?></option>
5149
- <option value="604800" <?php echo (int) $poll->blockExpiration == 604800 ? 'selected="selected"' : ''; ?>><?php printf( __( '%d week', 'polldaddy' ), 1 ); ?></option>
5150
- </select>
5151
- </div>
5152
- </div>
5153
- <br class="clear" />
5154
- </fieldset>
5155
- </td>
5156
- </tr>
5157
- <?php $this->plugin_options_add(); ?>
5158
- </tbody>
5159
- </table>
5160
- <p class="submit">
5161
- <?php wp_nonce_field( 'polldaddy-account' ); ?>
5162
- <input type="hidden" name="action" value="update-options" />
5163
- <input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Save Options', 'polldaddy' ) ); ?>" />
5164
- </p>
5165
- </form>
5166
- </div>
5167
- <?php
5168
- } // is_object( $poll )
5169
- global $current_user;
5170
- $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 );
5171
- $show_reset_form = false;
5172
- foreach( $fields as $field ) {
5173
- $value = get_option( $field );
5174
- if ( $value != false )
5175
- $show_reset_form = true;
5176
- $settings[ $field ] = $value;
5177
- }
5178
- if ( $show_reset_form ) {
5179
- echo "<h3>" . __( 'Reset Connection Settings', 'polldaddy' ) . "</h3>";
5180
- 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>";
5181
- echo "<p>" . __( 'The following settings will be reset:', 'polldaddy' ) . "</p>";
5182
- echo "<table>";
5183
- foreach( $settings as $key => $value ) {
5184
- if ( $value != '' ) {
5185
- if ( strpos( $key, 'usercode' ) )
5186
- $value = "***********" . substr( $value, -4 );
5187
- elseif ( in_array( $key, array( 'pd-rating-pages-id', 'pd-rating-comments-id', 'pd-rating-posts-id' ) ) )
5188
- $value = "$value (<a href='https://app.crowdsignal.com/ratings/{$value}/edit/'>" . __( 'Edit', 'polldaddy' ) . "</a>)";
5189
- echo "<tr><th style='text-align: right'>$key:</th><td>$value</td></tr>\n";
5190
- }
5191
- }
5192
- echo "</table>";
5193
- echo "<p>" . __( "* The usercode is like a password, keep it secret.", 'polldaddy' ) . "</p>";
5194
- ?>
5195
- <form action="" method="post">
5196
- <p class="submit">
5197
- <?php wp_nonce_field( 'polldaddy-reset' . $current_user->ID ); ?>
5198
- <input type="hidden" name="action" value="reset-account" />
5199
- <input type="hidden" name="account" value="import" />
5200
- <p><input type="checkbox" name="email" value="1" /> <?php _e( 'Send me an email with the connection settings for future reference' ); ?></p>
5201
- <input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Reset', 'polldaddy' ) ); ?>" />
5202
- </p>
5203
- </form>
5204
- <br />
5205
- <?php
5206
- }
5207
- $previous_settings = get_option( 'polldaddy_settings' );
5208
- if ( is_array( $previous_settings ) && !empty( $previous_settings ) ) {
5209
- echo "<h3>" . __( 'Restore Previous Settings', 'polldaddy' ) . "</h3>";
5210
- echo "<p>" . __( 'The connection settings for this site were reset but a backup was made. The following settings can be restored:', 'polldaddy' ) . "</p>";
5211
- echo "<table>";
5212
- foreach( $previous_settings as $key => $value ) {
5213
- if ( $value != '' ) {
5214
- if ( strpos( $key, 'usercode' ) )
5215
- $value = "***********" . substr( $value, -4 );
5216
- elseif ( in_array( $key, array( 'pd-rating-pages-id', 'pd-rating-comments-id', 'pd-rating-posts-id' ) ) )
5217
- $value = "$value (<a href='https://app.crowdsignal.com/ratings/{$value}/edit/'>" . __( 'Edit', 'polldaddy' ) . "</a>)";
5218
- echo "<tr><th style='text-align: right'>$key:</th><td>$value</td></tr>\n";
5219
- }
5220
- }
5221
- echo "</table>";
5222
- echo "<p>" . __( "* The usercode is like a password, keep it secret.", 'polldaddy' ) . "</p>";
5223
- ?>
5224
- <form action="" method="post">
5225
- <p class="submit">
5226
- <?php wp_nonce_field( 'polldaddy-restore' . $current_user->ID ); ?>
5227
- <input type="hidden" name="action" value="restore-account" />
5228
- <input type="hidden" name="account" value="import" />
5229
- <input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Restore', 'polldaddy' ) ); ?>" />
5230
- </p>
5231
- </form>
5232
- <br />
5233
- <?php
5234
- if (
5235
- $show_reset_form
5236
- && isset( $settings[ 'pd-rating-posts-id' ] )
5237
- && isset( $previous_settings[ 'pd-rating-posts-id' ] )
5238
- && $settings[ 'pd-rating-posts-id' ] != $previous_settings[ 'pd-rating-posts-id' ]
5239
- ) {
5240
- echo "<h3>" . __( 'Restore Ratings Settings', 'polldaddy' ) . "</h3>";
5241
- 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>";
5242
- echo "<p>" . __( 'This tells the plugin to look for this data in a different rating in your Crowdsignal account.', 'polldaddy' ) . "</p>";
5243
- ?>
5244
- <form action="" method="post">
5245
- <p class="submit">
5246
- <?php wp_nonce_field( 'polldaddy-restore-ratings' . $current_user->ID ); ?>
5247
- <input type="hidden" name="action" value="restore-ratings" />
5248
- <input type="hidden" name="account" value="import" />
5249
- <input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Restore Ratings Only', 'polldaddy' ) ); ?>" />
5250
- </p>
5251
- </form>
5252
- <br />
5253
- <?php
5254
- }
5255
- }
5256
  }
5257
 
5258
  function plugin_options_add() {}
@@ -5288,7 +4947,9 @@ if ( false == is_object( $poll ) ) {
5288
  return (bool) current_user_can( 'edit_others_posts' );
5289
  }
5290
 
5291
- function log( $message ) {}
 
 
5292
 
5293
  function contact_support_message( $message, $errors ) {
5294
  global $current_user;
@@ -5305,6 +4966,35 @@ if ( false == is_object( $poll ) ) {
5305
  echo "<li> Errors: " . print_r( $errors, 1 ) . "</li></ul>";
5306
  echo "</ol></ul></div>";
5307
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5308
  }
5309
 
5310
  require dirname( __FILE__ ).'/rating.php';
1
+ <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
  /**
3
  * Plugin Name: Crowdsignal Polls & Ratings
4
  * Plugin URI: http://wordpress.org/extend/plugins/polldaddy/
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.0
9
  */
10
 
11
  // To hardcode your Polldaddy PartnerGUID (API Key), add the (uncommented) line below with the PartnerGUID to your `wp-config.php`
16
  }
17
 
18
  if ( ! defined( 'POLLDADDY_API_VERSION' ) ) {
19
+ define( 'POLLDADDY_API_VERSION', 'v1' );
20
  }
21
 
22
  function polldaddy_api_path( $path, $version = POLLDADDY_API_VERSION ) {
54
  var $rating_user_code;
55
  var $has_feedback_menu;
56
 
57
+ public $has_items = array();
58
+
59
  function __construct() {
60
  global $current_user;
61
  $this->log( 'Created WP_Polldaddy Object: constructor' );
62
  $this->errors = new WP_Error;
63
  $this->scheme = 'https';
64
+ $this->version = '2.2.6';
65
+ $this->multiple_accounts = ! empty( get_option( 'polldaddy_usercode_user' ) );
66
  $this->polldaddy_client_class = 'api_client';
67
  $this->polldaddy_clients = array();
68
  $this->is_admin = (bool) current_user_can( 'manage_options' );
72
  $this->rating_user_code = null;
73
  $this->id = ($current_user instanceof WP_User) ? intval( $current_user->ID ): 0;
74
  $this->has_feedback_menu = false;
75
+ $this->has_crowdsignal_blocks = ! empty( get_option( 'crowdsignal_user_code' ) );
76
 
77
  if ( class_exists( 'Jetpack' ) ) {
78
  if ( method_exists( 'Jetpack', 'is_active' ) && Jetpack::is_active() ) {
122
  }
123
  }
124
 
125
+ /**
126
+ * Remove the feedback "All Posts" submenu if not needed.
127
+ */
128
  public function remove_feedback_menu() {
129
  remove_submenu_page( 'edit.php?post_type=feedback', 'edit.php?post_type=feedback' );
130
  }
131
 
132
+ /**
133
+ * Add the polldaddy option to the Jetpack options management whitelist.
134
+ *
135
+ * @param array $options The list of whitelisted option names.
136
+ * @return array The updated whitelist
137
+ */
138
  public static function add_to_jetpack_options_whitelist( $options ) {
139
  $options[] = 'polldaddy_api_key';
140
  return $options;
187
  add_action( "load-$hook", array( &$this, 'management_page_load' ) );
188
  }
189
 
190
+ foreach( array( 'polls' => __( 'Dashboard', 'polldaddy' ), 'ratings' => __( 'Ratings', 'polldaddy' ) ) as $menu_slug => $page_title ) {
191
  $menu_title = $page_title;
192
 
193
  $hook = add_submenu_page( $this->has_feedback_menu ? 'feedback' : $slug, $menu_title, $menu_title, $capability, $menu_slug, $function, 99 );
195
  }
196
 
197
  // Add settings pages.
198
+ foreach( array( 'pollsettings' => __( 'Crowdsignal', 'polldaddy' ), 'ratingsettings' => __( 'Rating', 'polldaddy' ) ) as $menu_slug => $page_title ) {
199
  // translators: %s placeholder is the setting page type (Poll or Rating).
200
  $settings_page_title = sprintf( esc_html__( '%s Settings', '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' ) );
342
  function print_errors() {
343
  if ( !$error_codes = $this->errors->get_error_codes() )
344
  return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
 
346
+ $this->render_partial( 'errors', array( 'error_codes' => $error_codes, 'errors' => $this->errors ) );
347
  $this->errors = new WP_Error;
 
 
 
 
 
 
348
  }
349
 
350
  function api_key_page() {
351
  $this->print_errors();
352
+ ?>
353
 
354
+ <div class="wrap">
355
+ <h2 id="polldaddy-header"><?php _e( 'Crowdsignal', 'polldaddy' ); ?></h2>
356
 
357
+ <p><?php printf( __( 'Before you can use the Crowdsignal plugin, you need to enter your <a href="%s">Crowdsignal.com</a> account details.', 'polldaddy' ), 'https://app.crowdsignal.com/' ); ?></p>
358
 
359
+ <form action="" method="post">
360
+ <table class="form-table">
361
+ <tbody>
362
+ <tr class="form-field form-required">
363
+ <th valign="top" scope="row">
364
+ <label for="polldaddy-email"><?php _e( 'Crowdsignal Email Address', 'polldaddy' ); ?></label>
365
+ </th>
366
+ <td>
367
+ <input type="text" name="polldaddy_email" id="polldaddy-email" aria-required="true" size="40" />
368
+ </td>
369
+ </tr>
370
+ <tr class="form-field form-required">
371
+ <th valign="top" scope="row">
372
+ <label for="polldaddy-password"><?php _e( 'Crowdsignal Password', 'polldaddy' ); ?></label>
373
+ </th>
374
+ <td>
375
+ <input type="password" name="polldaddy_password" id="polldaddy-password" aria-required="true" size="40" />
376
+ </td>
377
+ </tr>
378
+ </tbody>
379
+ </table>
380
+ <p class="submit">
381
+ <?php wp_nonce_field( 'polldaddy-account' ); ?>
382
+ <input type="hidden" name="action" value="account" />
383
+ <input type="hidden" name="account" value="import" />
384
+ <input class="button-secondary" type="submit" value="<?php echo esc_attr( __( 'Submit', 'polldaddy' ) ); ?>" />
385
+ </p>
386
+ </form>
387
+ </div>
388
 
389
+ <?php
390
  }
391
 
392
  function media_buttons() {
394
  echo " <a href='admin.php?page=polls&iframe&TB_iframe=true' onclick='return false;' id='add_poll' class='button thickbox' title='" . esc_attr( $title ) . "'><img src='{$this->base_url}img/polldaddy@2x.png' width='15' height='15' alt='" . esc_attr( $title ) . "' style='margin: -2px 0 0 -1px; padding: 0 2px 0 0; vertical-align: middle;' /> " . esc_html( $title ) . "</a>";
395
  }
396
 
397
+ function get_usercode( $for_current_user = false ) {
398
+ // sitewide access to Crowdsignal account
399
+ if ( ! $for_current_user && $user_id = get_option( 'polldaddy_usercode_user' ) ) {
400
+ return get_option( 'pd-usercode-' . $user_id );
401
+ } else {
402
+ return get_option( 'pd-usercode-' . $this->id );
403
+ }
404
+ }
405
+
406
  function set_api_user_code() {
407
 
408
  $this->user_code = get_option( 'pd-usercode-'.$this->id );
421
  } else {
422
  update_option( 'pd-usercode-' . $this->id, $this->user_code, false );
423
  }
424
+ } elseif ( get_option( 'crowdsignal_api_key' ) === get_option( 'polldaddy_api_key' ) ) {
425
+ // attempt to get credentials from Crowdsignal Forms.
426
+ $this->user_code = get_option( 'crowdsignal_user_code' );
427
  } elseif ( get_option( 'polldaddy_api_key' ) ) {
428
  $this->contact_support_message( 'There was a problem linking your account', $polldaddy->errors );
429
  }
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' ) {
1327
 
1328
  function settings_page() {
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();
1336
 
1337
+ if ( isset( $_GET['page'] ) ) { // phpcs:ignore
1338
+ $page = $_GET['page']; // phpcs:ignore
1339
+ }
1340
+ if ( 'pollsettings' === $page ) {
1341
+ if ( ! $this->is_author ) { // check user privileges has access to action.
1342
+ return;
1343
+ }
1344
+ $this->plugin_options();
1345
+ } elseif ( 'ratingsettings' === $page ) {
1346
+ if ( 'update-rating' === $action ) {
1347
+ $this->update_rating();
1348
+ }
1349
 
1350
+ $this->rating_settings();
1351
+ }
1352
+ ?>
1353
+ </div>
1354
+ </div>
1355
+ <?php
1356
  }
1357
 
1358
  function management_page() {
 
1359
  global $page, $action, $poll, $style, $rating;
1360
+ $poll = (int) $poll;
1361
+ $style = (int) $style;
1362
  $rating = esc_html( $rating );
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 ) {
1370
+ if ( ! $this->is_author && in_array( $action, array( 'edit', 'edit-poll', 'create-poll', 'edit-style', 'create-style', 'list-styles' ), true ) ) { // check user privileges has access to action.
1371
+ $action = '';
 
 
 
 
1372
  }
1373
+ switch ( $action ) {
1374
+ case 'preview':
1375
+ if ( isset( $_GET['iframe'] ) ) {
1376
+ if ( isset( $_GET['popup'] ) ) {
1377
+ ?>
1378
+ <h2 id="poll-list-header"><?php printf( __( 'Preview Poll <a href="%s" class="add-new-h2">All Polls</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ) ); ?></h2>
1379
+ <?php
1380
+ }
1381
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1382
 
1383
+ echo do_shortcode( "[crowdsignal poll=$poll cb=1]" );
1384
+
1385
+ wp_print_scripts( 'polldaddy-poll-js' );
1386
+ break;
1387
+ case 'results':
1388
+ ?>
1389
+ <h2 id="poll-list-header">
1390
+ <?php printf( __( 'Poll Results <a href="%s" class="add-new-h2">All Polls</a> <a href="%s" class="add-new-h2">Edit Poll</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ), esc_url( add_query_arg( array( 'action' => 'edit-poll', 'poll' => $poll, 'message' => false ) ) ) ); ?>
1391
+ </h2>
1392
+ <?php
1393
+ $this->poll_results_page( $poll );
1394
+ break;
1395
+ case 'edit':
1396
+ case 'edit-poll':
1397
+ ?>
1398
+ <h2 id="poll-list-header">
1399
+ <?php printf( __( 'Edit Poll <a href="%s" class="add-new-h2">All Polls</a> <a href="%s" class="add-new-h2">View Results</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ), esc_url( add_query_arg( array( 'action' => 'results', 'poll' => $poll, 'message' => false ) ) ) ); ?>
1400
+ </h2>
1401
+ <?php
1402
+
1403
+ $this->poll_edit_form( $poll );
1404
+ break;
1405
+ case 'create-poll':
1406
+ ?>
1407
+ <h2 id="poll-list-header"><?php printf( __( 'Add New Poll <a href="%s" class="add-new-h2">All Polls</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ) ); ?></h2>
1408
+ <?php
1409
+ $this->poll_edit_form();
1410
+ break;
1411
+ case 'list-styles':
1412
+ ?>
1413
+ <h2 id="polldaddy-header">
1414
+ <?php
1415
+ if ( $this->is_author )
1416
+ printf( __( 'Custom Styles <a href="%s" class="add-new-h2">Add New</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'create-style', 'poll' => false, 'message' => false ) ) ) );
1417
+ else
1418
+ _e( 'Custom Styles', 'polldaddy' );
1419
+ ?>
1420
+ </h2>
1421
+ <?php
1422
+ $this->styles_table();
1423
+ break;
1424
+ case 'edit-style':
1425
+ ?>
1426
+ <h2 id="polldaddy-header">
1427
+ <?php printf( __( 'Edit Style <a href="%s" class="add-new-h2">List Styles</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'list-styles', 'style' => false, 'message' => false, 'preload' => false ) ) ) ); ?>
1428
+ </h2>
1429
+ <?php
1430
+
1431
+ $this->style_edit_form( $style );
1432
+ break;
1433
+ case 'create-style':
1434
+ ?>
1435
+ <h2 id="polldaddy-header">
1436
+ <?php printf( __( 'Create Style <a href="%s" class="add-new-h2">List Styles</a>', 'polldaddy' ), esc_url( add_query_arg( array( 'action' => 'list-styles', 'style' => false, 'message' => false, 'preload' => false ) ) ) ); ?>
1437
+ </h2>
1438
+ <?php
1439
+ $this->style_edit_form();
1440
+ break;
1441
+ default:
1442
+ $view_type = 'me'; // default (and only) config for self-hosted.
1443
+
1444
+ // cascaded attempt to "show something".
1445
+ if ( ! $this->has_items_for_view( $view_type ) ) {
1446
+ $this->render_landing_page();
1447
+ break;
1448
+ }
1449
 
1450
+ $this->polls_table( $view_type );
1451
+ } //end switch.
1452
+ } elseif ( 'ratings' === $page ) {
1453
+ if ( ! $this->is_admin && ! in_array( $action, array( 'delete', 'reports' ), true ) ) { // check user privileges has access to action.
1454
+ $action = 'reports';
1455
+ }
1456
 
1457
+ switch ( $action ) {
1458
+ case 'delete':
1459
+ case 'reports':
1460
+ $this->rating_reports();
1461
+ break;
1462
+ }//end switch
 
 
 
 
 
 
1463
  }
1464
+ ?>
1465
+ </div>
1466
+ </div>
1467
+ <?php
1468
+ }
1469
 
1470
+ private function render_landing_page() {
1471
+ $this->render_partial(
1472
+ 'crowdsignal-landing-page',
1473
+ array(
1474
+ 'resource_path' => $this->base_url,
1475
+ )
1476
+ );
1477
+ }
 
 
 
 
1478
 
 
 
 
 
1479
 
1480
+ private function has_items_for_view( $view = 'me' ) {
1481
+ if ( isset( $this->has_items[ $view ] ) ) {
1482
+ return $this->has_items[ $view ];
1483
+ }
 
1484
 
1485
+ $guid = WP_POLLDADDY__PARTNERGUID;
1486
+ // re-write the user_code based on the intended view.
1487
+ switch ( $view ) {
1488
+ case 'csforms':
1489
+ $this->user_code = get_option( 'crowdsignal_user_code' );
1490
+ $guid = get_option( 'crowdsignal_api_key' );
1491
  break;
1492
+ case 'blog':
1493
+ $this->user_code = $this->get_usercode();
1494
+ break;
1495
+ default:
1496
+ $this->user_code = get_option( 'pd-usercode-' . $this->id );
1497
  }
 
1498
 
1499
+ if ( empty( $this->user_code ) ) {
1500
+ // use set_api_user_code last attempt.
1501
+ $this->set_api_user_code();
1502
+ }
 
1503
 
1504
+ $polldaddy = $this->get_client( $guid, $this->user_code );
 
 
 
 
1505
  $polldaddy->reset();
1506
 
1507
+ $polls_object = $polldaddy->get_items( 1, 1, 0, 'csforms' === $view ? get_site_url() : '' );
 
 
 
1508
 
1509
+ if ( ! $polls_object ) {
 
1510
  return false;
1511
+ }
1512
+ $polls = & $polls_object->item;
1513
+
1514
  if ( isset( $polls_object->_total ) ) {
1515
  $total_polls = $polls_object->_total;
1516
+ } else {
1517
  $total_polls = count( $polls );
1518
  }
 
 
 
 
 
 
 
 
 
 
1519
 
1520
+ $this->has_items[ $view ] = $total_polls > 0;
1521
 
1522
+ return $this->has_items[ $view ];
1523
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1524
 
 
 
 
 
1525
 
1526
+ function polls_table( $view = 'me' ) {
1527
+ $page = 1;
1528
+ if ( isset( $_GET['paged'] ) ) { // phpcs:ignore
1529
+ $page = absint( $_GET['paged'] ); // phpcs:ignore
1530
  }
1531
 
1532
+ $guid = WP_POLLDADDY__PARTNERGUID;
1533
+ // re-write the user_code based on the intended view.
1534
+ switch ( $view ) {
1535
+ case 'csforms':
1536
+ $this->user_code = get_option( 'crowdsignal_user_code' );
1537
+ $guid = get_option( 'crowdsignal_api_key' );
1538
+ break;
1539
+ case 'blog':
1540
+ $this->user_code = $this->get_usercode();
1541
+ break;
1542
+ default:
1543
+ $this->user_code = get_option( 'pd-usercode-' . $this->id );
 
1544
  }
1545
 
1546
+ if ( empty( $this->user_code ) ) {
1547
+ // use set_api_user_code last attempt.
1548
+ $this->set_api_user_code();
 
 
 
1549
  }
1550
 
1551
+ $polldaddy = $this->get_client( $guid, $this->user_code );
1552
+ $polldaddy->reset();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1553
 
1554
+ $items = $polldaddy->get_items( $page, 20, 0, 'csforms' === $view ? get_site_url() : '' );
1555
 
1556
+ $this->parse_errors( $polldaddy );
1557
+ if ( in_array( 'API Key Not Found, 890', $polldaddy->errors, true ) ) {
1558
+ return false;
1559
+ }
1560
 
1561
+ $total = $items->_total;
1562
+ $items = $items->item;
1563
+ $connected_account = $polldaddy->get_account();
1564
 
1565
+ $this->print_errors();
 
 
 
 
 
 
 
 
 
1566
 
1567
+ $page_links = paginate_links(
1568
+ array(
1569
+ 'base' => add_query_arg( 'paged', '%#%' ),
1570
+ 'format' => '',
1571
+ 'total' => ceil( $total / 10 ),
1572
+ 'current' => $page,
1573
+ 'prev_text' => '&laquo;',
1574
+ 'next_text' => '&raquo;',
1575
+ )
1576
+ );
1577
 
1578
+ global $current_user;
1579
 
1580
+ $current_user_name = ( $current_user instanceof WP_User ) && $current_user->first_name && $current_user->last_name
1581
+ ? "{$current_user->first_name} {$current_user->last_name}"
1582
+ : $current_user->user_login;
1583
+
1584
+ $global_user_id = (int) get_option( 'polldaddy_usercode_user' );
1585
+ $global_user_name = '';
1586
+ if ( $global_user_id ) {
1587
+ $global_user_account = new WP_User( $global_user_id );
1588
+ $global_user_name = $global_user_account && $global_user_account->first_name && $global_user_account->last_name
1589
+ ? "{$global_user_account->first_name} {$global_user_account->last_name}"
1590
+ : ( $global_user_account ? $global_user_account->user_login : __( 'Disconnected user', 'polldaddy' ) );
1591
+ }
1592
 
1593
+ // reset $this vars at this point so we show a consistent list with less "tabbed" options.
1594
+ $this->has_crowdsignal_blocks = false;
1595
+ $this->multiple_accounts = false;
1596
 
1597
+ $cs_forms_account = $this->get_crowdsignal_connected_account();
1598
 
1599
+ switch ( $view ) {
1600
+ case 'csforms':
1601
+ $current_user_owns_connection = ! empty( $cs_forms_account ) && $cs_forms_account->email === $current_user->user_email;
1602
+ break;
1603
+ default: // me and blog case.
1604
+ $current_user_owns_connection = ! empty( $connected_account ) && $connected_account->email === $current_user->user_email;
1605
+ }
1606
 
1607
+ $this->render_partial(
1608
+ 'polls-table',
1609
+ array(
1610
+ 'page_links' => $page_links,
1611
+ 'items' => $items,
1612
+ 'can_manage_options' => current_user_can( 'manage_options' ),
1613
+ 'connected_account_email' => ! empty( $connected_account ) ? $connected_account->email : '',
1614
+ 'is_author' => $this->is_author,
1615
+ 'is_admin' => $this->is_admin,
1616
+ 'current_user_name' => $current_user_name,
1617
+ 'resource_path' => $this->base_url,
1618
+ 'has_multiple_accounts' => $this->multiple_accounts && $this->has_items_for_view( 'blog' ),
1619
+ 'global_user_id' => $global_user_id,
1620
+ 'global_user_name' => $global_user_name,
1621
+ 'current_user_owns_connection' => $current_user_owns_connection,
1622
+ 'user_id' => (int) $this->id,
1623
+ 'view' => $view,
1624
+ 'has_crowdsignal_blocks' => $this->has_crowdsignal_blocks && $this->has_items_for_view( 'csforms' ),
1625
+ 'cs_forms_account_email' => $this->has_crowdsignal_blocks && $cs_forms_account ? $cs_forms_account->email : '',
1626
+ )
1627
+ );
1628
+ }
1629
 
1630
+ private function get_crowdsignal_connected_account() {
1631
+ if ( $this->has_crowdsignal_blocks ) {
1632
+ $polldaddy = $this->get_client( get_option( 'crowdsignal_api_key' ), get_option( 'crowdsignal_user_code' ) );
1633
+ $polldaddy->reset();
1634
+ return $polldaddy->get_account();
1635
+ }
1636
 
1637
+ return false;
1638
  }
1639
 
1640
+
1641
  function poll_table_add_option() {}
1642
 
1643
  function poll_table_extra() {}
4817
  if ( isset( $_POST['polldaddy_email'] ) ) {
4818
  $account_email = false;
4819
  } else {
4820
+ $connected = false;
4821
+ $account_email = '';
4822
+ $polldaddy = $this->get_client( WP_POLLDADDY__PARTNERGUID, $this->user_code );
4823
+ $account = $polldaddy->get_account();
4824
+
4825
+ if ( ! empty( $account ) ) {
4826
+ $connected = true;
4827
+ $account_email = $account->email;
4828
+ }
4829
 
4830
  $polldaddy->reset();
4831
  $poll = $polldaddy->get_poll( 1 );
4887
  153 => __( 'Sunset Medium', 'polldaddy' ),
4888
  154 => __( 'Sunset Wide', 'polldaddy' ),
4889
  155 => __( 'Music Medium', 'polldaddy' ),
4890
+ 156 => __( 'Music Wide', 'polldaddy' ),
4891
  );
4892
 
4893
  $polldaddy->reset();
4894
  $styles = $polldaddy->get_styles();
4895
 
4896
+ if ( ! empty( $styles ) && ! empty( $styles->style ) && count( $styles->style ) > 0 ) {
4897
  foreach ( (array) $styles->style as $style ) {
4898
  $options[ (int) $style->_id ] = $style->title;
4899
  }
4900
  }
4901
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4902
 
4903
+ $this->print_errors();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4904
 
4905
+ $this->render_partial(
4906
+ 'settings',
4907
+ array(
4908
+ 'is_connected' => $connected,
4909
+ 'poll' => $poll,
4910
+ 'options' => $options,
4911
+ 'controller' => $this,
4912
+ 'account_email' => $account_email,
4913
+ )
4914
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4915
  }
4916
 
4917
  function plugin_options_add() {}
4947
  return (bool) current_user_can( 'edit_others_posts' );
4948
  }
4949
 
4950
+ function log( $message ) {
4951
+ // error_log( print_r( $message, true ) );
4952
+ }
4953
 
4954
  function contact_support_message( $message, $errors ) {
4955
  global $current_user;
4966
  echo "<li> Errors: " . print_r( $errors, 1 ) . "</li></ul>";
4967
  echo "</ol></ul></div>";
4968
  }
4969
+
4970
+ /**
4971
+ * Renders a partial/template.
4972
+ *
4973
+ * The global $current_user is made available for any rendered template.
4974
+ *
4975
+ * @param string $partial - Filename under ./partials directory, with or without .php (appended if absent).
4976
+ * @param array $page_vars - Variables made available for the template.
4977
+ */
4978
+ public function render_partial( $partial, array $page_vars = array() ) {
4979
+ if ( substr( $partial, -4 ) !== '.php' ) {
4980
+ $partial .= '.php';
4981
+ }
4982
+
4983
+ if ( strpos( $partial, 'partials/' ) !== 0 ) {
4984
+ $partial = 'partials/' . $partial;
4985
+ }
4986
+
4987
+ $path = __DIR__ . '/' . $partial;
4988
+ if ( ! file_exists( $path ) ) {
4989
+ return;
4990
+ }
4991
+
4992
+ foreach ( $page_vars as $key => $val ) {
4993
+ $$key = $val;
4994
+ }
4995
+ global $current_user;
4996
+ include $path;
4997
+ }
4998
  }
4999
 
5000
  require dirname( __FILE__ ).'/rating.php';
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Crowdsignal Polls & Ratings ===
2
  Contributors: eoigal, mdawaffe, donncha, johnny5, panosktn, ice9js, cgastrell
3
  Tags: crowdsignal, polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
4
- Requires at least: 4.6
5
  Requires PHP: 5.6
6
  Tested up to: 5.7.1
7
- Stable tag: 2.2.6
8
 
9
  Create and manage Crowdsignal polls and ratings from within WordPress.
10
 
@@ -123,10 +123,15 @@ This is possible if your server or network is blocking outgoing calls to Crowdsi
123
  Make sure to whitelist `api.crowdsignal.com` in your firewall to fix this.
124
 
125
  == Upgrade Notice ==
126
- Bugfix release.
127
 
128
  == Changelog ==
129
 
 
 
 
 
 
130
  = 2.2.6 =
131
  * Address an issue with Jetpack + Grunion Contact form fighting for the same submenu slugs (#60)
132
 
1
  === Crowdsignal Polls & Ratings ===
2
  Contributors: eoigal, mdawaffe, donncha, johnny5, panosktn, ice9js, cgastrell
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.1
7
+ Stable tag: 3.0.0
8
 
9
  Create and manage Crowdsignal polls and ratings from within WordPress.
10
 
123
  Make sure to whitelist `api.crowdsignal.com` in your firewall to fix this.
124
 
125
  == Upgrade Notice ==
126
+ Revamp wp-admin styles: Crowdsignal dashboard
127
 
128
  == Changelog ==
129
 
130
+ = 3.0.0 =
131
+ * New dashboard menu
132
+ * Show landing page when there are no items available
133
+ * Multiple accounts feature is now deprecated, will continue to work until disabled
134
+
135
  = 2.2.6 =
136
  * Address an issue with Jetpack + Grunion Contact form fighting for the same submenu slugs (#60)
137