Changeset 3374483
- Timestamp:
- 10/07/2025 02:25:18 PM (2 months ago)
- Location:
- polldaddy/trunk
- Files:
-
- 2 added
- 1 deleted
- 17 edited
-
ajax.php (modified) (1 diff)
-
css/polldaddy.css (modified) (2 diffs)
-
js/polldaddy.js (modified) (1 diff)
-
languages (added)
-
languages/polldaddy.pot (added)
-
locale (deleted)
-
partials/api-key-page.php (modified) (1 diff)
-
partials/crowdsignal-landing-page.php (modified) (2 diffs)
-
partials/html-admin-setup-footer.php (modified) (1 diff)
-
partials/html-admin-setup-header.php (modified) (6 diffs)
-
partials/html-admin-setup-step-1.php (modified) (2 diffs)
-
partials/poll-edit-form.php (modified) (6 diffs)
-
partials/polls-table.php (modified) (5 diffs)
-
partials/settings-2.php (modified) (2 diffs)
-
partials/settings.php (modified) (8 diffs)
-
polldaddy-org.php (modified) (4 diffs)
-
polldaddy-shortcode.php (modified) (2 diffs)
-
polldaddy.php (modified) (41 diffs)
-
popups.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
polldaddy/trunk/ajax.php
r984268 r3374483 78 78 <tr> 79 79 <th> 80 <span class="handle" title="' . esc_attr( __( 'click and drag to reorder' ) ) . '"><img src="' . $src . 'img/icon-reorder.png" alt="click and drag to reorder" width="6" height="9" /></span>80 <span class="handle" title="' . esc_attr( __( 'click and drag to reorder', 'polldaddy' ) ) . '"><img src="' . $src . 'img/icon-reorder.png" alt="' . esc_attr( __( 'click and drag to reorder', 'polldaddy' ) ) . '" width="6" height="9" /></span> 81 81 </th> 82 82 <td class="answer-input"> -
polldaddy/trunk/css/polldaddy.css
r2938809 r3374483 96 96 padding-left: 4px; 97 97 padding-right: 4px; 98 visibility: hidden;98 opacity: 0.7; 99 99 } 100 100 … … 107 107 } 108 108 table.cs-dashboard__grid tr:hover .is-links a { 109 visibility: visible;109 opacity: 1; 110 110 } 111 111 -
polldaddy/trunk/js/polldaddy.js
r1024558 r3374483 1 jQuery(function(e){if(typeof window.$=="undefined"){window.$=jQuery}Plugin=function(t){function i(){return"https:"==document.location.protocol?true:false}function s(e,t){return false}function o(){var e=jQuery("body",window.parent.document).width();var t=jQuery("body",window.parent.document).height();var n=typeof document.body.style.maxHeight==="undefined";jQuery("#TB_window, #TB_iframeContent",window.parent.document).css("width","855px");jQuery("#TB_window",window.parent.document).css({left:(e-768)/2+"px",top:48+window.parent.scrollY+"px",position:"absolute",marginLeft:"0"});if(!n){jQuery("#TB_window, #TB_iframeContent",window.parent.document).css("height",t-73+"px")}}function p(){o();jQuery(window).resize(function(){setTimeout(o,50)});e("a.delete-media").unbind("click").click(function(){var t=e(this).parents("td.answer-media-icons");t.find("li.image-added").removeClass("image-added").html("");t.find(":hidden").val("")});e("td.answer-media-icons li.image-added").unbind("mouseover").mouseover(function(){e(this).find("img").addClass("hidden");e(this).find("a.delete-media img").removeClass("hidden");e(this).find("a.delete-media").removeClass("hidden")}).unbind("mouseout").mouseout(function(){e(this).find("a.delete-media").addClass("hidden");e(this).find("img").removeClass("hidden")});e(".image").unbind("click").click(function(){var t=e(this).attr("id").replace("add_poll_image",""); tb_show("Add an Image","media-upload.php?type=image&polls_media=1TB_iframe=1");a.send_to_editor=function(n){var r=e("<div/>").html(n);img=r.find("img");attach_id=0;url=img.attr("src");if(i())url=url.replace("http://","https://");match=img.attr("class").match(/wp-image-(\d+)/);if(e.isArray(match)&&match[1]!==undefined)attach_id=match[1];tb_remove();d(url,t,attach_id)};return false});e(".video").unbind("click").click(function(){var t=e(this).attr("id").replace("add_poll_video","");tb_show("Add Video","media-upload.php?type=video&tab=type_url&polls_media=1&TB_iframe=1");a.send_to_editor=function(e){tb_remove();v(t,e,'<img height="16" width="16" src="'+n.base_url+'img/icon-report-ip-analysis.png" alt="Video Embed">')};return false});e(".audio").unbind("click").click(function(){var t=e(this).attr("id").replace("add_poll_audio","");tb_show("Add Audio","media-upload.php?type=audio&polls_media=1&TB_iframe=1");a.send_to_editor=function(n){var r=e("<div/>").html(n);img=r.find("img");attach_id=0;url=img.attr("src");if(i())url=url.replace("http://","https://");match=img.attr("class").match(/wp-image-(\d+)/);if(e.isArray(match)&&match[1]!==undefined)attach_id=match[1];tb_remove();d(url,t,attach_id)};return false})}function d(t,n,r){if(h==true)return false;h=true;e('input[name="media['+n+']"]').parents("td").find(".media-preview").addClass("st_image_loader");e("form[name=send-media] input[name=media-id]").val(n);e("form[name=send-media] input[name=attach-id]").val(r);e("form[name=send-media] input[name=url]").val(t);e("form[name=send-media] input[name=action]").val("polls_upload_image");e("form[name=send-media]").ajaxSubmit(function(e){h=false;e=e.replace(/<div.*/,"");if(e.substr(0,4)=="true"){var t=e.split("||");v(t[4],t[1],t[2])}else v(n,"","")});return false}function v(t,n,r){if(parseInt(n)>0)e('input[name="mediaType['+t+']"]').val(1);else e('input[name="mediaType['+t+']"]').val(2);if(i())r.replace("http://","https://");var s=e("div.hidden-links").find("div.delete-media-link").html();r+=s;var o=e('input[name="media['+t+']"]').parents("td.answer-media-icons").find("li.media-preview");o.removeClass("st_image_loader");o.html(r);o.addClass("image-added");e('input[name="media['+t+']"]').val(n);p()}function m(){var t=parseInt(e(".answer").size());e("input.answer-text").each(function(){var r=this;if(e(r).val()==n.new_answer||e(r).hasClass("idle"))t--});return t}var n=e.extend({delete_rating:'Are you sure you want to delete the rating for "%s"?',delete_poll:'Are you sure you want to delete "%s"?',delete_answer:"Are you sure you want to delete this answer?",new_answer:"Enter an answer here",delete_answer_title:"delete this answer",reorder_answer_title:"click and drag to reorder",add_image_title:"Add an Image",add_audio_title:"Add Audio",add_video_title:"Add Video",standard_styles:"Standard Styles",custom_styles:"Custom Styles",base_url:""},t);e(".hide-if-js").hide();e(".empty-if-js").empty();e(".hide-if-no-js").removeClass("hide-if-no-js");e(".polldaddy-shortcode-row pre").click(function(){var t=e(this)[0];if(e.browser.msie){var n=document.body.createTextRange();n.moveToElementText(t);n.select()}else if(e.browser.mozilla||e.browser.opera){var r=window.getSelection();var n=document.createRange();n.selectNodeContents(t);r.removeAllRanges();r.addRange(n)}else if(e.browser.safari){var r=window.getSelection();r.setBaseAndExtent(t,0,t,1)}});e("input#shortcode-field").click(function(){e(this).select()});e("a.delete-rating").click(function(){return confirm(n.delete_rating.replace("%s",e(this).parents("td").find("strong").text()))});e("a.delete-poll").click(function(){return confirm(n.delete_poll.replace("%s",e(this).parents("td").find("strong").text()))});e("span.view a.thickbox").attr("href",function(){return e(this).attr("href")+"&iframe&TB_iframe=true"});var r=function(t){e("a.delete-answer",t||null).click(function(){if(confirm(n.delete_answer)){e(this).parents("li").remove();e("#choices option:last-child").remove()}return false})};r();e("#answers").sortable({axis:"y",containment:"parent",handle:".handle",tolerance:"pointer"});var u=false;e("#add-answer-holder").show().find("button").click(function(){if(!u){u=true;var t=(1+m()).toString();var n=e(this).closest("p").attr("class");e("form[name=add-answer] input[name=aa]").val(t);e("form[name=add-answer] input[name=src]").val(n);e("form[name=add-answer] input[name=action]").val("polls_add_answer");e("form[name=add-answer]").ajaxSubmit(function(n){r(e("#answers").append(n).find("li:last"));e("#choices").append('<option value="'+(t-1)+'">'+(t-1)+"</option>");u=false;p()})}return false});var a=window.dialogArguments||opener||parent||top;e(".polldaddy-send-to-editor").click(function(){var t=e(this).parents("div.row-actions").find(".polldaddy-poll-id").val();if(!t)t=e(".polldaddy-poll-id:first").val();if(t){t=parseInt(t);if(t>0){a.send_to_editor("[polldaddy poll="+t.toString()+"]")}}});e(".polldaddy-show-shortcode").toggle(function(t){t.preventDefault();e(this).parents("tr:first").next("tr").fadeIn();e(this).parents("tr:first").next("tr").show();e(this).closest("tr").css("display","none");return false},function(){e(this).parents("tr:first").next("tr").fadeOut();e(this).parents("tr:first").next("tr").hide();return false});e(".pd-embed-done").click(function(t){t.preventDefault();e(this).closest("tr").hide();e(this).closest("tr").prev("tr").show()});e(".pd-tabs a").click(function(){if(!jQuery(this).closest("li").hasClass("selected")){jQuery(".pd-tabs li").removeClass("selected");jQuery(this).closest("li").addClass("selected");jQuery(".pd-tab-panel").removeClass("show");jQuery(".pd-tab-panel#"+e(this).closest("li").attr("id")+"-panel").addClass("show")}});var f=e(":input[name=styleID]");var l=e(":input[name=customSelect]");var c=parseInt(l.val());if(c>0){f.val(c.toString());e("#pd-custom-styles a").click()}e("#multipleChoice").click(function(){if(e("#multipleChoice").is(":checked")){e("#numberChoices").show("fast")}else{e("#numberChoices").hide("fast")}});e(".block-repeat").click(function(){var t=jQuery(this).val();if(t=="off"){e("#cookieip_expiration_label").hide();e("#cookieip_expiration").hide()}else{e("#cookieip_expiration_label").show();e("#cookieip_expiration").show()}});var h=false;p();var g={add_media:v};return g}})1 jQuery(function(e){if(typeof window.$=="undefined"){window.$=jQuery}Plugin=function(t){function i(){return"https:"==document.location.protocol?true:false}function s(e,t){return false}function o(){var e=jQuery("body",window.parent.document).width();var t=jQuery("body",window.parent.document).height();var n=typeof document.body.style.maxHeight==="undefined";jQuery("#TB_window, #TB_iframeContent",window.parent.document).css("width","855px");jQuery("#TB_window",window.parent.document).css({left:(e-768)/2+"px",top:48+window.parent.scrollY+"px",position:"absolute",marginLeft:"0"});if(!n){jQuery("#TB_window, #TB_iframeContent",window.parent.document).css("height",t-73+"px")}}function p(){o();jQuery(window).resize(function(){setTimeout(o,50)});e("a.delete-media").unbind("click").click(function(){var t=e(this).parents("td.answer-media-icons");t.find("li.image-added").removeClass("image-added").html("");t.find(":hidden").val("")});e("td.answer-media-icons li.image-added").unbind("mouseover").mouseover(function(){e(this).find("img").addClass("hidden");e(this).find("a.delete-media img").removeClass("hidden");e(this).find("a.delete-media").removeClass("hidden")}).unbind("mouseout").mouseout(function(){e(this).find("a.delete-media").addClass("hidden");e(this).find("img").removeClass("hidden")});e(".image").unbind("click").click(function(){var t=e(this).attr("id").replace("add_poll_image","");var r="media-upload.php?type=image&polls_media=1";if(typeof pollsMediaSecurity!=="undefined"&&pollsMediaSecurity.nonce){r+="&_wpnonce="+encodeURIComponent(pollsMediaSecurity.nonce)}tb_show("Add an Image",r+"&TB_iframe=1");a.send_to_editor=function(n){var r=e("<div/>").html(n);img=r.find("img");attach_id=0;url=img.attr("src");if(i())url=url.replace("http://","https://");match=img.attr("class").match(/wp-image-(\d+)/);if(e.isArray(match)&&match[1]!==undefined)attach_id=match[1];tb_remove();d(url,t,attach_id)};return false});e(".video").unbind("click").click(function(){var t=e(this).attr("id").replace("add_poll_video","");var r="media-upload.php?type=video&tab=type_url&polls_media=1";if(typeof pollsMediaSecurity!=="undefined"&&pollsMediaSecurity.nonce){r+="&_wpnonce="+encodeURIComponent(pollsMediaSecurity.nonce)}tb_show("Add Video",r+"&TB_iframe=1");a.send_to_editor=function(e){tb_remove();v(t,e,'<img height="16" width="16" src="'+n.base_url+'img/icon-report-ip-analysis.png" alt="Video Embed">')};return false});e(".audio").unbind("click").click(function(){var t=e(this).attr("id").replace("add_poll_audio","");var r="media-upload.php?type=audio&polls_media=1";if(typeof pollsMediaSecurity!=="undefined"&&pollsMediaSecurity.nonce){r+="&_wpnonce="+encodeURIComponent(pollsMediaSecurity.nonce)}tb_show("Add Audio",r+"&TB_iframe=1");a.send_to_editor=function(n){var r=e("<div/>").html(n);img=r.find("img");attach_id=0;url=img.attr("src");if(i())url=url.replace("http://","https://");match=img.attr("class").match(/wp-image-(\d+)/);if(e.isArray(match)&&match[1]!==undefined)attach_id=match[1];tb_remove();d(url,t,attach_id)};return false})}function d(t,n,r){if(h==true)return false;h=true;e('input[name="media['+n+']"]').parents("td").find(".media-preview").addClass("st_image_loader");e("form[name=send-media] input[name=media-id]").val(n);e("form[name=send-media] input[name=attach-id]").val(r);e("form[name=send-media] input[name=url]").val(t);e("form[name=send-media] input[name=action]").val("polls_upload_image");e("form[name=send-media]").ajaxSubmit(function(e){h=false;e=e.replace(/<div.*/,"");if(e.substr(0,4)=="true"){var t=e.split("||");v(t[4],t[1],t[2])}else v(n,"","")});return false}function v(t,n,r){if(parseInt(n)>0)e('input[name="mediaType['+t+']"]').val(1);else e('input[name="mediaType['+t+']"]').val(2);if(i())r.replace("http://","https://");var s=e("div.hidden-links").find("div.delete-media-link").html();r+=s;var o=e('input[name="media['+t+']"]').parents("td.answer-media-icons").find("li.media-preview");o.removeClass("st_image_loader");o.html(r);o.addClass("image-added");e('input[name="media['+t+']"]').val(n);p()}function m(){var t=parseInt(e(".answer").size());e("input.answer-text").each(function(){var r=this;if(e(r).val()==n.new_answer||e(r).hasClass("idle"))t--});return t}var n=e.extend({delete_rating:'Are you sure you want to delete the rating for "%s"?',delete_poll:'Are you sure you want to delete "%s"?',delete_answer:"Are you sure you want to delete this answer?",new_answer:"Enter an answer here",delete_answer_title:"delete this answer",reorder_answer_title:"click and drag to reorder",add_image_title:"Add an Image",add_audio_title:"Add Audio",add_video_title:"Add Video",standard_styles:"Standard Styles",custom_styles:"Custom Styles",base_url:""},t);e(".hide-if-js").hide();e(".empty-if-js").empty();e(".hide-if-no-js").removeClass("hide-if-no-js");e(".polldaddy-shortcode-row pre").click(function(){var t=e(this)[0];if(e.browser.msie){var n=document.body.createTextRange();n.moveToElementText(t);n.select()}else if(e.browser.mozilla||e.browser.opera){var r=window.getSelection();var n=document.createRange();n.selectNodeContents(t);r.removeAllRanges();r.addRange(n)}else if(e.browser.safari){var r=window.getSelection();r.setBaseAndExtent(t,0,t,1)}});e("input#shortcode-field").click(function(){e(this).select()});e("a.delete-rating").click(function(){return confirm(n.delete_rating.replace("%s",e(this).parents("td").find("strong").text()))});e("a.delete-poll").click(function(){return confirm(n.delete_poll.replace("%s",e(this).parents("td").find("strong").text()))});e("span.view a.thickbox").attr("href",function(){return e(this).attr("href")+"&iframe&TB_iframe=true"});var r=function(t){e("a.delete-answer",t||null).click(function(){if(confirm(n.delete_answer)){e(this).parents("li").remove();e("#choices option:last-child").remove()}return false})};r();e("#answers").sortable({axis:"y",containment:"parent",handle:".handle",tolerance:"pointer"});var u=false;e("#add-answer-holder").show().find("button").click(function(){if(!u){u=true;var t=(1+m()).toString();var n=e(this).closest("p").attr("class");e("form[name=add-answer] input[name=aa]").val(t);e("form[name=add-answer] input[name=src]").val(n);e("form[name=add-answer] input[name=action]").val("polls_add_answer");e("form[name=add-answer]").ajaxSubmit(function(n){r(e("#answers").append(n).find("li:last"));e("#choices").append('<option value="'+(t-1)+'">'+(t-1)+"</option>");u=false;p()})}return false});var a=window.dialogArguments||opener||parent||top;e(".polldaddy-send-to-editor").click(function(){var t=e(this).parents("div.row-actions").find(".polldaddy-poll-id").val();if(!t)t=e(".polldaddy-poll-id:first").val();if(t){t=parseInt(t);if(t>0){a.send_to_editor("[polldaddy poll="+t.toString()+"]")}}});e(".polldaddy-show-shortcode").toggle(function(t){t.preventDefault();e(this).parents("tr:first").next("tr").fadeIn();e(this).parents("tr:first").next("tr").show();e(this).closest("tr").css("display","none");return false},function(){e(this).parents("tr:first").next("tr").fadeOut();e(this).parents("tr:first").next("tr").hide();return false});e(".pd-embed-done").click(function(t){t.preventDefault();e(this).closest("tr").hide();e(this).closest("tr").prev("tr").show()});e(".pd-tabs a").click(function(){if(!jQuery(this).closest("li").hasClass("selected")){jQuery(".pd-tabs li").removeClass("selected");jQuery(this).closest("li").addClass("selected");jQuery(".pd-tab-panel").removeClass("show");jQuery(".pd-tab-panel#"+e(this).closest("li").attr("id")+"-panel").addClass("show")}});var f=e(":input[name=styleID]");var l=e(":input[name=customSelect]");var c=parseInt(l.val());if(c>0){f.val(c.toString());e("#pd-custom-styles a").click()}e("#multipleChoice").click(function(){if(e("#multipleChoice").is(":checked")){e("#numberChoices").show("fast")}else{e("#numberChoices").hide("fast")}});e(".block-repeat").click(function(){var t=jQuery(this).val();if(t=="off"){e("#cookieip_expiration_label").hide();e("#cookieip_expiration").hide()}else{e("#cookieip_expiration_label").show();e("#cookieip_expiration").show()}});var h=false;p();var g={add_media:v};return g}}) -
polldaddy/trunk/partials/api-key-page.php
r2578991 r3374483 10 10 <p> 11 11 <?php 12 /* translators: name of the rating being deleted*/12 /* translators: %s is the URL to the Crowdsignal.com account details */ 13 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 14 ?> -
polldaddy/trunk/partials/crowdsignal-landing-page.php
r2578991 r3374483 24 24 <div class="crowdsignal-landing__hero"> 25 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>26 <div class="crowdsignal-landing__hero-headline"><?php esc_html_e( 'Looking for insights?', 'polldaddy' ); ?><br><?php esc_html_e( 'Start asking!', 'polldaddy' ); ?></div> 27 27 <div class="crowdsignal-landing__hero-subline"> 28 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.' ); ?>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.', 'polldaddy' ); ?> 30 30 </div> 31 31 </div> … … 129 129 <div class="crowdsignal-landing__blocks-cta crowdsignal-landing__blocks-export-showcase"> 130 130 <img src="<?php echo esc_html( $resource_path ); ?>/img/export-everywhere.png" 131 alt="<?php esc_html_e( 'Export showcase image', 'polldad y' ); ?>"132 title="<?php esc_html_e( 'Export showcase', 'polldad y' ); ?>" width="583px" />131 alt="<?php esc_html_e( 'Export showcase image', 'polldaddy' ); ?>" 132 title="<?php esc_html_e( 'Export showcase', 'polldaddy' ); ?>" width="583px" /> 133 133 </div> 134 134 </div> -
polldaddy/trunk/partials/html-admin-setup-footer.php
r2660746 r3374483 22 22 <ul class="cs-footer__links"> 23 23 <li class="cs-footer__link-item"><a href="https://crowdsignal.com" target="_blank" rel="noopener noreferrer" class="cs-footer__link" title="Crowdsignal">Crowdsignal.com</a></li> 24 <li class="cs-footer__link-item"><a href="https://crowdsignal.com/support" target="_blank" rel="noopener noreferrer" class="cs-footer__link" title="<?php esc_html_e( 'Crowdsignal Support', ' crowdsignal-forms' ); ?>"><?php esc_html_e( 'Support', 'crowdsignal-forms' ); ?></a></li>25 <li class="cs-footer__link-item"><a href="https://crowdsignal.com/terms/" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e( 'Terms of Service', ' crowdsignal-forms' ); ?>" class="cs-footer__link"><?php esc_html_e( 'Terms', 'crowdsignal-forms' ); ?></a></li>26 <li class="cs-footer__link-item"><a href="https://automattic.com/privacy/" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e( 'Privacy Policy', ' crowdsignal-forms' ); ?>" class="cs-footer__link"><?php esc_html_e( 'Privacy', 'crowdsignal-forms' ); ?></a></li>24 <li class="cs-footer__link-item"><a href="https://crowdsignal.com/support" target="_blank" rel="noopener noreferrer" class="cs-footer__link" title="<?php esc_html_e( 'Crowdsignal Support', 'polldaddy' ); ?>"><?php esc_html_e( 'Support', 'polldaddy' ); ?></a></li> 25 <li class="cs-footer__link-item"><a href="https://crowdsignal.com/terms/" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e( 'Terms of Service', 'polldaddy' ); ?>" class="cs-footer__link"><?php esc_html_e( 'Terms', 'polldaddy' ); ?></a></li> 26 <li class="cs-footer__link-item"><a href="https://automattic.com/privacy/" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e( 'Privacy Policy', 'polldaddy' ); ?>" class="cs-footer__link"><?php esc_html_e( 'Privacy', 'polldaddy' ); ?></a></li> 27 27 </ul> 28 28 </div> -
polldaddy/trunk/partials/html-admin-setup-header.php
r2759245 r3374483 13 13 <div id="cs-plugin-container"> 14 14 <div class='cs-lower'> 15 <h1 id='crowdsignal__logo'><?php esc_html_e( 'Crowdsignal Settings', ' crowdsignal-forms' ); ?></h1>15 <h1 id='crowdsignal__logo'><?php esc_html_e( 'Crowdsignal Settings', 'polldaddy' ); ?></h1> 16 16 <?php 17 17 // phpcs:ignore WordPress.Security.NonceVerification.Recommended … … 22 22 echo '<div class="error fade crowdsignal-message"><p>' . 23 23 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib 24 esc_html__( 'Could not disconnect. Please try again.', ' crowdsignal-forms' ) .24 esc_html__( 'Could not disconnect. Please try again.', 'polldaddy' ) . 25 25 '</p></div>'; 26 26 break; … … 28 28 echo '<div class="updated fade crowdsignal-message"><p>' . 29 29 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib 30 esc_html__( 'Successfully disconnected from Crowdsignal.', ' crowdsignal-forms' ) .30 esc_html__( 'Successfully disconnected from Crowdsignal.', 'polldaddy' ) . 31 31 '</p></div>'; 32 32 break; … … 34 34 echo '<div class="updated crowdsignal-message"><p>' . 35 35 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib 36 esc_html__( 'Success! Your Crowdsignal account is successfully connected! You are ready!', ' crowdsignal-forms' ) .36 esc_html__( 'Success! Your Crowdsignal account is successfully connected! You are ready!', 'polldaddy' ) . 37 37 '</p></div>'; 38 38 break; … … 40 40 echo '<div class="updated crowdsignal-message"><p>' . 41 41 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib 42 esc_html__( 'You have been connected to Crowdsignal.', ' crowdsignal-forms' ) .42 esc_html__( 'You have been connected to Crowdsignal.', 'polldaddy' ) . 43 43 '</p></div>'; 44 44 break; … … 46 46 echo '<div class="error fade crowdsignal-message"><p>' . 47 47 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Content is svg from internal lib 48 esc_html__( 'Your API key has not been updated, please try again.', ' crowdsignal-forms' ) .48 esc_html__( 'Your API key has not been updated, please try again.', 'polldaddy' ) . 49 49 '</p></div>'; 50 50 break; -
polldaddy/trunk/partials/html-admin-setup-step-1.php
r2759245 r3374483 14 14 <div class="cs-card cs-section-header is-compact"> 15 15 <div class="cs-section-header__label"> 16 <span class="cs-section-header__label-text"><?php esc_html_e( 'Getting Started', ' crowdsignal-forms' ); ?></span>16 <span class="cs-section-header__label-text"><?php esc_html_e( 'Getting Started', 'polldaddy' ); ?></span> 17 17 </div> 18 18 </div> … … 23 23 <div class="crowdsignal-setup__content"> 24 24 <div class="crowdsignal-setup__description"> 25 <h1><?php esc_html_e( 'Welcome to Crowdsignal', ' crowdsignal-forms' ); ?></h1>25 <h1><?php esc_html_e( 'Welcome to Crowdsignal', 'polldaddy' ); ?></h1> 26 26 <p><?php echo wp_kses_post( 'To collect and manage responses you need to connect the plugin to <a href="https://crowdsignal.com">Crowdsignal</a>. <br />It will take less than a minute and it’s free.', 'polldaddy' ); ?></p> 27 27 </div> -
polldaddy/trunk/partials/poll-edit-form.php
r2992544 r3374483 13 13 // phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment -- TODO 14 14 15 $delete_media_link = '<a href="#" class="delete-media delete hidden" title="' . esc_attr( __( 'delete this image' ) ) . '"><img src="' . esc_url( $base_url ) . 'img/icon-clear-search.png" width="16" height="16" /></a>';15 $delete_media_link = '<a href="#" class="delete-media delete hidden" title="' . esc_attr( __( 'delete this image', 'polldaddy' ) ) . '"><img src="' . esc_url( $base_url ) . 'img/icon-clear-search.png" width="16" height="16" /></a>'; 16 16 ?> 17 17 <form enctype="multipart/form-data" name="send-media" action="admin-ajax.php" method="post"> … … 184 184 <span style="margin:6px 6px 8px;<?php echo $poll->blockRepeatVotersType === 'off' ? 'display:none;' : ''; ?>" id="cookieip_expiration_label"><label><?php _e( 'Expires: ', 'polldaddy' ); ?></label></span> 185 185 <select id="cookieip_expiration" name="cookieip_expiration" style="width: auto;<?php echo $poll->blockRepeatVotersType === 'off' ? 'display:none;' : ''; ?>"> 186 <option value="3600" <?php echo (int) $poll->blockExpiration === 3600 ? 'selected' : ''; ?>><?php printf( __( '%d hour', 'polldaddy' ), 1 ); ?></option> 187 <option value="10800" <?php echo (int) $poll->blockExpiration === 10800 ? 'selected' : ''; ?>><?php printf( __( '%d hours', 'polldaddy' ), 3 ); ?></option> 188 <option value="21600" <?php echo (int) $poll->blockExpiration === 21600 ? 'selected' : ''; ?>><?php printf( __( '%d hours', 'polldaddy' ), 6 ); ?></option> 186 <option value="3600" <?php echo (int) $poll->blockExpiration === 3600 ? 'selected' : ''; ?>><?php 187 /* translators: %d is the number of hours */ 188 printf( __( '%d hour', 'polldaddy' ), 1 ); ?></option> 189 <option value="10800" <?php echo (int) $poll->blockExpiration === 10800 ? 'selected' : ''; ?>><?php 190 /* translators: %d is the number of hours */ 191 printf( __( '%d hours', 'polldaddy' ), 3 ); ?></option> 192 <option value="21600" <?php echo (int) $poll->blockExpiration === 21600 ? 'selected' : ''; ?>><?php 193 /* translators: %d is the number of hours */ 194 printf( __( '%d hours', 'polldaddy' ), 6 ); ?></option> 189 195 <option value="43200" <?php echo (int) $poll->blockExpiration === 43200 ? 'selected' : ''; ?>><?php printf( __( '%d hours', 'polldaddy' ), 12 ); ?></option> 190 <option value="86400" <?php echo (int) $poll->blockExpiration === 86400 ? 'selected' : ''; ?>><?php printf( __( '%d day', 'polldaddy' ), 1 ); ?></option> 191 <option value="604800" <?php echo (int) $poll->blockExpiration === 604800 ? 'selected' : ''; ?>><?php printf( __( '%d week', 'polldaddy' ), 1 ); ?></option> 196 <option value="86400" <?php echo (int) $poll->blockExpiration === 86400 ? 'selected' : ''; ?>><?php 197 /* translators: %d is the number of days */ 198 printf( __( '%d day', 'polldaddy' ), 1 ); ?></option> 199 <option value="604800" <?php echo (int) $poll->blockExpiration === 604800 ? 'selected' : ''; ?>><?php 200 /* translators: %d is the number of weeks */ 201 printf( __( '%d week', 'polldaddy' ), 1 ); ?></option> 192 202 </select> 193 203 <p><?php _e( 'Note: Blocking by cookie and IP address can be problematic for some voters.', 'polldaddy' ); ?></p> … … 279 289 <strong><?php _e( 'WordPress Shortcode:', 'polldaddy' ); ?></strong> 280 290 <input type="text" style="color:#999;" value="[crowdsignal poll=<?php echo esc_attr( $poll->_id ); ?>]" id="shortcode-field" readonly="readonly" /> 281 <span><a href="post-new.php?content=[crowdsignal poll=<?php echo esc_attr( $poll->_id ); ?>]" class="button"><?php _e( 'Embed Poll in New Post' ); ?></a></span>291 <span><a href="post-new.php?content=[crowdsignal poll=<?php echo esc_attr( $poll->_id ); ?>]" class="button"><?php _e( 'Embed Poll in New Post', 'polldaddy' ); ?></a></span> 282 292 </div> 283 293 </div> … … 308 318 <tr> 309 319 <th> 310 <span class="handle" title="<?php echo esc_attr( __( 'click and drag to reorder' ) ); ?>"><img src="<?php echo esc_url( $base_url ); ?>img/icon-reorder.png" alt="click and drag to reorder" width="6" height="9" /></span>320 <span class="handle" title="<?php echo esc_attr( __( 'click and drag to reorder', 'polldaddy' ) ); ?>"><img src="<?php echo esc_url( $base_url ); ?>img/icon-reorder.png" alt="click and drag to reorder" width="6" height="9" /></span> 311 321 </th> 312 322 <td class="answer-input"> … … 371 381 <tr> 372 382 <th> 373 <span class="handle" title="<?php echo esc_attr( __( 'click and drag to reorder' ) ); ?>"><img src="<?php echo esc_url( $base_url ); ?>img/icon-reorder.png" alt="click and drag to reorder" width="6" height="9" /></span>383 <span class="handle" title="<?php echo esc_attr( __( 'click and drag to reorder', 'polldaddy' ) ); ?>"><img src="<?php echo esc_url( $base_url ); ?>img/icon-reorder.png" alt="click and drag to reorder" width="6" height="9" /></span> 374 384 </th> 375 385 <td class="answer-input"> … … 708 718 jQuery( document ).ready(function(){ 709 719 plugin = new Plugin( { 710 delete_rating: '<?php echo esc_attr( __( 'Are you sure you want to delete the rating for "%s"?', 'polldaddy' ) ); ?>', 711 delete_poll: '<?php echo esc_attr( __( 'Are you sure you want to delete "%s"?', 'polldaddy' ) ); ?>', 720 delete_rating: '<?php echo esc_attr( 721 /* translators: %s is the name of the rating being deleted */ 722 __( 'Are you sure you want to delete the rating for "%s"?', 'polldaddy' ) ); ?>', 723 delete_poll: '<?php echo esc_attr( 724 /* translators: %s is the name of the poll being deleted */ 725 __( 'Are you sure you want to delete "%s"?', 'polldaddy' ) ); ?>', 712 726 delete_answer: '<?php echo esc_attr( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>', 713 727 new_answer_test: '<?php echo esc_attr( __( 'Enter an answer here', 'polldaddy' ) ); ?>', -
polldaddy/trunk/partials/polls-table.php
r2938809 r3374483 34 34 <thead> 35 35 <tr> 36 <th class="cs-dashboard__grid is-name"><?php esc_html_e( 'Name' ); ?></th>37 <th class="cs-dashboard__grid is-type"><span class="cs-dashboard__mq-desktop-only"><?php esc_html_e( 'Type' ); ?></span></th>38 <th class="cs-dashboard__grid is-created"><span class="cs-dashboard__mq-desktop-only"><?php esc_html_e( 'Created' ); ?></span></th>39 <th class="cs-dashboard__grid is-status"><?php esc_html_e( 'Status' ); ?></th>40 <th class="cs-dashboard__grid is-responses-total"><?php esc_html_e( 'Responses' ); ?></th>41 <th class="cs-dashboard__grid is-source"><span class="cs-dashboard__mq-desktop-only"><?php esc_html_e( 'Source' ); ?></span></th>36 <th class="cs-dashboard__grid is-name"><?php esc_html_e( 'Name', 'polldaddy' ); ?></th> 37 <th class="cs-dashboard__grid is-type"><span class="cs-dashboard__mq-desktop-only"><?php esc_html_e( 'Type', 'polldaddy' ); ?></span></th> 38 <th class="cs-dashboard__grid is-created"><span class="cs-dashboard__mq-desktop-only"><?php esc_html_e( 'Created', 'polldaddy' ); ?></span></th> 39 <th class="cs-dashboard__grid is-status"><?php esc_html_e( 'Status', 'polldaddy' ); ?></th> 40 <th class="cs-dashboard__grid is-responses-total"><?php esc_html_e( 'Responses', 'polldaddy' ); ?></th> 41 <th class="cs-dashboard__grid is-source"><span class="cs-dashboard__mq-desktop-only"><?php esc_html_e( 'Source', 'polldaddy' ); ?></span></th> 42 42 <th class="cs-dashboard__grid is-links"></th> 43 43 </tr> … … 73 73 $item->name = trim( wp_strip_all_tags( $item->name ) ); 74 74 if ( 0 === strlen( $item->name ) ) { 75 $item->name = __( 'Unknown' );75 $item->name = __( 'Unknown', 'polldaddy' ); 76 76 } 77 77 … … 198 198 </td> 199 199 <td class="cs-dashboard__grid is-status" data-open="<?php echo $item->_closed ? 0 : 1; ?>"> 200 <?php echo ! $item->_closed ? esc_html__( 'Open' ) : esc_html__( 'Closed' ); ?>200 <?php echo ! $item->_closed ? esc_html__( 'Open', 'polldaddy' ) : esc_html__( 'Closed', 'polldaddy' ); ?> 201 201 </td> 202 202 <td class="cs-dashboard__grid is-responses-total"> … … 212 212 <td class="cs-dashboard__grid is-links"> 213 213 <span class="cs-dashboard__mq-desktop-only"> 214 <a target="_blank" rel="noopener" href="<?php echo esc_url( $results_link ); ?>"><?php esc_html_e( 'Results' ); ?></a>214 <a target="_blank" rel="noopener" href="<?php echo esc_url( $results_link ); ?>"><?php esc_html_e( 'Results', 'polldaddy' ); ?></a> 215 215 <?php if ( $edit_link ) { ?> 216 <a target="<?php echo $item_post_id ? '' : '_blank'; ?>" rel="noopener" href="<?php echo esc_url( $edit_link ); ?>"><?php esc_html_e( 'Edit' ); ?></a>216 <a target="<?php echo $item_post_id ? '' : '_blank'; ?>" rel="noopener" href="<?php echo esc_url( $edit_link ); ?>"><?php esc_html_e( 'Edit', 'polldaddy' ); ?></a> 217 217 <?php } ?> 218 218 <?php if ( $open_link || $close_link ) { ?> 219 <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>219 <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', 'polldaddy' ) : esc_html_e( 'Close', 'polldaddy' ); ?></a> 220 220 <?php } ?> 221 221 222 222 <?php if ( $delete_link ) { ?> 223 <a target="_blank" rel="noopener" class="delete-poll delete" href="<?php esc_url( $delete_link ); ?>"><?php esc_html_e( 'Delete' ); ?></a>223 <a target="_blank" rel="noopener" class="delete-poll delete" href="<?php esc_url( $delete_link ); ?>"><?php esc_html_e( 'Delete', 'polldaddy' ); ?></a> 224 224 <?php } ?> 225 225 226 226 <?php if ( $preview_link ) { ?> 227 <a class='thickbox' href="<?php echo esc_url( $preview_link ); ?>"><?php esc_html_e( 'Preview' ); ?></a>227 <a class='thickbox' href="<?php echo esc_url( $preview_link ); ?>"><?php esc_html_e( 'Preview', 'polldaddy' ); ?></a> 228 228 <?php } ?> 229 229 </span> … … 288 288 289 289 plugin = new Plugin( { 290 <?php /* translators: name of the rating being deleted */ ?>290 <?php /* translators: %s is the name of the rating being deleted */ ?> 291 291 delete_rating: '<?php echo esc_js( __( 'Are you sure you want to delete the rating for "%s"?', 'polldaddy' ) ); ?>', 292 <?php /* translators: name of the poll being deleted */ ?>292 <?php /* translators: %s is the name of the poll being deleted */ ?> 293 293 delete_poll: '<?php echo esc_js( __( 'Are you sure you want to delete the poll %s?', 'polldaddy' ) ); ?>', 294 294 delete_answer: '<?php echo esc_js( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>', -
polldaddy/trunk/partials/settings-2.php
r2660746 r3374483 8 8 ?> 9 9 <br /> 10 <div id='crowdsignal_advanced_link'><a href="#" id='toggle_advanced_setting_link'><?php _e( 'Advanced Settings' ); ?></a></div>10 <div id='crowdsignal_advanced_link'><a href="#" id='toggle_advanced_setting_link'><?php _e( 'Advanced Settings', 'polldaddy' ); ?></a></div> 11 11 <br /> 12 12 … … 94 94 <input type="hidden" name="action" value="reset-account" /> 95 95 <input type="hidden" name="account" value="import" /> 96 <p><input type="checkbox" name="email" value="1" /> <?php _e( 'Send me an email with the connection settings for future reference' ); ?></p>96 <p><input type="checkbox" name="email" value="1" /> <?php _e( 'Send me an email with the connection settings for future reference', 'polldaddy' ); ?></p> 97 97 <input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Reset API Connection', 'polldaddy' ) ); ?>" /> 98 98 </p> -
polldaddy/trunk/partials/settings.php
r2660746 r3374483 11 11 <div class="cs-card cs-section-header is-compact"> 12 12 <div class="cs-section-header__label"> 13 <span class="cs-section-header__label-text"><?php esc_html_e( 'Account Settings', ' crowdsignal-forms' ); ?></span>13 <span class="cs-section-header__label-text"><?php esc_html_e( 'Account Settings', 'polldaddy' ); ?></span> 14 14 </div> 15 15 </div> … … 17 17 <div class="cs-card cs-section-header is-compact"> 18 18 <div class="cs-form-settings-group"> 19 <h2><?php esc_html_e( 'API Key', ' crowdsignal-forms' ); ?></h2>19 <h2><?php esc_html_e( 'API Key', 'polldaddy' ); ?></h2> 20 20 <p> 21 21 <?php 22 22 printf( 23 23 /* translators: Placeholder is the text "Crowdsignal". */ 24 esc_html__( 'Your website is connected to a %s account to collect responses and data from your visitors.', ' crowdsignal-forms' ),24 esc_html__( 'Your website is connected to a %s account to collect responses and data from your visitors.', 'polldaddy' ), 25 25 '<a href="https://crowdsignal.com/">Crowdsignal</a>' 26 26 ); … … 30 30 printf( 31 31 /* translators: Placeholder is the text "Crowdsignal acount page". */ 32 esc_html__( 'Visit your %s to find out more about your settings.', ' crowdsignal-forms' ),32 esc_html__( 'Visit your %s to find out more about your settings.', 'polldaddy' ), 33 33 sprintf( 34 34 '<a href="https://crowdsignal.com/account/">%s</a>', 35 esc_html__( 'Crowdsignal account page', ' crowdsignal-forms' )35 esc_html__( 'Crowdsignal account page', 'polldaddy' ) 36 36 ) 37 37 ); … … 40 40 <?php if ( ! $api_key ) { ?> 41 41 <p> 42 <?php esc_html_e( 'If you have a Crowdsignal account, click the "Get API Key" button to connect. This will open a new window.', ' crowdsignal-forms' ); ?>42 <?php esc_html_e( 'If you have a Crowdsignal account, click the "Get API Key" button to connect. This will open a new window.', 'polldaddy' ); ?> 43 43 <form id="cs-connect-form" class="crowdsignal-options" method="post" action="https://app.crowdsignal.com/get-api-key/" target="CSCONNECT"> 44 44 <input type="hidden" name="get_api_key" value="<?php echo esc_attr( get_option( 'crowdsignal_api_key_secret' ) ); ?>" /> 45 45 <input type="hidden" name="ref" value="<?php echo esc_attr( admin_url( 'options-general.php?page=crowdsignal-settings' ) ); ?>" /> 46 <input type="submit" value="<?php esc_html_e( 'Get API Key', ' crowdsignal-forms' ); ?>" class="cs-button is-primary" />46 <input type="submit" value="<?php esc_html_e( 'Get API Key', 'polldaddy' ); ?>" class="cs-button is-primary" /> 47 47 </form> 48 48 </p> … … 52 52 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Used for basic flow. 53 53 if ( ! empty( $_GET['settings-updated'] ) ) { 54 echo '<div class="updated fade crowdsignal-updated"><p>' . esc_html__( 'Settings successfully saved', ' crowdsignal-forms' ) . '</p></div>';54 echo '<div class="updated fade crowdsignal-updated"><p>' . esc_html__( 'Settings successfully saved', 'polldaddy' ) . '</p></div>'; 55 55 } 56 56 … … 59 59 <table class="form-table settings parent-settings"> 60 60 <tr valign="top" class=""> 61 <th scope="row"><label for="setting-crowdsignal_api_key"><?php esc_html_e( 'Your Crowdsignal API Key', ' crowdsignal-forms' ); ?></a></th>61 <th scope="row"><label for="setting-crowdsignal_api_key"><?php esc_html_e( 'Your Crowdsignal API Key', 'polldaddy' ); ?></a></th> 62 62 <td><input 63 63 <?php echo $api_key ? 'readonly' : ''; ?> … … 75 75 ?> 76 76 <input type="hidden" name="action" value="disconnect" /> 77 <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Disconnect', ' crowdsignal-forms' ); ?>" />77 <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Disconnect', 'polldaddy' ); ?>" /> 78 78 <?php 79 79 } else { … … 81 81 ?> 82 82 <input type="hidden" name="action" value="update" /> 83 <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Connect', ' crowdsignal-forms' ); ?>" />83 <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Connect', 'polldaddy' ); ?>" /> 84 84 <?php 85 85 } -
polldaddy/trunk/polldaddy-org.php
r2992544 r3374483 261 261 <h2><?php _e( 'Crowdsignal Account', 'polldaddy' ); ?></h2> 262 262 263 <?php /* translators: %s is the URL to the Crowdsignal.com account details */ ?> 263 264 <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> 264 265 … … 472 473 $polldaddy_class = WP_POLLDADDY__CLASS; 473 474 $polldaddy_object = new $polldaddy_class; 474 load_plugin_textdomain( 'polldaddy', '', 'polldaddy/locale' );475 475 add_action( 'admin_menu', array( &$polldaddy_object, 'admin_menu' ) ); 476 476 } … … 609 609 <label for="<?php echo esc_attr( $this->get_field_id( 'filter_by_category' ) ); ?>"> 610 610 <input type="checkbox" class="checkbox" id="<?php echo esc_attr( $this->get_field_id( 'filter_by_category' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'filter_by_category' ) ); ?>" value="1" <?php echo $filter_by_category == 1 ? 'checked="checked"':''; ?>/> 611 <?php _e('Filter by category' ); ?>611 <?php _e('Filter by category', 'polldaddy'); ?> 612 612 </label> 613 613 </p> 614 614 <p> 615 <label for=" rss-items-<?php echo esc_attr( $number); ?>"><?php _e( 'How many items would you like to display?', 'polldaddy' ); ?>615 <label for="<?php echo esc_attr( $this->get_field_id( 'item_count' ) ); ?>"><?php _e( 'How many items would you like to display?', 'polldaddy' ); ?> 616 616 <select id="<?php echo esc_attr( $this->get_field_id( 'item_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'item_count' ) ); ?>"> 617 617 <?php … … 653 653 } 654 654 655 echo '<div class="updated"><p><strong>' . sprintf( __( 'Crowdsignal features will be unavailable until you link your Crowdsignal.com account. Please visit the <a href="%s">plugin settings page</a> to login.', 'polldaddy' ), admin_url( 'options-general.php?page=crowdsignal-settings' ) ) . '</strong></p></div>'; 655 echo '<div class="updated"><p><strong>' . sprintf( 656 /* translators: %s is the URL to the plugin settings page */ 657 __( 'Crowdsignal features will be unavailable until you link your Crowdsignal.com account. Please visit the <a href="%s">plugin settings page</a> to login.', 'polldaddy' ), admin_url( 'options-general.php?page=crowdsignal-settings' ) ) . '</strong></p></div>'; 656 658 } 657 659 add_action( 'admin_notices', 'polldaddy_login_warning' ); -
polldaddy/trunk/polldaddy-shortcode.php
r2435361 r3374483 181 181 $poll = intval( $poll ); 182 182 $poll_url = sprintf( 'https://poll.fm/%d', $poll ); 183 $poll_js = sprintf( ' %s.polldaddy.com/p/%d.js', '//static', $poll );183 $poll_js = sprintf( 'https://static.polldaddy.com/p/%d.js', $poll ); 184 184 $poll_link = sprintf( '<a href="%s">Take Our Poll</a>', $poll_url ); 185 185 … … 443 443 if ( !function_exists( 'polldaddy_link' ) ) { 444 444 // http://polldaddy.com/poll/1562975/?view=results&msg=voted 445 // http://poll.fm/1562975 445 446 function polldaddy_link( $content ) { 446 if ( false === strpos( $content, "polldaddy.com/" ) )447 if ( false === strpos( $content, "polldaddy.com/" ) && false === strpos( $content, "poll.fm/" ) ) 447 448 return $content; 448 449 $textarr = wp_html_split( $content ); -
polldaddy/trunk/polldaddy.php
r3128211 r3374483 2 2 /** 3 3 * Plugin Name: Crowdsignal Polls & Ratings 4 * Plugin URI: http ://wordpress.org/extend/plugins/polldaddy/4 * Plugin URI: https://wordpress.org/plugins/polldaddy/ 5 5 * Description: Create and manage Crowdsignal polls and ratings in WordPress 6 6 * Author: Automattic, Inc. 7 7 * Author URL: https://crowdsignal.com/ 8 * Version: 3.1.2 8 * Version: 3.1.3 9 * Text Domain: polldaddy 10 * Domain Path: /languages 9 11 */ 10 12 … … 39 41 } 40 42 add_action( 'init', 'polldaddy_add_oembed_provider' ); 43 44 /** 45 * Get the nonce action string for polls media functionality. 46 * 47 * @return string Nonce action string specific to current user 48 */ 49 function get_polls_media_nonce() { 50 return 'polls_media_' . get_current_user_id(); 51 } 41 52 42 53 class WP_Polldaddy { … … 203 214 // Add settings pages. 204 215 foreach( array( 'crowdsignal-settings' => __( 'Crowdsignal', 'polldaddy' ), 'ratingsettings' => __( 'Ratings', 'polldaddy' ) ) as $menu_slug => $page_title ) { 205 // translators: %s placeholder is the setting page type (Poll or Rating). 206 $settings_page_title = sprintf( esc_html__( '%s', 'polldaddy' ), $page_title ); 216 $settings_page_title = sprintf( esc_html( $page_title ) ); 207 217 $hook = add_options_page( $settings_page_title, $settings_page_title, $menu_slug == 'ratingsettings' ? 'manage_options' : 'edit_others_posts', $menu_slug, array( $this, 'settings_page' ) ); 208 218 add_action( "load-$hook", array( $this, 'management_page_load' ) ); … … 360 370 <h2 id="polldaddy-header"><?php _e( 'Crowdsignal', 'polldaddy' ); ?></h2> 361 371 372 <?php /* translators: %s is the URL to the Crowdsignal.com account details */ ?> 362 373 <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> 363 374 … … 493 504 wp_enqueue_script( 'polls-common', "{$this->base_url}js/common.js", array(), $this->version ); 494 505 506 // Localize script with nonce data for secure media uploads 507 if ( $page === 'polls' && in_array( $action, array( 'edit', 'edit-poll', 'create-poll' ) ) ) { 508 $user_id = get_current_user_id(); 509 $nonce_action = get_polls_media_nonce(); 510 wp_localize_script( 'polls', 'pollsMediaSecurity', array( 511 'nonce' => wp_create_nonce( $nonce_action ), 512 'user_id' => $user_id, 513 ) ); 514 } 515 495 516 if ( $page == 'polls' ) { 496 517 if ( !$this->is_author && in_array( $action, array( 'edit', 'edit-poll', 'create-poll', 'edit-style', 'create-style', 'list-styles', 'options', 'update-options', 'import-account', 'create-block-poll' ) ) ) {//check user privileges has access to action … … 502 523 $post_id = wp_insert_post( 503 524 array( 504 'post_title' => esc_html__( 'Crowdsignal blocks in WordPress' ),525 'post_title' => esc_html__( 'Crowdsignal blocks in WordPress', 'polldaddy' ), 505 526 506 527 'post_content' => ' … … 900 921 check_admin_referer( 'polldaddy-reset' . $this->id ); 901 922 $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 ); 902 $msg = __( "You have just reset your Polldaddy connection settings." ) . "\n\n";923 $msg = __( "You have just reset your Polldaddy connection settings.", 'polldaddy' ) . "\n\n"; 903 924 foreach( $fields as $field ) { 904 925 $value = get_option( $field ); … … 1593 1614 $message = __( 'Poll deleted.', 'polldaddy' ); 1594 1615 } else { 1595 $message = sprintf( _n( '%s Poll Deleted.', '%s Polls Deleted.', $deleted, 'polldaddy' ), number_format_i18n( $deleted ) ); 1616 $message = sprintf( 1617 /* translators: %s is the number of polls deleted */ 1618 _n( '%s Poll Deleted.', '%s Polls Deleted.', $deleted, 'polldaddy' ), number_format_i18n( $deleted ) ); 1596 1619 } 1597 1620 break; … … 1601 1624 $message = __( 'Poll opened.', 'polldaddy' ); 1602 1625 } else { 1603 $message = sprintf( _n( '%s Poll Opened.', '%s Polls Opened.', $opened, 'polldaddy' ), number_format_i18n( $opened ) ); 1626 $message = sprintf( 1627 /* translators: %s is the number of polls opened */ 1628 _n( '%s Poll Opened.', '%s Polls Opened.', $opened, 'polldaddy' ), number_format_i18n( $opened ) ); 1604 1629 } 1605 1630 break; … … 1609 1634 $message = __( 'Poll closed.', 'polldaddy' ); 1610 1635 } else { 1611 $message = sprintf( _n( '%s Poll Closed.', '%s Polls Closed.', $closed, 'polldaddy' ), number_format_i18n( $closed ) ); 1636 $message = sprintf( 1637 /* translators: %s is the number of polls closed */ 1638 _n( '%s Poll Closed.', '%s Polls Closed.', $closed, 'polldaddy' ), number_format_i18n( $closed ) ); 1612 1639 } 1613 1640 break; … … 1632 1659 $message = __( 'Custom Style deleted.', 'polldaddy' ); 1633 1660 } else { 1634 $message = sprintf( _n( '%s Style Deleted.', '%s Custom Styles Deleted.', $deleted, 'polldaddy' ), number_format_i18n( $deleted ) ); 1661 $message = sprintf( 1662 /* translators: %s is the number of styles deleted */ 1663 _n( '%s Style Deleted.', '%s Custom Styles Deleted.', $deleted, 'polldaddy' ), number_format_i18n( $deleted ) ); 1635 1664 } 1636 1665 break; … … 1650 1679 $message = __( 'Rating deleted.', 'polldaddy' ); 1651 1680 } else { 1652 $message = sprintf( _n( '%s Rating Deleted.', '%s Ratings Deleted.', $deleted, 'polldaddy' ), number_format_i18n( $deleted ) ); 1681 $message = sprintf( 1682 /* translators: %s is the number of ratings deleted */ 1683 _n( '%s Rating Deleted.', '%s Ratings Deleted.', $deleted, 'polldaddy' ), number_format_i18n( $deleted ) ); 1653 1684 } 1654 1685 break; … … 1733 1764 if ( isset( $_GET['popup'] ) ) { 1734 1765 ?> 1735 <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> 1766 <h2 id="poll-list-header"><?php 1767 /* translators: %s is the URL to all polls */ 1768 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> 1736 1769 <?php 1737 1770 } … … 1745 1778 ?> 1746 1779 <h2 id="poll-list-header"> 1747 <?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 ) ) ) ); ?> 1780 <?php 1781 /* translators: %s is the URL to all polls, %s is the URL to edit poll */ 1782 printf( __( 'Poll Results <a href="%1$s" class="add-new-h2">All Polls</a> <a href="%2$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 ) ) ) ); ?> 1748 1783 </h2> 1749 1784 <?php … … 1756 1791 <?php 1757 1792 printf( 1758 __( 'Edit Poll <a href="%s" class="add-new-h2">All Polls</a> <a href="%s" class="add-new-h2">View Results</a>', 'polldaddy' ), 1793 /* translators: %s is the URL to all polls, %s is the URL to view results */ 1794 __( 'Edit Poll <a href="%1$s" class="add-new-h2">All Polls</a> <a href="%2$s" class="add-new-h2">View Results</a>', 'polldaddy' ), 1759 1795 esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ), 1760 1796 esc_url( add_query_arg( array( 'action' => 'results', 'poll' => $poll, 'message' => false ) ) ) … … 1768 1804 case 'create-poll': 1769 1805 ?> 1770 <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> 1806 <h2 id="poll-list-header"><?php 1807 /* translators: %s is the URL to all polls */ 1808 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> 1771 1809 <?php 1772 1810 $this->poll_edit_form(); … … 1776 1814 <h2 id="polldaddy-header"> 1777 1815 <?php 1778 if ( $this->is_author ) 1816 if ( $this->is_author ) { 1817 /* translators: %s is the URL to add new style */ 1779 1818 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 ) ) ) ); 1780 else1819 } else { 1781 1820 _e( 'Custom Styles', 'polldaddy' ); 1821 } 1782 1822 ?> 1783 1823 </h2> … … 1788 1828 ?> 1789 1829 <h2 id="polldaddy-header"> 1790 <?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 ) ) ) ); ?> 1830 <?php 1831 /* translators: %s is the URL to list styles */ 1832 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 ) ) ) ); ?> 1791 1833 </h2> 1792 1834 <?php … … 1797 1839 ?> 1798 1840 <h2 id="polldaddy-header"> 1799 <?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 ) ) ) ); ?> 1841 <?php 1842 /* translators: %s is the URL to list styles */ 1843 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 ) ) ) ); ?> 1800 1844 </h2> 1801 1845 <?php … … 2127 2171 2128 2172 $class = $class ? '' : ' class="alternate"'; 2173 /* translators: %s is the URL to other answers results */ 2129 2174 $content = $results->others && 'Other answer…' === $answer->text ? sprintf( __( 'Other (<a href="%s">see below</a>)', 'polldaddy' ), '#other-answers-results' ) : esc_html( $answer->text ); 2130 2175 … … 2396 2441 <table> 2397 2442 <tr> 2398 <td class="pd-editor-label"><label for="styleName"><?php _e( 'Select a template part to edit:' ); ?></label></td>2443 <td class="pd-editor-label"><label for="styleName"><?php _e( 'Select a template part to edit:', 'polldaddy' ); ?></label></td> 2399 2444 <td> 2400 2445 <select id="styleName" onchange="renderStyleEdit(this.value);"> … … 3140 3185 <span class="pds-answer-text" id="pds-answer-text"><?php _e( 'I use it in school!', 'polldaddy' ); ?></span> 3141 3186 <span class="pds-feedback-result" id="pds-feedback-result"> 3142 <span class="pds-feedback-per" id="pds-feedback-per"> 46%</span> <span class="pds-feedback-votes" id="pds-feedback-votes"> <?php printf( __( '(%d votes)', 'polldaddy' ), 620 ); ?></span> 3187 <span class="pds-feedback-per" id="pds-feedback-per"> 46%</span> <span class="pds-feedback-votes" id="pds-feedback-votes"> <?php 3188 /* translators: %d is the number of votes */ 3189 printf( __( '(%d votes)', 'polldaddy' ), 620 ); ?></span> 3143 3190 </span> 3144 3191 </label> … … 3154 3201 <span class="pds-answer-text" id="pds-answer-text1"><?php _e( 'I use it at home.', 'polldaddy' ); ?></span> 3155 3202 <span class="pds-feedback-result" id="pds-feedback-result1"> 3203 <?php /* translators: %d is the number of votes */ ?> 3156 3204 <span class="pds-feedback-per" id="pds-feedback-per1"> 30%</span> <span class="pds-feedback-votes" id="pds-feedback-votes1"> <?php printf( __( '(%d votes)', 'polldaddy' ), 400 ); ?></span> 3157 3205 </span> … … 3168 3216 <span class="pds-answer-text" id="pds-answer-text2"><?php _e( 'I use it every where I go, at work and home and anywhere else that I can!', 'polldaddy' ); ?></span> 3169 3217 <span class="pds-feedback-result" id="pds-feedback-result2"> 3218 <?php /* translators: %d is the number of votes */ ?> 3170 3219 <span class="pds-feedback-per" id="pds-feedback-per2"> 16%</span> <span class="pds-feedback-votes" id="pds-feedback-votes2"> <?php printf( __( '(%d votes)', 'polldaddy' ), 220 ); ?></span> 3171 3220 </span> … … 3182 3231 <span class="pds-answer-text" id="pds-answer-text3"><?php _e( 'Other', 'polldaddy' ); ?></span> 3183 3232 <span class="pds-feedback-result" id="pds-feedback-result3"> 3233 <?php /* translators: %d is the number of votes */ ?> 3184 3234 <span class="pds-feedback-per" id="pds-feedback-per3"> 8%</span> <span class="pds-feedback-votes" id="pds-feedback-votes3"> <?php printf( __( '(%d votes)', 'polldaddy' ), 110 ); ?></span> 3185 3235 </span> … … 3237 3287 jQuery( document ).ready(function(){ 3238 3288 plugin = new Plugin( { 3289 <?php /* translators: %s is the name of the rating being deleted */ ?> 3239 3290 delete_rating: '<?php echo esc_attr( __( 'Are you sure you want to delete the rating for "%s"?', 'polldaddy' ) ); ?>', 3291 <?php /* translators: %s is the name of the poll being deleted */ ?> 3240 3292 delete_poll: '<?php echo esc_attr( __( 'Are you sure you want to delete "%s"?', 'polldaddy' ) ); ?>', 3241 3293 delete_answer: '<?php echo esc_attr( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>', … … 3346 3398 } 3347 3399 } elseif ( isset( $polldaddy->errors[ -1 ] ) && $polldaddy->errors[ -1 ] == "Can't connect" ) { 3348 $this->contact_support_message( __( 'Could not connect to the Crowdsignal API' ), $rating_errors );3400 $this->contact_support_message( __( 'Could not connect to the Crowdsignal API', 'polldaddy' ), $rating_errors ); 3349 3401 $error = true; 3350 3402 } elseif ( isset( $polldaddy->errors[ -1 ] ) && $polldaddy->errors[ -1 ] == "Invalid API URL" ) { 3351 $this->contact_support_message( __( 'The API URL is incorrect' ), $rating_errors );3403 $this->contact_support_message( __( 'The API URL is incorrect', 'polldaddy' ), $rating_errors ); 3352 3404 $error = true; 3353 3405 } elseif ( isset( $polldaddy->errors[ -2 ] ) && $polldaddy->errors[ -2 ] == "No Data" ) { 3354 $this->contact_support_message( __( 'Your API request did not return any data' ), $rating_errors );3406 $this->contact_support_message( __( 'Your API request did not return any data', 'polldaddy' ), $rating_errors ); 3355 3407 $error = true; 3356 3408 } … … 3358 3410 3359 3411 if ( $error == false && empty( $pd_rating ) ) { //something's up! 3360 $this->contact_support_message( __( 'There was an error creating your rating widget' ), $rating_errors );3412 $this->contact_support_message( __( 'There was an error creating your rating widget', 'polldaddy' ), $rating_errors ); 3361 3413 $error = true; 3362 3414 } else { … … 3591 3643 $current_setting = get_option( 'pd-rating-posts-id' ); 3592 3644 if ( $current_setting && isset( $previous_settings[ 'pd-rating-posts-id' ] ) && $current_setting != $previous_settings[ 'pd-rating-posts-id' ] ) { 3593 echo "<p>" . sprintf( __( "Previous settings for ratings on this site discovered. You can restore them on the <a href='%s'>poll settings page</a> if your site is missing ratings after resetting your connection settings.", 'polldaddy' ), "options-general.php?page=crowdsignal-settings" ) . "</p>"; 3645 echo "<p>" . sprintf( 3646 /* translators: %s is the URL to Crowdsignal settings page */ 3647 __( "Previous settings for ratings on this site discovered. You can restore them on the <a href='%s'>poll settings page</a> if your site is missing ratings after resetting your connection settings.", 'polldaddy' ), 3648 "options-general.php?page=crowdsignal-settings" 3649 ) . "</p>"; 3594 3650 } 3595 3651 ?> … … 3663 3719 </tr> 3664 3720 <tr> 3665 <td><p style="margin-bottom: 0px;"><?php printf( __( '%d star', 'polldaddy' ), 1 );?></p></td> 3721 <td><p style="margin-bottom: 0px;"><?php 3722 /* translators: %d is the number of stars */ 3723 printf( __( '%d star', 'polldaddy' ), 1 );?></p></td> 3666 3724 </tr> 3667 3725 <tr> … … 3669 3727 </tr> 3670 3728 <tr> 3671 <td><p style="margin-bottom: 0px;"><?php printf( __( '%d stars', 'polldaddy' ), 2 );?></p></td> 3729 <td><p style="margin-bottom: 0px;"><?php 3730 /* translators: %d is the number of stars */ 3731 printf( __( '%d stars', 'polldaddy' ), 2 );?></p></td> 3672 3732 </tr> 3673 3733 <tr> … … 3675 3735 </tr> 3676 3736 <tr> 3677 <td><p style="margin-bottom: 0px;"><?php printf( __( '%d stars', 'polldaddy' ), 3 );?></p></td> 3737 <td><p style="margin-bottom: 0px;"><?php 3738 /* translators: %d is the number of stars */ 3739 printf( __( '%d stars', 'polldaddy' ), 3 );?></p></td> 3678 3740 </tr> 3679 3741 <tr> … … 3681 3743 </tr> 3682 3744 <tr> 3683 <td><p style="margin-bottom: 0px;"><?php printf( __( '%d stars', 'polldaddy' ), 4 );?></p></td> 3745 <td><p style="margin-bottom: 0px;"><?php 3746 /* translators: %d is the number of stars */ 3747 printf( __( '%d stars', 'polldaddy' ), 4 );?></p></td> 3684 3748 </tr> 3685 3749 <tr> … … 3687 3751 </tr> 3688 3752 <tr> 3689 <td><p style="margin-bottom: 0px;"><?php printf( __( '%d stars', 'polldaddy' ), 5 );?></p></td> 3753 <td><p style="margin-bottom: 0px;"><?php 3754 /* translators: %d is the number of stars */ 3755 printf( __( '%d stars', 'polldaddy' ), 5 );?></p></td> 3690 3756 </tr> 3691 3757 <tr> … … 3774 3840 $checked = ' checked="checked"';?> 3775 3841 <input type="radio" onchange="pd_change_type( 0 );" <?php echo $checked; ?> value="stars" id="stars" name="rating_type" /> 3776 <?php printf( __( '%d Star Rating', 'polldaddy' ), 5 );?> 3842 <?php 3843 /* translators: %d is the number of stars */ 3844 printf( __( '%d Star Rating', 'polldaddy' ), 5 );?> 3777 3845 </label> 3778 3846 </li> … … 4023 4091 jQuery( document ).ready(function(){ 4024 4092 plugin = new Plugin( { 4093 <?php /* translators: %s is the name of the rating being deleted */ ?> 4025 4094 delete_rating: '<?php echo esc_attr( __( 'Are you sure you want to delete the rating for "%s"?', 'polldaddy' ) ); ?>', 4095 <?php /* translators: %s is the name of the poll being deleted */ ?> 4026 4096 delete_poll: '<?php echo esc_attr( __( 'Are you sure you want to delete "%s"?', 'polldaddy' ) ); ?>', 4027 4097 delete_answer: '<?php echo esc_attr( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>', … … 4301 4371 <div class="wrap"> 4302 4372 <?php if ( $this->is_admin ) : ?> 4303 <h2 id="polldaddy-header"><?php printf( __( 'Rating Results <a href="%s" class="add-new-h2">Settings</a>', 'polldaddy' ), esc_url( 'options-general.php?page=ratingsettings' ) ); ?></h2> 4373 <h2 id="polldaddy-header"><?php 4374 /* translators: %s is the URL to Crowdsignal settings page */ 4375 printf( __( 'Rating Results <a href="%s" class="add-new-h2">Settings</a>', 'polldaddy' ), esc_url( 'options-general.php?page=ratingsettings' ) ); ?></h2> 4304 4376 <?php else : ?> 4305 4377 <h2 id="polldaddy-header"><?php _e( 'Rating Results', 'polldaddy' ); ?></h2> … … 4338 4410 <input class="button-secondary action" type="submit" value="<?php _e( 'Filter', 'polldaddy' );?>" /> 4339 4411 <?php if ( in_array( $period, array( 1, 7 ) ) ) : ?> 4340 <label><?php _e( '* The results are cached and are updated every hour' ); ?></label>4412 <label><?php _e( '* The results are cached and are updated every hour', 'polldaddy' ); ?></label> 4341 4413 <?php elseif ( $period == 31 ) : ?> 4342 <label><?php _e( '* The results are cached and are updated every day' ); ?></label>4414 <label><?php _e( '* The results are cached and are updated every day', 'polldaddy' ); ?></label> 4343 4415 <?php else : ?> 4344 <label><?php _e( '* The results are cached and are updated every 3 days' ); ?></label>4416 <label><?php _e( '* The results are cached and are updated every 3 days', 'polldaddy' ); ?></label> 4345 4417 <?php endif; ?> 4346 4418 </div> … … 4356 4428 <tbody> 4357 4429 <tr> 4358 <td colspan="4"><?php printf( __( 'No ratings have been collected for your %s yet.', 'polldaddy' ), $report_type ); ?></td> 4430 <td colspan="4"><?php 4431 /* translators: %s is the report type */ 4432 printf( __( 'No ratings have been collected for your %s yet.', 'polldaddy' ), $report_type ); ?></td> 4359 4433 </tr> 4360 4434 </tbody><?php … … 4446 4520 jQuery( document ).ready(function(){ 4447 4521 plugin = new Plugin( { 4522 <?php /* translators: %s is the name of the rating being deleted */ ?> 4448 4523 delete_rating: '<?php echo esc_attr( __( 'Are you sure you want to delete the rating for "%s"?', 'polldaddy' ) ); ?>', 4524 <?php /* translators: %s is the name of the poll being deleted */ ?> 4449 4525 delete_poll: '<?php echo esc_attr( __( 'Are you sure you want to delete "%s"?', 'polldaddy' ) ); ?>', 4450 4526 delete_answer: '<?php echo esc_attr( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>', … … 4621 4697 echo '<div class="error" id="polldaddy">'; 4622 4698 echo '<h1>' . $message . '</h1>'; 4623 echo '<p>' . __( "There are a few things you can do:" );4699 echo '<p>' . __( "There are a few things you can do:", 'polldaddy' ); 4624 4700 echo "<ul><ol>" . __( "Press reload on your browser and reload this page. There may have been a temporary problem communicating with Crowdsignal.com", "polldaddy" ) . "</ol>"; 4701 /* translators: %1$s is the URL to Crowdsignal settings page */ 4625 4702 echo "<ol>" . sprintf( __( "Go to the <a href='%s'>poll settings page</a>, scroll to the end of the page and reset your connection settings. Link your account again with the same API key.", "polldaddy" ), 'options-general.php?page=crowdsignal-settings' ) . "</ol>"; 4703 /* translators: %1$s is the URL to Crowdsignal support, %2$s is the target attribute, %3$s is the rating usercode */ 4626 4704 echo "<ol>" . sprintf( __( 'Contact <a href="%1$s" %2$s>Crowdsignal support</a> and tell them your rating usercode is %3$s', 'polldaddy' ), 'https://crowdsignal.com/feedback/', 'target="_blank"', $this->rating_user_code ) . '<br />' . __( 'Also include the following information when contacting support to help us resolve your problem as quickly as possible:', 'polldaddy' ) . ''; 4627 4705 echo "<ul><li> API Key: " . get_option( 'polldaddy_api_key' ) . "</li>"; -
polldaddy/trunk/popups.php
r984268 r3374483 18 18 <p>' . __('Paste your YouTube or Google Video URL above, or use the examples below.', 'polldaddy') . '</p> 19 19 <ul class="short-code-list"> 20 <li>' . sprintf( __('<a href="%s" target="_blank">YouTube instructions</a> %s', 'polldaddy'), 'http://support.wordpress.com/videos/youtube/', '<code>[youtube=http://www.youtube.com/watch?v=cXXm696UbKY]</code>' ) .'</li> 21 <li>' . sprintf( __('<a href="%s" target="_blank">Google instructions</a> %s', 'polldaddy') , 'http://support.wordpress.com/videos/google-video/', '<code>[googlevideo=http://video.google.com/googleplayer.swf?docId=-8459301055248673864]</code>' ) . '</li> 22 <li>' . sprintf( __('<a href="%s" target="_blank">DailyMotion instructions</a> %s', 'polldaddy'), 'http://support.wordpress.com/videos/dailymotion/', '<code>[dailymotion id=5zYRy1JLhuGlP3BGw]</code>' ) . '</li> 20 <li>' . sprintf( 21 /* translators: %1$s is the URL to YouTube instructions, %2$s is the example shortcode */ 22 __('<a href="%1$s" target="_blank">YouTube instructions</a> %2$s', 'polldaddy'), 23 'http://support.wordpress.com/videos/youtube/', 24 '<code>[youtube=http://www.youtube.com/watch?v=cXXm696UbKY]</code>' 25 ) . '</li> 26 <li>' . sprintf( 27 /* translators: %1$s is the URL to Google Video instructions, %2$s is the example shortcode */ 28 __('<a href="%1$s" target="_blank">Google instructions</a> %2$s', 'polldaddy'), 29 'http://support.wordpress.com/videos/google-video/', 30 '<code>[googlevideo=http://video.google.com/googleplayer.swf?docId=-8459301055248673864]</code>' 31 ) . '</li> 32 <li>' . sprintf( 33 /* translators: %1$s is the URL to DailyMotion instructions, %2$s is the example shortcode */ 34 __('<a href="%1$s" target="_blank">DailyMotion instructions</a> %2$s', 'polldaddy'), 35 'http://support.wordpress.com/videos/dailymotion/', 36 '<code>[dailymotion id=5zYRy1JLhuGlP3BGw]</code>' 37 ) . '</li> 23 38 </ul> 24 39 </td> … … 84 99 85 100 function polldaddy_popups_init() { 86 if( isset( $_REQUEST['polls_media'] ) ){ 87 add_filter( 'type_url_form_video', 'pd_video_shortcodes_help'); 88 add_filter( 'type_url_form_audio', 'pd_audio_shortcodes_help'); 89 add_filter( 'type_url_form_image', 'pd_image_shortcodes_help'); 101 // Only process polls_media requests 102 if ( ! isset( $_REQUEST['polls_media'] ) ) { 103 return; 90 104 } 105 106 // Security checks for CSRF vulnerability (CVE-2024-43338) 107 // Verify admin context 108 if ( ! is_admin() ) { 109 return; 110 } 111 112 // Verify user capability 113 if ( ! current_user_can( 'edit_posts' ) ) { 114 return; 115 } 116 117 // Verify nonce for CSRF protection 118 $nonce_action = get_polls_media_nonce(); 119 120 if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], $nonce_action ) ) { 121 return; 122 } 123 124 // All security checks passed, add the filters 125 add_filter( 'type_url_form_video', 'pd_video_shortcodes_help' ); 126 add_filter( 'type_url_form_audio', 'pd_audio_shortcodes_help' ); 127 add_filter( 'type_url_form_image', 'pd_image_shortcodes_help' ); 91 128 } 92 129 -
polldaddy/trunk/readme.txt
r3128211 r3374483 4 4 Requires at least: 5.5 5 5 Requires PHP: 5.6 6 Tested up to: 6. 6.17 Stable tag: 3.1. 26 Tested up to: 6.8 7 Stable tag: 3.1.3 8 8 9 9 == Description == … … 26 26 Some strings are not translated when polls and surveys are embedded. You will have to translate them using a language pack on [Crowdsignal.com](https://crowdsignal.com/). 27 27 28 Development of the plugin will take place in [this Github repository](https://github.com/Automattic/crowdsignal-plugin).28 Development of the plugin takes place in [this GitHub repository](https://github.com/Automattic/crowdsignal-plugin). Contributions are welcome! 29 29 30 30 === The Classic Editor === … … 96 96 97 97 == Changelog == 98 99 = 3.1.3 = 100 * Fix: Make 'Results' and 'Edit' Links Always Visible on Polls Dashboard by @vk17-starlord in #108 101 * fix: Update item count field ID in polldaddy-org.php by @GaryJones in #115 102 * fix: CSRF vulnerability for CVE-2024-43338 by @oviul in #136 103 * Add: poll.fm URL detection for shortcode by @ovidiul in #138 104 * Modernise i18n configuration by @GaryJones in #131 105 * fix: Add translation comments to enhance understanding for translators by @GaryJones in #128 106 * refactor: Remove makepot task and update build script for i18n by @GaryJones in #130 107 * fix: Add and fix text domain for translations by @GaryJones in #129 108 * Update issue and pull request templates by @GaryJones in #126 109 * fix: Update .wp-env.json to set core to null by @GaryJones in #114 110 * Add development environment setup by @ovidiul in #113 111 * Add WordPress Coding Standards (PHPCS) by @ovidiul in #132 112 * Add PHPUnit Testing Framework by @ovidiul in #133 113 98 114 = 3.1.2 = 99 115 * Add referer check on deprecated multi-account user action.
Note: See TracChangeset
for help on using the changeset viewer.