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

Version Description

  • fix placements links
Download this release

Release Info

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

Code changes from version 19.6.28 to 19.6.29

admin/views/my_placements.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  // block direct access to plugin PHP files:
3
  defined( 'ABSPATH' ) or die();
 
4
  ?>
5
  <div id="opinionstage-content">
6
  <div class="opinionstage-header-wrapper">
@@ -59,10 +60,17 @@ defined( 'ABSPATH' ) or die();
59
  <div class="example">Add a content popup to your site</div>
60
  </div>
61
  <div class="opinionstage-section-cell opinionstage-btns-cell">
62
- <a href="<?php echo opinionstage_flyout_edit_url('content'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-content <?php echo( $os_client_logged_in ? '' : 'disabled' ) ?>' target="_blank">SELECT ITEM</a>
63
- <a href="<?php echo opinionstage_flyout_edit_url('settings'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-settings <?php echo( $os_client_logged_in ? '' : 'disabled' ) ?>' target="_blank">
 
64
  <div class="os-icon-plugin icon-os-common-settings"></div>
65
  </a>
 
 
 
 
 
 
66
  </div>
67
  </div>
68
  <div class="opinionstage-section-raw">
@@ -84,10 +92,17 @@ defined( 'ABSPATH' ) or die();
84
  <div class="example">Add a content section to all posts</div>
85
  </div>
86
  <div class="opinionstage-section-cell opinionstage-btns-cell">
87
- <a href="<?php echo opinionstage_article_placement_edit_url('content'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-content <?php echo( $os_client_logged_in ? '' : 'disabled' ) ?>' target="_blank">SELECT ITEM</a>
88
- <a href="<?php echo opinionstage_article_placement_edit_url('settings'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-settings <?php echo( $os_client_logged_in ? '' : 'disabled' ) ?>' target="_blank">
 
 
 
 
 
 
89
  <div class="os-icon-plugin icon-os-common-settings"></div>
90
  </a>
 
91
  </div>
92
  </div>
93
  <div class="opinionstage-section-raw">
@@ -117,18 +132,25 @@ defined( 'ABSPATH' ) or die();
117
  </div>
118
  </div>
119
  <div class="opinionstage-section-cell opinionstage-btns-cell">
120
- <a href="<?php echo opinionstage_sidebar_placement_edit_url('content'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-content <?php echo( $os_client_logged_in ? '' : 'disabled' ) ?>' target="_blank">SELECT ITEM</a>
121
- <a href="<?php echo opinionstage_sidebar_placement_edit_url('settings'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-settings <?php echo( $os_client_logged_in ? '' : 'disabled' ) ?>' target="_blank">
 
 
 
 
 
 
122
  <div class="os-icon-plugin icon-os-common-settings"></div>
123
  </a>
 
124
  </div>
125
  </div>
126
  </div>
127
  </div>
128
  </div>
129
  </div>
130
- <?php if ( !$os_client_logged_in ) {
131
- echo '<div id="overlay"></div>';
132
- } ?>
133
  </div>
134
  </div>
1
  <?php
2
  // block direct access to plugin PHP files:
3
  defined( 'ABSPATH' ) or die();
4
+
5
  ?>
6
  <div id="opinionstage-content">
7
  <div class="opinionstage-header-wrapper">
60
  <div class="example">Add a content popup to your site</div>
61
  </div>
62
  <div class="opinionstage-section-cell opinionstage-btns-cell">
63
+ <?php if ( $os_client_logged_in ) {?>
64
+ <a href="<?php echo opinionstage_flyout_edit_url('content'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-content' target="_blank">SELECT ITEM</a>
65
+ <a href="<?php echo opinionstage_flyout_edit_url('settings'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-settings' target="_blank">
66
  <div class="os-icon-plugin icon-os-common-settings"></div>
67
  </a>
68
+ <?php } else { ?>
69
+ <a class='opinionstage-blue-bordered-btn opinionstage-edit-content disabled'>SELECT ITEM</a>
70
+ <a class='opinionstage-blue-bordered-btn opinionstage-edit-settings disabled'>
71
+ <div class="os-icon-plugin icon-os-common-settings"></div>
72
+ </a>
73
+ <?php } ?>
74
  </div>
