Version Description
- The usercode blog options don't need to be autoloaded.
- Use HTTPS for the API url.
Download this release
Release Info
Developer | donncha |
Plugin | Crowdsignal Dashboard – Polls, Surveys & more |
Version | 2.0.37 |
Comparing to | |
See all releases |
Code changes from version 2.0.36 to 2.0.37
- polldaddy-client.php +1 -1
- polldaddy-org.php +1 -1
- polldaddy.php +23 -5
- readme.txt +7 -3
polldaddy-client.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
require_once dirname( __FILE__ ) . '/polldaddy-xml.php';
|
4 |
|
5 |
class api_client {
|
6 |
-
var $polldaddy_url = '
|
7 |
var $partnerGUID;
|
8 |
var $userCode;
|
9 |
var $admin = 0;
|
3 |
require_once dirname( __FILE__ ) . '/polldaddy-xml.php';
|
4 |
|
5 |
class api_client {
|
6 |
+
var $polldaddy_url = 'https://api.polldaddy.com/';
|
7 |
var $partnerGUID;
|
8 |
var $userCode;
|
9 |
var $admin = 0;
|
polldaddy-org.php
CHANGED
@@ -181,7 +181,7 @@ class WPORG_Polldaddy extends WP_Polldaddy {
|
|
181 |
);
|
182 |
|
183 |
if ( function_exists( 'wp_remote_post' ) ) { // WP 2.7+
|
184 |
-
$polldaddy_api_key = wp_remote_post(
|
185 |
'body' => $details
|
186 |
) );
|
187 |
if ( is_wp_error( $polldaddy_api_key ) ) {
|
181 |
);
|
182 |
|
183 |
if ( function_exists( 'wp_remote_post' ) ) { // WP 2.7+
|
184 |
+
$polldaddy_api_key = wp_remote_post( 'https://api.polldaddy.com/key.php', array(
|
185 |
'body' => $details
|
186 |
) );
|
187 |
if ( is_wp_error( $polldaddy_api_key ) ) {
|
polldaddy.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Description: Create and manage Polldaddy polls and ratings in WordPress
|
7 |
* Author: Automattic, Inc.
|
8 |
* Author URL: http://polldaddy.com/
|
9 |
-
* Version: 2.0.
|
10 |
*/
|
11 |
|
12 |
// To hardcode your Polldaddy PartnerGUID (API Key), add the (uncommented) line below with the PartnerGUID to your `wp-config.php`
|
@@ -203,7 +203,7 @@ class WP_Polldaddy {
|
|
203 |
'partner_userid' => $this->id
|
204 |
);
|
205 |
if ( function_exists( 'wp_remote_post' ) ) { // WP 2.7+
|
206 |
-
$polldaddy_api_key = wp_remote_post(
|
207 |
'body' => $details
|
208 |
) );
|
209 |
if ( is_wp_error( $polldaddy_api_key ) ) {
|
@@ -272,7 +272,13 @@ class WP_Polldaddy {
|
|
272 |
|
273 |
if ( isset( $this->errors->errors[4] ) ) {
|
274 |
//need to get latest usercode
|
275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
$this->set_api_user_code();
|
277 |
}
|
278 |
}
|
@@ -363,7 +369,13 @@ class WP_Polldaddy {
|
|
363 |
$this->user_code = $polldaddy->get_usercode( $this->id );
|
364 |
|
365 |
if ( !empty( $this->user_code ) ) {
|
366 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
} elseif ( get_option( 'polldaddy_api_key' ) ) {
|
368 |
$this->contact_support_message( 'There was a problem linking your account', $polldaddy->errors );
|
369 |
}
|
@@ -535,7 +547,13 @@ class WP_Polldaddy {
|
|
535 |
check_admin_referer( 'polldaddy-account' );
|
536 |
|
537 |
$this->user_code = '';
|
538 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
|
540 |
if ( $new_args = $this->management_page_load_signup() )
|
541 |
$query_args = array_merge( $query_args, $new_args );
|
6 |
* Description: Create and manage Polldaddy polls and ratings in WordPress
|
7 |
* Author: Automattic, Inc.
|
8 |
* Author URL: http://polldaddy.com/
|
9 |
+
* Version: 2.0.37
|
10 |
*/
|
11 |
|
12 |
// To hardcode your Polldaddy PartnerGUID (API Key), add the (uncommented) line below with the PartnerGUID to your `wp-config.php`
|
203 |
'partner_userid' => $this->id
|
204 |
);
|
205 |
if ( function_exists( 'wp_remote_post' ) ) { // WP 2.7+
|
206 |
+
$polldaddy_api_key = wp_remote_post( 'https://api.polldaddy.com/key.php', array(
|
207 |
'body' => $details
|
208 |
) );
|
209 |
if ( is_wp_error( $polldaddy_api_key ) ) {
|
272 |
|
273 |
if ( isset( $this->errors->errors[4] ) ) {
|
274 |
//need to get latest usercode
|
275 |
+
global $wp_version;
|
276 |
+
if ( version_compare( $wp_version, '4.2', '<' ) ) {
|
277 |
+
delete_option( 'pd-usercode-' . $this->id );
|
278 |
+
add_option( 'pd-usercode-' . $this->id, '', '', false );
|
279 |
+
} else {
|
280 |
+
update_option( 'pd-usercode-' . $this->id, '', false );
|
281 |
+
}
|
282 |
$this->set_api_user_code();
|
283 |
}
|
284 |
}
|
369 |
$this->user_code = $polldaddy->get_usercode( $this->id );
|
370 |
|
371 |
if ( !empty( $this->user_code ) ) {
|
372 |
+
global $wp_version;
|
373 |
+
if ( version_compare( $wp_version, '4.2', '<' ) ) {
|
374 |
+
delete_option( 'pd-usercode-' . $this->id );
|
375 |
+
add_option( 'pd-usercode-' . $this->id, $this->user_code, '', false );
|
376 |
+
} else {
|
377 |
+
update_option( 'pd-usercode-' . $this->id, $this->user_code, false );
|
378 |
+
}
|
379 |
} elseif ( get_option( 'polldaddy_api_key' ) ) {
|
380 |
$this->contact_support_message( 'There was a problem linking your account', $polldaddy->errors );
|
381 |
}
|
547 |
check_admin_referer( 'polldaddy-account' );
|
548 |
|
549 |
$this->user_code = '';
|
550 |
+
global $wp_version;
|
551 |
+
if ( version_compare( $wp_version, '4.2', '<' ) ) {
|
552 |
+
delete_option( 'pd-usercode-' . $this->id );
|
553 |
+
add_option( 'pd-usercode-' . $this->id, '', false );
|
554 |
+
} else {
|
555 |
+
update_option( 'pd-usercode-' . $this->id, '', false );
|
556 |
+
}
|
557 |
|
558 |
if ( $new_args = $this->management_page_load_signup() )
|
559 |
$query_args = array_merge( $query_args, $new_args );
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: eoigal, mdawaffe, donncha, johnny5, panosktn
|
3 |
Tags: polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 3.3
|
5 |
-
Tested up to: 4.9.
|
6 |
-
Stable tag: 2.0.
|
7 |
|
8 |
Create and manage Polldaddy polls and ratings from within WordPress.
|
9 |
|
@@ -117,10 +117,14 @@ Your theme is getting the post content, without necessarily showing it. If the p
|
|
117 |
|
118 |
|
119 |
== Upgrade Notice ==
|
120 |
-
|
121 |
|
122 |
== Changelog ==
|
123 |
|
|
|
|
|
|
|
|
|
124 |
= 2.0.36 =
|
125 |
* The "top rated" widget class is defined by some hosts already so check if it exists before creating it again.
|
126 |
|
2 |
Contributors: eoigal, mdawaffe, donncha, johnny5, panosktn
|
3 |
Tags: polls, poll, polldaddy, wppolls, vote, polling, surveys, rate, rating, ratings
|
4 |
Requires at least: 3.3
|
5 |
+
Tested up to: 4.9.4
|
6 |
+
Stable tag: 2.0.37
|
7 |
|
8 |
Create and manage Polldaddy polls and ratings from within WordPress.
|
9 |
|
117 |
|
118 |
|
119 |
== Upgrade Notice ==
|
120 |
+
Don't autoload the usercode blog options
|
121 |
|
122 |
== Changelog ==
|
123 |
|
124 |
+
= 2.0.37 =
|
125 |
+
* The usercode blog options don't need to be autoloaded.
|
126 |
+
* Use HTTPS for the API url.
|
127 |
+
|
128 |
= 2.0.36 =
|
129 |
* The "top rated" widget class is defined by some hosts already so check if it exists before creating it again.
|
130 |
|