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

Version Description

N/A

Download this release

Release Info

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

Code changes from version 14.0.0 to 14.1.0

opinionstage-polls.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Poll & Quiz Tools by OpinionStage
4
  Plugin URI: http://www.opinionstage.com
5
  Description: Adds highly engaging polls & quizzes to your site. Easily add polls & quizzes to any post/page or to your site sidebar.
6
- Version: 14.0.0
7
  Author: OpinionStage.com
8
  Author URI: http://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
@@ -12,7 +12,7 @@ Text Domain: social-polls-by-opinionstage
12
  /* --- Static initializer for Wordpress hooks --- */
13
 
14
  define('OPINIONSTAGE_SERVER_BASE', "www.opinionstage.com"); /* Don't include the protocol, added dynamically */
15
- define('OPINIONSTAGE_WIDGET_VERSION', '14.0.0');
16
  define('OPINIONSTAGE_WIDGET_PLUGIN_NAME', 'Poll & Quiz Tools by OpinionStage');
17
  define('OPINIONSTAGE_WIDGET_API_KEY', 'wp35e8');
18
  define('OPINIONSTAGE_OPTIONS_KEY', 'opinionstage_widget');
3
  Plugin Name: Poll & Quiz Tools by OpinionStage
4
  Plugin URI: http://www.opinionstage.com
5
  Description: Adds highly engaging polls & quizzes to your site. Easily add polls & quizzes to any post/page or to your site sidebar.
6
+ Version: 14.1.0
7
  Author: OpinionStage.com
8
  Author URI: http://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
12
  /* --- Static initializer for Wordpress hooks --- */
13
 
14
  define('OPINIONSTAGE_SERVER_BASE', "www.opinionstage.com"); /* Don't include the protocol, added dynamically */
15
+ define('OPINIONSTAGE_WIDGET_VERSION', '14.1.0');
16
  define('OPINIONSTAGE_WIDGET_PLUGIN_NAME', 'Poll & Quiz Tools by OpinionStage');
17
  define('OPINIONSTAGE_WIDGET_API_KEY', 'wp35e8');
18
  define('OPINIONSTAGE_OPTIONS_KEY', 'opinionstage_widget');
opinionstage-utility-functions.php CHANGED
@@ -32,9 +32,10 @@ function opinionstage_add_poll_or_set($atts) {
32
  *
33
  */
34
  function opinionstage_add_widget($atts) {
35
- extract(shortcode_atts(array('path' => 0), $atts));
36
- if(!is_feed()) {
37
- return opinionstage_create_widget_embed_code($path);
 
38
  } else {
39
  return __('Note: There is a widget embedded within this post, please visit the site to participate in this post\'s widget.', OPINIONSTAGE_WIDGET_UNIQUE_ID);
40
  }
@@ -102,21 +103,16 @@ function opinionstage_create_legacy_embed_code($id, $type) {
102
  * Arguments:
103
  * @param path - Path of the widget
104
  */
105
- function opinionstage_create_widget_embed_code($path) {
106
 
107
  // Only present if path is available
108
  if (isset($path) && !empty($path)) {
109
  // Load embed code from the cache if possible
110
- $is_homepage = is_home();
111
- $transient_name = 'embed_code' . $path . '_' . ($is_homepage ? "1" : "0");
112
  $code = get_transient($transient_name);
113
  if ( false === $code || '' === $code ) {
114
- $embed_code_url = "http://".OPINIONSTAGE_SERVER_BASE."/api/widgets" . $path . "/embed_code.json";
115
 
116
- if ($is_homepage) {
117
- $embed_code_url .= "?h=1";
118
- }
119
-
120
  extract(opinionstage_get_contents($embed_code_url));
121
  $data = json_decode($raw_data);
122
  if ($success) {
32
  *
33
  */
34
  function opinionstage_add_widget($atts) {
35
+ extract(shortcode_atts(array('path' => 0, 'comments' => 'true', 'sharing' => 'true', 'recommendations' => 'true'), $atts));
36
+
37
+ if(!is_feed()) {
38
+ return opinionstage_create_widget_embed_code($path, $comments, $sharing, $recommendations);
39
  } else {
40
  return __('Note: There is a widget embedded within this post, please visit the site to participate in this post\'s widget.', OPINIONSTAGE_WIDGET_UNIQUE_ID);
41
  }
103
  * Arguments:
104
  * @param path - Path of the widget
105
  */
106
+ function opinionstage_create_widget_embed_code($path, $comments, $sharing, $recommendations) {
107
 
108
  // Only present if path is available
109
  if (isset($path) && !empty($path)) {
110
  // Load embed code from the cache if possible
111
+ $transient_name = 'embed_code' . $path . '.' . $comments . '.' . $sharing . $recommendations;
 
112
  $code = get_transient($transient_name);
113
  if ( false === $code || '' === $code ) {
114
+ $embed_code_url = "http://".OPINIONSTAGE_SERVER_BASE."/api/widgets" . $path . "/embed_code.json?comments=".$comments."&sharing=".$sharing."&recommendations=".$recommendations;
115
 
 
 
 
 
116
  extract(opinionstage_get_contents($embed_code_url));
117
  $data = json_decode($raw_data);
118
  if ($success) {
readme.txt CHANGED
@@ -169,6 +169,8 @@ Yes - our editors hand-pick the top polls & quizzes. You can browse the Opinion
169
  N/A
170
 
171
  == Changelog ==
 
 
172
  = Version 14.0.0 =
173
  * Improved polls & quizzes creation help file
174
  * Various small issues
169
  N/A
170
 
171
  == Changelog ==
172
+ = Version 14.1.0 =
173
+ * Added support for disabling FB comments, sharing buttons and recommendations for Trivia quiz and Personality quiz via the widget shortcode
174
  = Version 14.0.0 =
175
  * Improved polls & quizzes creation help file
176
  * Various small issues