75
  </div>
76
  <div class="opinionstage-section-raw">
92
  <div class="example">Add a content section to all posts</div>
93
  </div>
94
  <div class="opinionstage-section-cell opinionstage-btns-cell">
95
+ <?php if ( $os_client_logged_in ) {?>
96
+ <a href="<?php echo opinionstage_article_placement_edit_url('content'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-content' target="_blank">SELECT ITEM</a>
97
+ <a href="<?php echo opinionstage_article_placement_edit_url('settings'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-settings' target="_blank">
98
+ <div class="os-icon-plugin icon-os-common-settings"></div>
99
+ </a>
100
+ <?php } else { ?>
101
+ <a class='opinionstage-blue-bordered-btn opinionstage-edit-content disabled'>SELECT ITEM</a>
102
+ <a class='opinionstage-blue-bordered-btn opinionstage-edit-settings disabled'>
103
  <div class="os-icon-plugin icon-os-common-settings"></div>
104
  </a>
105
+ <?php } ?>
106
  </div>
107
  </div>
108
  <div class="opinionstage-section-raw">
132
  </div>
133
  </div>
134
  <div class="opinionstage-section-cell opinionstage-btns-cell">
135
+ <?php if ( $os_client_logged_in ) {?>
136
+ <a href="<?php echo opinionstage_sidebar_placement_edit_url('content'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-content' target="_blank">SELECT ITEM</a>
137
+ <a href="<?php echo opinionstage_sidebar_placement_edit_url('settings'); ?>" class='opinionstage-blue-bordered-btn opinionstage-edit-settings' target="_blank">
138
+ <div class="os-icon-plugin icon-os-common-settings"></div>
139
+ </a>
140
+ <?php } else { ?>
141
+ <a class='opinionstage-blue-bordered-btn opinionstage-edit-content disabled'>SELECT ITEM</a>
142
+ <a class='opinionstage-blue-bordered-btn opinionstage-edit-settings disabled'>
143
  <div class="os-icon-plugin icon-os-common-settings"></div>
144
  </a>
145
+ <?php } ?>
146
  </div>
147
  </div>
148
  </div>
149
  </div>
150
  </div>
151
  </div>
152
+ <?php if ( !$os_client_logged_in ) { ?>
153
+ <div id="overlay"></div>
154
+ <?php } ?>
155
  </div>
156
  </div>
includes/opinionstage-utility-functions.php CHANGED
@@ -16,7 +16,7 @@ function opinionstage_link($caption, $path, $css_class = '', $query_data = array
16
 
17
  return "<a href='{$link}' target='_blank' class='{$css_class}'>{$caption}</a>";
18
  }
