Version Description
- Updated regular expressions within the plugin for PHP 7.3 compatibility.
- Fixed 'button'-type shortcode embed links.
- Updated the 'Polls' tab in WP Admin with Crowdsignal's updated shortcode and URLs.
- Tested with WordPress 5.0.
Download this release
Release Info
Developer | ice9js |
Plugin | Crowdsignal Dashboard – Polls, Surveys & more |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1.0 to 2.1.1
- polldaddy-client.php +1 -1
- polldaddy-org.php +1 -1
- polldaddy-shortcode.php +3 -3
- polldaddy.php +10 -16
- readme.txt +8 -2
polldaddy-client.php
CHANGED
@@ -1080,7 +1080,7 @@ function polldaddy_email( $args = null, $id = null, $_require_data = true ) {
|
|
1080 |
}
|
1081 |
|
1082 |
// Check email is an email address
|
1083 |
-
if ( preg_match( '/^[A-Z0-
|
1084 |
return false;
|
1085 |
}
|
1086 |
|
1080 |
}
|
1081 |
|
1082 |
// Check email is an email address
|
1083 |
+
if ( preg_match( '/^[A-Z0-9_%\.\+\-]+@[A-Z0-9\.\-]+\.[A-Z]{2,4}$/i', $args['address'], $matches ) == 0 )
|
1084 |
return false;
|
1085 |
}
|
1086 |
|
polldaddy-org.php
CHANGED
@@ -453,7 +453,7 @@ if ( !function_exists( 'wp_strip_all_tags' ) ) {
|
|
453 |
$string = strip_tags($string);
|
454 |
|
455 |
if ( $remove_breaks )
|
456 |
-
$string = preg_replace('/[\r\n\t
|
457 |
|
458 |
return trim($string);
|
459 |
}
|
453 |
$string = strip_tags($string);
|
454 |
|
455 |
if ( $remove_breaks )
|
456 |
+
$string = preg_replace('/[\r\n\t\s]+/', ' ', $string);
|
457 |
|
458 |
return trim($string);
|
459 |
}
|
polldaddy-shortcode.php
CHANGED
@@ -42,15 +42,15 @@ CONTAINER;
|
|
42 |
$include = $this->compress_it( $include );
|
43 |
|
44 |
$placeholder = '<div class="cs-embed pd-embed" data-settings="'.esc_attr( json_encode( $settings ) ).'"></div>';
|
45 |
-
if ( $type === 'button' )
|
46 |
-
$placeholder = '<a class="cs-embed pd-embed" href="'.esc_attr( $
|
47 |
|
48 |
$js_include = $placeholder."\n";
|
49 |
$js_include .= '<script type="text/javascript"><!--//--><![CDATA[//><!--'."\n";
|
50 |
$js_include .= $include."\n";
|
51 |
$js_include .= "//--><!]]></script>\n";
|
52 |
|
53 |
-
if ( $type !== 'button' )
|
54 |
$js_include .= '<noscript>'.$survey_link."</noscript>\n";
|
55 |
|
56 |
return $js_include;
|
42 |
$include = $this->compress_it( $include );
|
43 |
|
44 |
$placeholder = '<div class="cs-embed pd-embed" data-settings="'.esc_attr( json_encode( $settings ) ).'"></div>';
|
45 |
+
if ( $settings['type'] === 'button' )
|
46 |
+
$placeholder = '<a class="cs-embed pd-embed" href="https://survey.fm/'.esc_attr( $settings['id'] ).'" data-settings="'.esc_attr( json_encode( $settings ) ).'">'.esc_html( $settings['title'] ).'</a>';
|
47 |
|
48 |
$js_include = $placeholder."\n";
|
49 |
$js_include .= '<script type="text/javascript"><!--//--><![CDATA[//><!--'."\n";
|
50 |
$js_include .= $include."\n";
|
51 |
$js_include .= "//--><!]]></script>\n";
|
52 |
|
53 |
+
if ( $settings['type'] !== 'button' )
|
54 |
$js_include .= '<noscript>'.$survey_link."</noscript>\n";
|
55 |
|
56 |
return $js_include;
|
polldaddy.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Description: Create and manage Crowdsignal polls and ratings in WordPress
|
7 |
* Author: Automattic, Inc.
|
8 |
* Author URL: https://crowdsignal.com/
|
9 |
-
* Version: 2.1.
|
10 |
*/
|
11 |
|
12 |
// To hardcode your Polldaddy PartnerGUID (API Key), add the (uncommented) line below with the PartnerGUID to your `wp-config.php`
|
@@ -1312,7 +1312,7 @@ class WP_Polldaddy {
|
|
1312 |
}
|
1313 |
endif;
|
1314 |
|
1315 |
-
echo do_shortcode( "[
|
1316 |
|
1317 |
wp_print_scripts( 'polldaddy-poll-js' );
|
1318 |
break;
|
@@ -1595,18 +1595,12 @@ class WP_Polldaddy {
|
|
1595 |
|
1596 |
<div class="pd-embed-col">
|
1597 |
<h4 style="color:#666;font-weight:normal;"><?php _e( 'WordPress Shortcode', 'polldaddy' ); ?></h4>
|
1598 |
-
<input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="[
|
1599 |
</div>
|
1600 |
|
1601 |
<div class="pd-embed-col">
|
1602 |
-
<h4 style="color:#666;font-weight:normal;"><?php _e( '
|
1603 |
-
<input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="
|
1604 |
-
|
1605 |
-
</div>
|
1606 |
-
|
1607 |
-
<div class="pd-embed-col">
|
1608 |
-
<h4 style="color:#666;font-weight:normal;"><?php _e( 'Facebook URL', 'polldaddy' ); ?></h4>
|
1609 |
-
<input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="http://poll.fm/f/<?php echo base_convert( $poll_id, 10, 36 ); ?>"/>
|
1610 |
</div>
|
1611 |
|
1612 |
<br class="clearing" />
|
@@ -1614,10 +1608,10 @@ class WP_Polldaddy {
|
|
1614 |
|
1615 |
<h4 style="padding-top:10px;color:#666;font-weight:normal;"><?php _e( 'JavaScript', 'polldaddy' ); ?></h4>
|
1616 |
<pre class="hardbreak" style="max-width:542px;text-wrap:word-wrap;margin-bottom:20px;"><script type="text/javascript" language="javascript"
|
1617 |
-
src="
|
1618 |
<noscript>
|
1619 |
-
<a href="
|
1620 |
-
<span style="font:9px;">(<a href="
|
1621 |
</noscript></pre>
|
1622 |
<p class="submit" style="clear:both;padding:0px;">
|
1623 |
<a href="#" class="button pd-embed-done"><?php _e( 'Done', 'polldaddy' ); ?></a>
|
@@ -2015,8 +2009,8 @@ src="http://static.polldaddy.com/p/<?php echo (int) $poll_id; ?>.js"></scr
|
|
2015 |
<div class="inside">
|
2016 |
<div id="edit-slug-box" style="margin-bottom:30px;">
|
2017 |
<strong><?php _e( 'WordPress Shortcode:', 'polldaddy' ); ?></strong>
|
2018 |
-
<input type="text" style="color:#999;" value="[
|
2019 |
-
<span><a href="post-new.php?content=[
|
2020 |
</div>
|
2021 |
</div>
|
2022 |
<?php endif; ?>
|
6 |
* Description: Create and manage Crowdsignal polls and ratings in WordPress
|
7 |
* Author: Automattic, Inc.
|
8 |
* Author URL: https://crowdsignal.com/
|
9 |
+
* Version: 2.1.1
|
10 |
*/
|
11 |
|
12 |
// To hardcode your Polldaddy PartnerGUID (API Key), add the (uncommented) line below with the PartnerGUID to your `wp-config.php`
|
1312 |
}
|
1313 |
endif;
|
1314 |
|
1315 |
+
echo do_shortcode( "[crowdsignal poll=$poll cb=1]" );
|
1316 |
|
1317 |
wp_print_scripts( 'polldaddy-poll-js' );
|
1318 |
break;
|
1595 |
|
1596 |
<div class="pd-embed-col">
|
1597 |
<h4 style="color:#666;font-weight:normal;"><?php _e( 'WordPress Shortcode', 'polldaddy' ); ?></h4>
|
1598 |
+
<input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="[crowdsignal poll=<?php echo (int) $poll_id; ?>]"/>
|
1599 |
</div>
|
1600 |
|
1601 |
<div class="pd-embed-col">
|
1602 |
+
<h4 style="color:#666;font-weight:normal;"><?php _e( 'Direct URL', 'polldaddy' ); ?></h4>
|
1603 |
+
<input type="text" readonly="readonly" style="width: 175px;" onclick="this.select();" value="https://poll.fm/<?php echo (int) $poll_id; ?>"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
1604 |
</div>
|
1605 |
|
1606 |
<br class="clearing" />
|
1608 |
|
1609 |
<h4 style="padding-top:10px;color:#666;font-weight:normal;"><?php _e( 'JavaScript', 'polldaddy' ); ?></h4>
|
1610 |
<pre class="hardbreak" style="max-width:542px;text-wrap:word-wrap;margin-bottom:20px;"><script type="text/javascript" language="javascript"
|
1611 |
+
src="https://static.polldaddy.com/p/<?php echo (int) $poll_id; ?>.js"></script>
|
1612 |
<noscript>
|
1613 |
+
<a href="https://poll.fm/<?php echo (int) $poll_id; ?>/"><?php echo trim( strip_tags( $poll->___content ) ); ?></a><br/>
|
1614 |
+
<span style="font:9px;">(<a href="https://crowdsignal.com">polls</a>)</span>
|
1615 |
</noscript></pre>
|
1616 |
<p class="submit" style="clear:both;padding:0px;">
|
1617 |
<a href="#" class="button pd-embed-done"><?php _e( 'Done', 'polldaddy' ); ?></a>
|
2009 |
<div class="inside">
|
2010 |
<div id="edit-slug-box" style="margin-bottom:30px;">
|
2011 |
<strong><?php _e( 'WordPress Shortcode:', 'polldaddy' ); ?></strong>
|
2012 |
+
<input type="text" style="color:#999;" value="[crowdsignal poll=<?php echo $poll->_id; ?>]" id="shortcode-field" readonly="readonly" />
|
2013 |
+
<span><a href="post-new.php?content=[crowdsignal poll=<?php echo $poll->_id; ?>]" class="button"><?php _e( 'Embed Poll in New Post' ); ?></a></span>
|
2014 |
</div>
|
2015 |
</div>
|
2016 |
<?php endif; ?>
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: eoigal, mdawaffe, donncha, johnny5, panosktn, ice9js
|
3 |
Tags: crowdsignal, polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 3.3
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 2.1.
|
7 |
|
8 |
Create and manage Crowdsignal polls and ratings from within WordPress.
|
9 |
|
@@ -125,6 +125,12 @@ Don't autoload the usercode blog options
|
|
125 |
|
126 |
== Changelog ==
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
= 2.1.0 =
|
129 |
* Added a [crowdsignal] shortcode that mimics [polldaddy] which is now deprecated.
|
130 |
* Updated the plugin to work with updated Crowdsignal URLs for polls & surveys
|
2 |
Contributors: eoigal, mdawaffe, donncha, johnny5, panosktn, ice9js
|
3 |
Tags: crowdsignal, polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 3.3
|
5 |
+
Tested up to: 5.0
|
6 |
+
Stable tag: 2.1.1
|
7 |
|
8 |
Create and manage Crowdsignal polls and ratings from within WordPress.
|
9 |
|
125 |
|
126 |
== Changelog ==
|
127 |
|
128 |
+
= 2.1.1 =
|
129 |
+
* Updated regular expressions within the plugin for PHP 7.3 compatibility.
|
130 |
+
* Fixed 'button'-type shortcode embed links.
|
131 |
+
* Updated the 'Polls' tab in WP Admin with Crowdsignal's updated shortcode and URLs.
|
132 |
+
* Tested with WordPress 5.0.
|
133 |
+
|
134 |
= 2.1.0 =
|
135 |
* Added a [crowdsignal] shortcode that mimics [polldaddy] which is now deprecated.
|
136 |
* Updated the plugin to work with updated Crowdsignal URLs for polls & surveys
|