Plugin Directory

Changeset 3374483


Ignore:
Timestamp:
10/07/2025 02:25:18 PM (2 months ago)
Author:
donncha
Message:

Committing 3.1.3 to trunk

Location:
polldaddy/trunk
Files:
2 added
1 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • polldaddy/trunk/ajax.php

    r984268 r3374483  
    7878                        <tr>
    7979                            <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>
    8181                            </th>
    8282                            <td class="answer-input">
  • polldaddy/trunk/css/polldaddy.css

    r2938809 r3374483  
    9696    padding-left: 4px;
    9797    padding-right: 4px;
    98     visibility: hidden;
     98    opacity: 0.7;
    9999}
    100100
     
    107107}
    108108table.cs-dashboard__grid tr:hover .is-links a {
    109     visibility: visible;
     109    opacity: 1;
    110110}
    111111
  • 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}})
     1jQuery(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  
    1010<p>
    1111    <?php
    12     /* translators: name of the rating being deleted */
     12    /* translators: %s is the URL to the Crowdsignal.com account details */
    1313    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
    1414    ?>
  • polldaddy/trunk/partials/crowdsignal-landing-page.php

    r2578991 r3374483  
    2424        <div class="crowdsignal-landing__hero">
    2525            <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>
    2727                <div class="crowdsignal-landing__hero-subline">
    2828                    <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' ); ?>
    3030                </div>
    3131            </div>
     
    129129    <div class="crowdsignal-landing__blocks-cta crowdsignal-landing__blocks-export-showcase">
    130130        <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" />
     131            alt="<?php esc_html_e( 'Export showcase image', 'polldaddy' ); ?>"
     132            title="<?php esc_html_e( 'Export showcase', 'polldaddy' ); ?>" width="583px" />
    133133    </div>
    134134</div>
  • polldaddy/trunk/partials/html-admin-setup-footer.php

    r2660746 r3374483  
    2222        <ul class="cs-footer__links">
    2323            <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>
    2727        </ul>
    2828    </div>
  • polldaddy/trunk/partials/html-admin-setup-header.php

    r2759245 r3374483  
    1313    <div id="cs-plugin-container">
    1414        <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>
    1616            <?php
    1717            // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     
    2222                        echo '<div class="error fade crowdsignal-message"><p>' .
    2323                        // 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' ) .
    2525                        '</p></div>';
    2626                        break;
     
    2828                        echo '<div class="updated fade crowdsignal-message"><p>' .
    2929                        // 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' ) .
    3131                        '</p></div>';
    3232                        break;
     
    3434                        echo '<div class="updated crowdsignal-message"><p>' .
    3535                        // 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' ) .
    3737                        '</p></div>';
    3838                        break;
     
    4040                        echo '<div class="updated crowdsignal-message"><p>' .
    4141                        // 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' ) .
    4343                        '</p></div>';
    4444                        break;
     
    4646                        echo '<div class="error fade crowdsignal-message"><p>' .
    4747                        // 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' ) .
    4949                        '</p></div>';
    5050                        break;
  • polldaddy/trunk/partials/html-admin-setup-step-1.php

    r2759245 r3374483  
    1414                <div class="cs-card cs-section-header is-compact">
    1515                    <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>
    1717                    </div>
    1818                </div>
     
    2323                        <div class="crowdsignal-setup__content">
    2424                            <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>
    2626                                <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>
    2727                            </div>
  • polldaddy/trunk/partials/poll-edit-form.php

    r2992544 r3374483  
    1313// phpcs:disable WordPress.WP.I18n.MissingTranslatorsComment -- TODO
    1414
    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>';
    1616?>
    1717<form enctype="multipart/form-data" name="send-media" action="admin-ajax.php" method="post">
     
    184184                    <span style="margin:6px 6px 8px;<?php echo $poll->blockRepeatVotersType === 'off' ? 'display:none;' : ''; ?>" id="cookieip_expiration_label"><label><?php _e( 'Expires: ', 'polldaddy' ); ?></label></span>
    185185                    <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>
    189195                        <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>
    192202                    </select>
    193203                    <p><?php _e( 'Note: Blocking by cookie and IP address can be problematic for some voters.', 'polldaddy' ); ?></p>
     
    279289                                <strong><?php _e( 'WordPress Shortcode:', 'polldaddy' ); ?></strong>
    280290                                <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>
    282292                            </div>
    283293                        </div>
     
    308318                                <tr>
    309319                                    <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>
    311321                                    </th>
    312322                                    <td class="answer-input">
     
    371381                                    <tr>
    372382                                        <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>
    374384                                        </th>
    375385                                        <td class="answer-input">
     
    708718                        jQuery( document ).ready(function(){
    709719                            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' ) ); ?>',
    712726                                delete_answer: '<?php echo esc_attr( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>',
    713727                                new_answer_test: '<?php echo esc_attr( __( 'Enter an answer here', 'polldaddy' ) ); ?>',
  • polldaddy/trunk/partials/polls-table.php

    r2938809 r3374483  
    3434                <thead>
    3535                    <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>
    4242                        <th class="cs-dashboard__grid is-links"></th>
    4343                    </tr>
     
    7373                            $item->name = trim( wp_strip_all_tags( $item->name ) );
    7474                            if ( 0 === strlen( $item->name ) ) {
    75                                 $item->name = __( 'Unknown' );
     75                                $item->name = __( 'Unknown', 'polldaddy' );
    7676                            }
    7777
     
    198198                            </td>
    199199                            <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' ); ?>
    201201                            </td>
    202202                            <td class="cs-dashboard__grid is-responses-total">
     
    212212                            <td class="cs-dashboard__grid is-links">
    213213                                <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>
    215215                                    <?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>
    217217                                    <?php } ?>
    218218                                    <?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>
    220220                                    <?php } ?>
    221221
    222222                                    <?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>
    224224                                    <?php } ?>
    225225
    226226                                    <?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>
    228228                                    <?php } ?>
    229229                                </span>
     
    288288
    289289    plugin = new Plugin( {
    290         <?php /* translators: name of the rating being deleted */ ?>
     290        <?php /* translators: %s is the name of the rating being deleted */ ?>
    291291        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 */ ?>
    293293        delete_poll: '<?php echo esc_js( __( 'Are you sure you want to delete the poll %s?', 'polldaddy' ) ); ?>',
    294294        delete_answer: '<?php echo esc_js( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>',
  • polldaddy/trunk/partials/settings-2.php

    r2660746 r3374483  
    88?>
    99            <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>
    1111            <br />
    1212
     
    9494                                    <input type="hidden" name="action" value="reset-account" />
    9595                                    <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>
    9797                                    <input type="submit" class="button-primary" value="<?php echo esc_attr( __( 'Reset API Connection', 'polldaddy' ) ); ?>" />
    9898                                    </p>
  • polldaddy/trunk/partials/settings.php

    r2660746 r3374483  
    1111                <div class="cs-card cs-section-header is-compact">
    1212                    <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>
    1414                    </div>
    1515                </div>
     
    1717                <div class="cs-card cs-section-header is-compact">
    1818                    <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>
    2020                        <p>
    2121            <?php
    2222            printf(
    2323                /* 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' ),
    2525                '<a href="https://crowdsignal.com/">Crowdsignal</a>'
    2626            );
     
    3030            printf(
    3131                /* 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' ),
    3333                sprintf(
    3434                    '<a href="https://crowdsignal.com/account/">%s</a>',
    35                     esc_html__( 'Crowdsignal account page', 'crowdsignal-forms' )
     35                    esc_html__( 'Crowdsignal account page', 'polldaddy' )
    3636                )
    3737            );
     
    4040            <?php if ( ! $api_key ) { ?>
    4141                        <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' ); ?>
    4343                        <form id="cs-connect-form" class="crowdsignal-options" method="post" action="https://app.crowdsignal.com/get-api-key/" target="CSCONNECT">
    4444                        <input type="hidden" name="get_api_key" value="<?php echo esc_attr( get_option( 'crowdsignal_api_key_secret' ) ); ?>" />
    4545                        <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" />
    4747                        </form>
    4848                        </p>
     
    5252            // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Used for basic flow.
    5353            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>';
    5555            }
    5656
     
    5959                                <table class="form-table settings parent-settings">
    6060                                    <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>
    6262                                        <td><input
    6363                                    <?php echo $api_key ? 'readonly' : ''; ?>
     
    7575                                            ?>
    7676                                            <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' ); ?>" />
    7878                                            <?php
    7979                                        } else {
     
    8181                                            ?>
    8282                                            <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' ); ?>" />
    8484                                            <?php
    8585                                        }
  • polldaddy/trunk/polldaddy-org.php

    r2992544 r3374483  
    261261    <h2><?php _e( 'Crowdsignal Account', 'polldaddy' ); ?></h2>
    262262
     263    <?php /* translators: %s is the URL to the Crowdsignal.com account details */ ?>
    263264    <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>
    264265
     
    472473    $polldaddy_class  = WP_POLLDADDY__CLASS;
    473474    $polldaddy_object = new $polldaddy_class;
    474     load_plugin_textdomain( 'polldaddy', '', 'polldaddy/locale' );
    475475    add_action( 'admin_menu', array( &$polldaddy_object, 'admin_menu' ) );
    476476}
     
    609609                    <label for="<?php echo esc_attr( $this->get_field_id( 'filter_by_category' ) ); ?>">
    610610                        <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'); ?>
    612612                    </label>
    613613                </p>
    614614                <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' ); ?>
    616616                            <select id="<?php echo esc_attr( $this->get_field_id( 'item_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'item_count' ) ); ?>">
    617617                        <?php
     
    653653    }
    654654
    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>';
    656658}
    657659add_action( 'admin_notices', 'polldaddy_login_warning' );
  • polldaddy/trunk/polldaddy-shortcode.php

    r2435361 r3374483  
    181181            $poll      = intval( $poll );
    182182            $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 );
    184184            $poll_link = sprintf( '<a href="%s">Take Our Poll</a>', $poll_url );
    185185
     
    443443if ( !function_exists( 'polldaddy_link' ) ) {
    444444    // http://polldaddy.com/poll/1562975/?view=results&msg=voted
     445    // http://poll.fm/1562975
    445446    function polldaddy_link( $content ) {
    446         if ( false === strpos( $content, "polldaddy.com/" ) )
     447        if ( false === strpos( $content, "polldaddy.com/" ) && false === strpos( $content, "poll.fm/" ) )
    447448            return $content;
    448449        $textarr = wp_html_split( $content );
  • polldaddy/trunk/polldaddy.php

    r3128211 r3374483  
    22/**
    33 * Plugin Name: Crowdsignal Polls & Ratings
    4  * Plugin URI: http://wordpress.org/extend/plugins/polldaddy/
     4 * Plugin URI: https://wordpress.org/plugins/polldaddy/
    55 * Description: Create and manage Crowdsignal polls and ratings in WordPress
    66 * Author: Automattic, Inc.
    77 * Author URL: https://crowdsignal.com/
    8  * Version: 3.1.2
     8 * Version: 3.1.3
     9 * Text Domain: polldaddy
     10 * Domain Path: /languages
    911 */
    1012
     
    3941}
    4042add_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 */
     49function get_polls_media_nonce() {
     50    return 'polls_media_' . get_current_user_id();
     51}
    4152
    4253class WP_Polldaddy {
     
    203214        // Add settings pages.
    204215        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 ) );
    207217            $hook = add_options_page( $settings_page_title, $settings_page_title, $menu_slug == 'ratingsettings' ? 'manage_options' : 'edit_others_posts', $menu_slug, array( $this, 'settings_page' ) );
    208218            add_action( "load-$hook", array( $this, 'management_page_load' ) );
     
    360370            <h2 id="polldaddy-header"><?php _e( 'Crowdsignal', 'polldaddy' ); ?></h2>
    361371
     372            <?php /* translators: %s is the URL to the Crowdsignal.com account details */ ?>
    362373            <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>
    363374
     
    493504        wp_enqueue_script( 'polls-common', "{$this->base_url}js/common.js", array(), $this->version );
    494505
     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
    495516        if ( $page == 'polls' ) {
    496517            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
     
    502523                    $post_id = wp_insert_post(
    503524                        array(
    504                             'post_title'   => esc_html__( 'Crowdsignal blocks in WordPress' ),
     525                            'post_title'   => esc_html__( 'Crowdsignal blocks in WordPress', 'polldaddy' ),
    505526
    506527                            'post_content' => '
     
    900921                check_admin_referer( 'polldaddy-reset' . $this->id );
    901922                $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";
    903924                foreach( $fields as $field ) {
    904925                    $value = get_option( $field );
     
    15931614                        $message = __( 'Poll deleted.', 'polldaddy' );
    15941615                    } 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 ) );
    15961619                    }
    15971620                    break;
     
    16011624                        $message = __( 'Poll opened.', 'polldaddy' );
    16021625                    } 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 ) );
    16041629                    }
    16051630                    break;
     
    16091634                        $message = __( 'Poll closed.', 'polldaddy' );
    16101635                    } 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 ) );
    16121639                    }
    16131640                    break;
     
    16321659                        $message = __( 'Custom Style deleted.', 'polldaddy' );
    16331660                    } 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 ) );
    16351664                    }
    16361665                    break;
     
    16501679                        $message = __( 'Rating deleted.', 'polldaddy' );
    16511680                    } 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 ) );
    16531684                    }
    16541685                    break;
     
    17331764                                if ( isset( $_GET['popup'] ) ) {
    17341765                                    ?>
    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>
    17361769                                    <?php
    17371770                                }
     
    17451778                            ?>
    17461779                            <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 ) ) ) ); ?>
    17481783                            </h2>
    17491784                            <?php
     
    17561791                                <?php
    17571792                                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' ),
    17591795                                    esc_url( add_query_arg( array( 'action' => 'polls', 'poll' => false, 'message' => false ) ) ),
    17601796                                    esc_url( add_query_arg( array( 'action' => 'results', 'poll' => $poll, 'message' => false ) ) )
     
    17681804                        case 'create-poll':
    17691805                            ?>
    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>
    17711809                            <?php
    17721810                            $this->poll_edit_form();
     
    17761814                            <h2 id="polldaddy-header">
    17771815                                <?php
    1778                                 if ( $this->is_author )
     1816                                if ( $this->is_author ) {
     1817                                    /* translators: %s is the URL to add new style */
    17791818                                    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                                 else
     1819                                } else {
    17811820                                    _e( 'Custom Styles', 'polldaddy' );
     1821                                }
    17821822                                ?>
    17831823                            </h2>
     
    17881828                            ?>
    17891829                            <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 ) ) ) ); ?>
    17911833                            </h2>
    17921834                            <?php
     
    17971839                            ?>
    17981840                            <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 ) ) ) ); ?>
    18001844                            </h2>
    18011845                            <?php
     
    21272171
    21282172        $class = $class ? '' : ' class="alternate"';
     2173        /* translators: %s is the URL to other answers results */
    21292174        $content = $results->others && 'Other answer…' === $answer->text ? sprintf( __( 'Other (<a href="%s">see below</a>)', 'polldaddy' ), '#other-answers-results' ) : esc_html( $answer->text );
    21302175
     
    23962441            <table>
    23972442                <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>
    23992444                    <td>
    24002445                        <select id="styleName" onchange="renderStyleEdit(this.value);">
     
    31403185                                                                    <span class="pds-answer-text" id="pds-answer-text"><?php _e( 'I use it in school!', 'polldaddy' ); ?></span>
    31413186                                                                    <span class="pds-feedback-result" id="pds-feedback-result">
    3142                                                                         <span class="pds-feedback-per" id="pds-feedback-per">&nbsp;46%</span>&nbsp;<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">&nbsp;46%</span>&nbsp;<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>
    31433190                                                                    </span>
    31443191                                                                </label>
     
    31543201                                                                    <span class="pds-answer-text" id="pds-answer-text1"><?php _e( 'I use it at home.', 'polldaddy' ); ?></span>
    31553202                                                                    <span class="pds-feedback-result" id="pds-feedback-result1">
     3203                                                                        <?php /* translators: %d is the number of votes */ ?>
    31563204                                                                        <span class="pds-feedback-per" id="pds-feedback-per1">&nbsp;30%</span>&nbsp;<span class="pds-feedback-votes" id="pds-feedback-votes1"> <?php printf( __( '(%d votes)', 'polldaddy' ), 400 ); ?></span>
    31573205                                                                    </span>
     
    31683216                                                                    <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>
    31693217                                                                    <span class="pds-feedback-result" id="pds-feedback-result2">
     3218                                                                        <?php /* translators: %d is the number of votes */ ?>
    31703219                                                                        <span class="pds-feedback-per" id="pds-feedback-per2">&nbsp;16%</span>&nbsp;<span class="pds-feedback-votes" id="pds-feedback-votes2"> <?php printf( __( '(%d votes)', 'polldaddy' ), 220 ); ?></span>
    31713220                                                                    </span>
     
    31823231                                                                    <span class="pds-answer-text" id="pds-answer-text3"><?php _e( 'Other', 'polldaddy' ); ?></span>
    31833232                                                                    <span class="pds-feedback-result" id="pds-feedback-result3">
     3233                                                                        <?php /* translators: %d is the number of votes */ ?>
    31843234                                                                        <span class="pds-feedback-per" id="pds-feedback-per3">&nbsp;8%</span>&nbsp;<span class="pds-feedback-votes" id="pds-feedback-votes3"> <?php printf( __( '(%d votes)', 'polldaddy' ), 110 ); ?></span>
    31853235                                                                    </span>
     
    32373287    jQuery( document ).ready(function(){
    32383288        plugin = new Plugin( {
     3289            <?php /* translators: %s is the name of the rating being deleted */ ?>
    32393290            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 */ ?>
    32403292            delete_poll: '<?php echo esc_attr( __( 'Are you sure you want to delete "%s"?', 'polldaddy' ) ); ?>',
    32413293            delete_answer: '<?php echo esc_attr( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>',
     
    33463398                    }
    33473399                } 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 );
    33493401                    $error = true;
    33503402                } 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 );
    33523404                    $error = true;
    33533405                } 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 );
    33553407                    $error = true;
    33563408                }
     
    33583410
    33593411            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 );
    33613413                $error = true;
    33623414            } else {
     
    35913643        $current_setting   = get_option( 'pd-rating-posts-id' );
    35923644        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>";
    35943650        }
    35953651        ?>
     
    36633719                  </tr>
    36643720                  <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>
    36663724                  </tr>
    36673725                  <tr>
     
    36693727                  </tr>
    36703728                  <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>
    36723732                  </tr>
    36733733                  <tr>
     
    36753735                  </tr>
    36763736                  <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>
    36783740                  </tr>
    36793741                  <tr>
     
    36813743                  </tr>
    36823744                  <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>
    36843748                  </tr>
    36853749                  <tr>
     
    36873751                  </tr>
    36883752                  <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>
    36903756                  </tr>
    36913757                  <tr>
     
    37743840                    $checked = ' checked="checked"';?>
    37753841                        <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 );?>
    37773845                        </label>
    37783846                    </li>
     
    40234091    jQuery( document ).ready(function(){
    40244092        plugin = new Plugin( {
     4093            <?php /* translators: %s is the name of the rating being deleted */ ?>
    40254094            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 */ ?>
    40264096            delete_poll: '<?php echo esc_attr( __( 'Are you sure you want to delete "%s"?', 'polldaddy' ) ); ?>',
    40274097            delete_answer: '<?php echo esc_attr( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>',
     
    43014371        <div class="wrap">
    43024372            <?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>
    43044376            <?php else : ?>
    43054377            <h2 id="polldaddy-header"><?php _e( 'Rating Results', 'polldaddy' ); ?></h2>
     
    43384410                        <input class="button-secondary action" type="submit" value="<?php _e( 'Filter', 'polldaddy' );?>" />
    43394411                        <?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>
    43414413                        <?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>
    43434415                        <?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>
    43454417                        <?php endif; ?>
    43464418                    </div>
     
    43564428                <tbody>
    43574429                    <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>
    43594433                    </tr>
    43604434                </tbody><?php
     
    44464520    jQuery( document ).ready(function(){
    44474521        plugin = new Plugin( {
     4522            <?php /* translators: %s is the name of the rating being deleted */ ?>
    44484523            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 */ ?>
    44494525            delete_poll: '<?php echo esc_attr( __( 'Are you sure you want to delete "%s"?', 'polldaddy' ) ); ?>',
    44504526            delete_answer: '<?php echo esc_attr( __( 'Are you sure you want to delete this answer?', 'polldaddy' ) ); ?>',
     
    46214697        echo '<div class="error" id="polldaddy">';
    46224698        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' );
    46244700        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 */
    46254702        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 */
    46264704        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' ) . '';
    46274705        echo "<ul><li> API Key: " . get_option( 'polldaddy_api_key' ) . "</li>";
  • polldaddy/trunk/popups.php

    r984268 r3374483  
    1818                <p>' . __('Paste your YouTube or Google Video URL above, or use the examples below.', 'polldaddy') . '</p>
    1919                <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>
    2338                </ul>
    2439            </td>
     
    8499
    85100function 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;
    90104    }
     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' );
    91128}
    92129
  • polldaddy/trunk/readme.txt

    r3128211 r3374483  
    44Requires at least: 5.5
    55Requires PHP: 5.6
    6 Tested up to: 6.6.1
    7 Stable tag: 3.1.2
     6Tested up to: 6.8
     7Stable tag: 3.1.3
    88
    99== Description ==
     
    2626Some 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/).
    2727
    28 Development of the plugin will take place in [this Github repository](https://github.com/Automattic/crowdsignal-plugin).
     28Development of the plugin takes place in [this GitHub repository](https://github.com/Automattic/crowdsignal-plugin). Contributions are welcome!
    2929
    3030=== The Classic Editor ===
     
    9696
    9797== 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
    98114= 3.1.2 =
    99115* Add referer check on deprecated multi-account user action.
Note: See TracChangeset for help on using the changeset viewer.