Version Description
- Tested with version 3.2
- Added extra shortcode handler for inline surveys
- Fix Polldaddy icon position on poll pages
- Remove rating javascript code from feeds and ajax
Download this release
Release Info
Developer | eoigal |
Plugin | Crowdsignal Dashboard – Polls, Surveys & more |
Version | 2.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 2.0.5
- admin-style.php +2 -2
- polldaddy-org.php +52 -23
- polldaddy.php +2 -2
- readme.txt +8 -2
admin-style.php
CHANGED
@@ -42,13 +42,13 @@ if( $color == 'blue' ){
|
|
42 |
|
43 |
h2#polldaddy-header, h2#poll-list-header{
|
44 |
padding-left:38px;
|
45 |
-
background:url('<?php echo $this->base_url; ?>img/pd-wp-icon-<?php echo $color; ?>-lrg.png') no-repeat
|
46 |
margin-bottom: 14px;
|
47 |
}
|
48 |
|
49 |
<?php if( isset( $_GET['iframe']) ):?>
|
50 |
h2#polldaddy-header, h2#poll-list-header{
|
51 |
-
background-position:
|
52 |
margin-top: 20px;
|
53 |
}
|
54 |
|
42 |
|
43 |
h2#polldaddy-header, h2#poll-list-header{
|
44 |
padding-left:38px;
|
45 |
+
background:url('<?php echo $this->base_url; ?>img/pd-wp-icon-<?php echo $color; ?>-lrg.png') no-repeat 0 9px;
|
46 |
margin-bottom: 14px;
|
47 |
}
|
48 |
|
49 |
<?php if( isset( $_GET['iframe']) ):?>
|
50 |
h2#polldaddy-header, h2#poll-list-header{
|
51 |
+
background-position: 0 0;
|
52 |
margin-top: 20px;
|
53 |
}
|
54 |
|
polldaddy-org.php
CHANGED
@@ -11,7 +11,7 @@ class WPORG_PollDaddy extends WP_PollDaddy {
|
|
11 |
|
12 |
function __construct() {
|
13 |
parent::__construct();
|
14 |
-
$this->version = '2.0.
|
15 |
$this->base_url = plugins_url() . '/' . dirname( plugin_basename( __FILE__ ) ) . '/';
|
16 |
$this->polldaddy_client_class = 'WPORG_PollDaddy_Client';
|
17 |
$this->use_ssl = (int) get_option( 'polldaddy_use_ssl' );
|
@@ -402,6 +402,12 @@ if ( !function_exists( 'polldaddy_shortcode_handler' ) ) {
|
|
402 |
|
403 |
function polldaddy_shortcode_handler( $atts, $content = null ) {
|
404 |
global $post;
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
|
406 |
extract( shortcode_atts( array(
|
407 |
'survey' => null,
|
@@ -418,11 +424,22 @@ if ( !function_exists( 'polldaddy_shortcode_handler' ) ) {
|
|
418 |
'text_color' => '000000',
|
419 |
'back_color' => 'FFFFFF',
|
420 |
'align' => '',
|
421 |
-
'style' => ''
|
|
|
|
|
422 |
), $atts ) );
|
423 |
|
424 |
$survey = esc_attr( str_replace( "'", "", $survey ) );
|
425 |
$link_text = esc_attr( $link_text );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
|
427 |
if ( null != $survey ) {
|
428 |
|
@@ -437,25 +454,34 @@ if ( !function_exists( 'polldaddy_shortcode_handler' ) ) {
|
|
437 |
$back_color = preg_replace( '/&(\w*);/', '&$1;', esc_js( esc_attr( $back_color ) ) );
|
438 |
$align = preg_replace( '/&(\w*);/', '&$1;', esc_js( esc_attr( $align ) ) );
|
439 |
$style = preg_replace( '/&(\w*);/', '&$1;', esc_js( esc_attr( $style ) ) );
|
440 |
-
|
441 |
-
|
442 |
-
<
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
} else {
|
460 |
return "
|
461 |
<script language='javascript' type='text/javascript'>
|
@@ -472,7 +498,7 @@ if ( !function_exists( 'polldaddy_shortcode_handler' ) ) {
|
|
472 |
$rating = (int) $rating;
|
473 |
$cb = (int) $cb;
|
474 |
|
475 |
-
if ( $rating > 0 ) {
|
476 |
if ( null != $unique_id ) {
|
477 |
$unique_id = wp_specialchars( $unique_id );
|
478 |
} else {
|
@@ -533,7 +559,10 @@ if ( !function_exists( 'polldaddy_shortcode_handler' ) ) {
|
|
533 |
else
|
534 |
$margins = null;
|
535 |
|
536 |
-
|
|
|
|
|
|
|
537 |
<noscript>
|
538 |
<a href="http://polldaddy.com/poll/' . $poll . '/">View This Poll</a><br/><span style="font-size:10px;">' . $keywords_link . '</span>
|
539 |
</noscript>';
|
11 |
|
12 |
function __construct() {
|
13 |
parent::__construct();
|
14 |
+
$this->version = '2.0.5';
|
15 |
$this->base_url = plugins_url() . '/' . dirname( plugin_basename( __FILE__ ) ) . '/';
|
16 |
$this->polldaddy_client_class = 'WPORG_PollDaddy_Client';
|
17 |
$this->use_ssl = (int) get_option( 'polldaddy_use_ssl' );
|
402 |
|
403 |
function polldaddy_shortcode_handler( $atts, $content = null ) {
|
404 |
global $post;
|
405 |
+
global $content_width;
|
406 |
+
|
407 |
+
$no_script = false;
|
408 |
+
|
409 |
+
if ( is_feed() || defined( 'DOING_AJAX' ) )
|
410 |
+
$no_script = true;
|
411 |
|
412 |
extract( shortcode_atts( array(
|
413 |
'survey' => null,
|
424 |
'text_color' => '000000',
|
425 |
'back_color' => 'FFFFFF',
|
426 |
'align' => '',
|
427 |
+
'style' => '',
|
428 |
+
'width' => $content_width,
|
429 |
+
'height' => floor( $content_width * 3 / 4 )
|
430 |
), $atts ) );
|
431 |
|
432 |
$survey = esc_attr( str_replace( "'", "", $survey ) );
|
433 |
$link_text = esc_attr( $link_text );
|
434 |
+
|
435 |
+
if ( isset( $content_width ) && is_numeric( $width ) && $width > $content_width )
|
436 |
+
$width = $content_width;
|
437 |
+
|
438 |
+
if ( !$width )
|
439 |
+
$width = '100%';
|
440 |
+
|
441 |
+
if ( !$height )
|
442 |
+
$height = '600';
|
443 |
|
444 |
if ( null != $survey ) {
|
445 |
|
454 |
$back_color = preg_replace( '/&(\w*);/', '&$1;', esc_js( esc_attr( $back_color ) ) );
|
455 |
$align = preg_replace( '/&(\w*);/', '&$1;', esc_js( esc_attr( $align ) ) );
|
456 |
$style = preg_replace( '/&(\w*);/', '&$1;', esc_js( esc_attr( $style ) ) );
|
457 |
+
|
458 |
+
if ( $no_script ) {
|
459 |
+
return "<a href='http://polldaddy.com/s/$survey'>$title</a>";
|
460 |
+
} else {
|
461 |
+
if ( $type == 'inline' ) {
|
462 |
+
return <<<EOD
|
463 |
+
<iframe src="$survey?iframe=1" frameborder="0" width="$width" height="$height" scrolling="auto" marginheight="0" marginwidth="0"><a href='$survey'>$link_text</a></iframe>
|
464 |
+
EOD;
|
465 |
+
}
|
466 |
+
|
467 |
+
return "
|
468 |
+
<script type='text/javascript' src='http://i0.poll.fm/survey.js' charset='UTF-8'></script>
|
469 |
+
<noscript><a href='http://polldaddy.com/s/$survey'>$title</a></noscript>
|
470 |
+
<script type='text/javascript'>
|
471 |
+
polldaddy.add( {
|
472 |
+
title: '$title',
|
473 |
+
type: '$type',
|
474 |
+
body: '$body',
|
475 |
+
button: '$button',
|
476 |
+
text_color: '$text_color',
|
477 |
+
back_color: '$back_color',
|
478 |
+
align: '$align',
|
479 |
+
style: '$style',
|
480 |
+
id: '$survey'
|
481 |
+
} );
|
482 |
+
</script>
|
483 |
+
";
|
484 |
+
}
|
485 |
} else {
|
486 |
return "
|
487 |
<script language='javascript' type='text/javascript'>
|
498 |
$rating = (int) $rating;
|
499 |
$cb = (int) $cb;
|
500 |
|
501 |
+
if ( !$no_script && $rating > 0 ) {
|
502 |
if ( null != $unique_id ) {
|
503 |
$unique_id = wp_specialchars( $unique_id );
|
504 |
} else {
|
559 |
else
|
560 |
$margins = null;
|
561 |
|
562 |
+
if ( $no_script )
|
563 |
+
return '<a href="http://polldaddy.com/poll/' . $poll . '/">View This Poll</a><br/><span style="font-size:10px;">' . $keywords_link . '</span>';
|
564 |
+
else
|
565 |
+
return '<a name="pd_a_' . $poll . '"></a><div class="PDS_Poll" id="PDI_container' . $poll . '" style="display:inline-block;' . $float . '' . $margins . '"></div><div id="PD_superContainer"></div><script type="text/javascript" language="javascript" charset="utf-8" src="http://static.polldaddy.com/p/' . $poll . '.js' . $cb . '"></script>
|
566 |
<noscript>
|
567 |
<a href="http://polldaddy.com/poll/' . $poll . '/">View This Poll</a><br/><span style="font-size:10px;">' . $keywords_link . '</span>
|
568 |
</noscript>';
|
polldaddy.php
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://wordpress.org/extend/plugins/polldaddy/
|
|
6 |
Description: Create and manage Polldaddy polls and ratings in WordPress
|
7 |
Author: Automattic, Inc.
|
8 |
Author URL: http://automattic.com/
|
9 |
-
Version: 2.0.
|
10 |
*/
|
11 |
|
12 |
// You can hardcode your PollDaddy PartnerGUID (API Key) here
|
@@ -34,7 +34,7 @@ class WP_PollDaddy {
|
|
34 |
global $current_user;
|
35 |
$this->errors = new WP_Error;
|
36 |
$this->scheme = 'https';
|
37 |
-
$this->version = '2.0.
|
38 |
$this->multiple_accounts = true;
|
39 |
$this->polldaddy_client_class = 'api_client';
|
40 |
$this->polldaddy_clients = array();
|
6 |
Description: Create and manage Polldaddy polls and ratings in WordPress
|
7 |
Author: Automattic, Inc.
|
8 |
Author URL: http://automattic.com/
|
9 |
+
Version: 2.0.5
|
10 |
*/
|
11 |
|
12 |
// You can hardcode your PollDaddy PartnerGUID (API Key) here
|
34 |
global $current_user;
|
35 |
$this->errors = new WP_Error;
|
36 |
$this->scheme = 'https';
|
37 |
+
$this->version = '2.0.5';
|
38 |
$this->multiple_accounts = true;
|
39 |
$this->polldaddy_client_class = 'api_client';
|
40 |
$this->polldaddy_clients = array();
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: eoigal, alternatekev, mdawaffe
|
3 |
Tags: polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 2.6
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 2.0.
|
7 |
|
8 |
Create and manage Polldaddy polls and ratings from within WordPress.
|
9 |
|
@@ -67,6 +67,12 @@ More info here - http://codex.wordpress.org/Theme_Development#Plugin_API_Hooks
|
|
67 |
You need to select the synchronize ratings account in the Options menu to make sure the ratings API key is valid.
|
68 |
|
69 |
== Change Log ==
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
= 2.0.4 =
|
71 |
* Fixed bugs with using new ajax.php in PHP 4
|
72 |
* Fixed issue with conflicts with other plugins using ajax.php
|
2 |
Contributors: eoigal, alternatekev, mdawaffe
|
3 |
Tags: polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 2.6
|
5 |
+
Tested up to: 3.2
|
6 |
+
Stable tag: 2.0.5
|
7 |
|
8 |
Create and manage Polldaddy polls and ratings from within WordPress.
|
9 |
|
67 |
You need to select the synchronize ratings account in the Options menu to make sure the ratings API key is valid.
|
68 |
|
69 |
== Change Log ==
|
70 |
+
= 2.0.5 =
|
71 |
+
* Tested with version 3.2
|
72 |
+
* Added extra shortcode handler for inline surveys
|
73 |
+
* Fix Polldaddy icon position on poll pages
|
74 |
+
* Remove rating javascript code from feeds and ajax
|
75 |
+
|
76 |
= 2.0.4 =
|
77 |
* Fixed bugs with using new ajax.php in PHP 4
|
78 |
* Fixed issue with conflicts with other plugins using ajax.php
|