Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page - Version 5.6.0

Version Description

N/A

Download this release

Release Info

Developer yoffegil
Plugin Icon 128x128 Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page
Version 5.6.0
Comparing to
See all releases

Code changes from version 5.5.0 to 5.6.0

opinionstage-functions.php CHANGED
@@ -34,13 +34,20 @@ function opinionstage_create_embed_code($id) {
34
  // Only present if id is available
35
  if (isset($id) && !empty($id)) {
36
  // Load embed code from the cache if possible
37
- if ( false === ( $code = get_transient( 'embed_code' . $id) ) ) {
38
- extract(opinionstage_get_contents("http://".OPINIONSTAGE_SERVER_BASE."/api/debates/" . $id . "/embed_code.json"));
 
 
 
 
 
 
 
39
  $data = json_decode($raw_data);
40
  if ($success) {
41
  $code = $data->{'code'};
42
  // Set the embed code to be cached for an hour
43
- set_transient( 'embed_code' . $id, $code, 3600);
44
  }
45
  }
46
  }
34
  // Only present if id is available
35
  if (isset($id) && !empty($id)) {
36
  // Load embed code from the cache if possible
37
+ $is_homepage = is_home();
38
+ $transient_name = 'embed_code' . $id . '_' . ($is_homepage ? "1" : "0");
39
+ if ( false === ( $code = get_transient($transient_name) ) ) {
40
+ $embed_code_url = "http://".OPINIONSTAGE_SERVER_BASE."/api/debates/" . $id . "/embed_code.json";
41
+ if ($is_homepage) {
42
+ $embed_code_url .= "?h=1";
43
+ }
44
+
45
+ extract(opinionstage_get_contents($embed_code_url));
46
  $data = json_decode($raw_data);
47
  if ($success) {
48
  $code = $data->{'code'};
49
  // Set the embed code to be cached for an hour
50
+ set_transient($transient_name, $code, 3600);
51
  }
52
  }
53
  }
opinionstage-polls.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Social Polls by OpinionStage
4
  Plugin URI: http://www.opinionstage.com
5
  Description: Adds a highly engaging social polling system to your blog. You can easily add a social poll to your blog post/page by clicking the social poll icon in the WordPress post/page text editor.
6
- Version: 5.5.0
7
  Author: OpinionStage.com
8
  Author URI: http://www.opinionstage.com
9
  */
@@ -11,7 +11,7 @@ Author URI: http://www.opinionstage.com
11
  /* --- Static initializer for Wordpress hooks --- */
12
 
13
  define('OPINIONSTAGE_SERVER_BASE', "www.opinionstage.com"); /* Don't include the protocol, added dynamically */
14
- define('OPINIONSTAGE_WIDGET_VERSION', '5.5.0');
15
  define('OPINIONSTAGE_WIDGET_PLUGIN_NAME', 'Social Polls by OpinionStage');
16
  define('OPINIONSTAGE_WIDGET_API_KEY', 'wp35e8');
17
  define('OPINIONSTAGE_WIDGET_SHORTCODE', 'socialpoll');
3
  Plugin Name: Social Polls by OpinionStage
4
  Plugin URI: http://www.opinionstage.com
5
  Description: Adds a highly engaging social polling system to your blog. You can easily add a social poll to your blog post/page by clicking the social poll icon in the WordPress post/page text editor.
6
+ Version: 5.6.0
7
  Author: OpinionStage.com
8
  Author URI: http://www.opinionstage.com
9
  */
11
  /* --- Static initializer for Wordpress hooks --- */
12
 
13
  define('OPINIONSTAGE_SERVER_BASE', "www.opinionstage.com"); /* Don't include the protocol, added dynamically */
14
+ define('OPINIONSTAGE_WIDGET_VERSION', '5.6.0');
15
  define('OPINIONSTAGE_WIDGET_PLUGIN_NAME', 'Social Polls by OpinionStage');
16
  define('OPINIONSTAGE_WIDGET_API_KEY', 'wp35e8');
17
  define('OPINIONSTAGE_WIDGET_SHORTCODE', 'socialpoll');
readme.txt CHANGED
@@ -104,6 +104,8 @@ Yes, just post the following syntax into any post/page: [socialpoll ID="xyz"], w
104
  N/A
105
 
106
  == Changelog ==
 
 
107
  = Version 5.5.0 =
108
  *Improvements & fixes on poll reporting statistics
109
  *Improvements & fixes on poll core flows
104
  N/A
105
 
106
  == Changelog ==
107
+ = Version 5.6.0 =
108
+ *Improvements & fixes on poll studio
109
  = Version 5.5.0 =
110
  *Improvements & fixes on poll reporting statistics
111
  *Improvements & fixes on poll core flows