19
- function opinionstage_template_link($caption, $path, $css_class = '') {
20
  $query_data['utm_source'] = OPINIONSTAGE_UTM_SOURCE;
21
  $query_data['utm_campaign'] = OPINIONSTAGE_UTM_CAMPAIGN;
22
  $query_data['utm_medium'] = OPINIONSTAGE_UTM_MEDIUM;
@@ -71,9 +71,6 @@ function opinionstage_asset_path() {
71
  */
72
  function opinionstage_flyout_edit_url($tab) {
73
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
74
- if (empty($os_options["uid"])) {
75
- return OPINIONSTAGE_SERVER_BASE.'/registrations/new';
76
- }
77
  return OPINIONSTAGE_SERVER_BASE.'/containers/'.$os_options['fly_id'].'/edit?selected_tab='.$tab;
78
  }
79
 
@@ -83,9 +80,6 @@ function opinionstage_flyout_edit_url($tab) {
83
  */
84
  function opinionstage_article_placement_edit_url($tab) {
85
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
86
- if (empty($os_options["uid"])) {
87
- return OPINIONSTAGE_SERVER_BASE.'/registrations/new';
88
- }
89
  return OPINIONSTAGE_SERVER_BASE.'/containers/'.$os_options['article_placement_id'].'/edit?selected_tab='.$tab;
90
  }
91
  /**
@@ -93,9 +87,6 @@ function opinionstage_article_placement_edit_url($tab) {
93
  */
94
  function opinionstage_sidebar_placement_edit_url($tab) {
95
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
96
- if (empty($os_options["uid"])) {
97
- return OPINIONSTAGE_SERVER_BASE.'/registrations/new';
98
- }
99
  return OPINIONSTAGE_SERVER_BASE.'/containers/'.$os_options['sidebar_placement_id'].'/edit?selected_tab='.$tab;
100
  }
101
 
@@ -176,19 +167,13 @@ function opinionstage_add_modal_opening_to_url_params($url) {
176
  return '//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '?modal_is_open=true';
177
  }
178
  }
179
- /**
180
- * Generates a link to Opinion Stage that requires registration
181
- */
182
- function opinionstage_logged_in_link($text, $link) {
183
- return opinionstage_link($text, 'registrations/new', '', array('return_to' => $link));
184
- }
185
  /**
186
  * Take the received data and parse it
187
- *
188
  * Returns the newly updated widgets parameters.
189
  */
190
  function opinionstage_parse_client_data($raw_data) {
191
- $os_options = array('uid' => $raw_data['uid'],
192
  'email' => $raw_data['email'],
193
  'fly_id' => $raw_data['fly_id'],
194
  'article_placement_id' => $raw_data['article_placement_id'],
@@ -201,12 +186,12 @@ function opinionstage_parse_client_data($raw_data) {
201
  $valid_ids = preg_match("/^[0-9]+$/", $raw_data['fly_id']) && preg_match("/^[0-9]+$/", $raw_data['article_placement_id']) && preg_match("/^[0-9]+$/", $raw_data['sidebar_placement_id']);
202
  if ($valid_ids) {
203
  update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
204
- }
205
  }
206
  function opinionstage_custom_content_popup_callback_url(){
207
  $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
208
- $url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
209
  $adminUrlForOs = admin_url( 'admin.php?page="'.OPINIONSTAGE_CONTENT_LOGIN_CALLBACK_SLUG.'"&return_path=', $protocol );
210
  return $adminUrlForOs.urlencode($url);
211
  }
212
- ?>
16
 
17
  return "<a href='{$link}' target='_blank' class='{$css_class}'>{$caption}</a>";
18
  }
19
+ function opinionstage_template_link($caption, $path, $css_class = '') {
20
  $query_data['utm_source'] = OPINIONSTAGE_UTM_SOURCE;
21
  $query_data['utm_campaign'] = OPINIONSTAGE_UTM_CAMPAIGN;
22
  $query_data['utm_medium'] = OPINIONSTAGE_UTM_MEDIUM;
71
  */
72
  function opinionstage_flyout_edit_url($tab) {
73
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
 
 
 
74
  return OPINIONSTAGE_SERVER_BASE.'/containers/'.$os_options['fly_id'].'/edit?selected_tab='.$tab;
75
  }
76
 
80
  */
81
  function opinionstage_article_placement_edit_url($tab) {
82
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
 
 
 
83
  return OPINIONSTAGE_SERVER_BASE.'/containers/'.$os_options['article_placement_id'].'/edit?selected_tab='.$tab;
84
  }
85
  /**
87
  */
88
  function opinionstage_sidebar_placement_edit_url($tab) {
89
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
 
 
 
90
  return OPINIONSTAGE_SERVER_BASE.'/containers/'.$os_options['sidebar_placement_id'].'/edit?selected_tab='.$tab;
91
  }
92
 
167
  return '//' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . '?modal_is_open=true';
168
  }
169
  }
 
 
 
 
 
 
170
  /**
171
  * Take the received data and parse it
172
+ *
173
  * Returns the newly updated widgets parameters.
174
  */
175
  function opinionstage_parse_client_data($raw_data) {
176
+ $os_options = array('uid' => $raw_data['uid'],
177
  'email' => $raw_data['email'],
178
  'fly_id' => $raw_data['fly_id'],
179
  'article_placement_id' => $raw_data['article_placement_id'],
186
  $valid_ids = preg_match("/^[0-9]+$/", $raw_data['fly_id']) && preg_match("/^[0-9]+$/", $raw_data['article_placement_id']) && preg_match("/^[0-9]+$/", $raw_data['sidebar_placement_id']);
187
  if ($valid_ids) {
188
  update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
189
+ }
190
  }
191
  function opinionstage_custom_content_popup_callback_url(){
192
  $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
193
+ $url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
194
  $adminUrlForOs = admin_url( 'admin.php?page="'.OPINIONSTAGE_CONTENT_LOGIN_CALLBACK_SLUG.'"&return_path=', $protocol );
195
  return $adminUrlForOs.urlencode($url);
196
  }
197
+ ?>
opinionstage-polls.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage (Deprecated)
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
- Version: 19.6.28
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage (Deprecated)
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
+ Version: 19.6.29
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
- Version: 19.6.28
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
@@ -24,7 +24,7 @@ if ( defined('WP_DEBUG') && true === WP_DEBUG ) {
24
  }
25
  }
26
 
27
- define('OPINIONSTAGE_WIDGET_VERSION', '19.6.28');
28
 
29
  define('OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage');
30
 
@@ -136,4 +136,4 @@ function opinionstage_fail_wp_version() {
136
  $message = sprintf( esc_html__( 'Poll, Survey, Form & Quiz Maker by OpinionStage requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT RUNNING.', 'opinionstage' ), '4.7' );
137
  $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
138
  echo wp_kses_post( $html_message );
139
- }
3
  Plugin Name: Poll, Survey, Form & Quiz Maker by OpinionStage
4
  Plugin URI: https://www.opinionstage.com
5
  Description: Add a highly engaging poll, survey, quiz or contact form builder to your site. You can add the poll, survey, quiz or form to any post/page or to the sidebar.
6
+ Version: 19.6.29
7
  Author: OpinionStage.com
8
  Author URI: https://www.opinionstage.com
9
  Text Domain: social-polls-by-opinionstage
24
  }
25
  }
26
 
27
+ define('OPINIONSTAGE_WIDGET_VERSION', '19.6.29');
28
 
29
  define('OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage');
30
 
136
  $message = sprintf( esc_html__( 'Poll, Survey, Form & Quiz Maker by OpinionStage requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT RUNNING.', 'opinionstage' ), '4.7' );
137
  $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
138
  echo wp_kses_post( $html_message );
139
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.opinionstage.com
4
  Tags: poll, quiz, survey, form
5
  Requires at least: 2.8
6
  Tested up to: 5.2.2
7
- Stable tag: 19.6.28
8
  Requires PHP: 5.2
9
 
10
  Add Polls, Surveys or Quizzes to your Wordpress site. Create from scratch or based on templates. Get started in seconds.
@@ -116,6 +116,8 @@ Opinion Stage makes it easy for you to comply with the GDPR regulation. For more
116
  N/A
117
 
118
  == Changelog ==
 
 
119
  = 19.6.28 =
120
  * fix message display
121
  = 19.6.27 =
4
  Tags: poll, quiz, survey, form
5
  Requires at least: 2.8
6
  Tested up to: 5.2.2
7
+ Stable tag: 19.6.29
8
  Requires PHP: 5.2
9
 
10
  Add Polls, Surveys or Quizzes to your Wordpress site. Create from scratch or based on templates. Get started in seconds.
116
  N/A
117
 
118
  == Changelog ==
119
+ = 19.6.29 =
120
+ * fix placements links
121
  = 19.6.28 =
122
  * fix message display
123
  = 19.6.27 =