Version Description
N/A
Download this release
Release Info
Developer | yoffegil |
Plugin | Poll, Survey, Quiz, Slideshow, Form, Story & Landing Page |
Version | 12.4.0 |
Comparing to | |
See all releases |
Code changes from version 12.3.0 to 12.4.0
- opinionstage-ajax-functions.php +6 -0
- opinionstage-functions.php +22 -14
- opinionstage-polls.php +2 -2
- opinionstage-utility-functions.php +1 -0
- opinionstage-widget.php +2 -2
- readme.txt +2 -0
- style.css +3 -0
opinionstage-ajax-functions.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
add_action( 'wp_ajax_opinionstage_ajax_toggle_flyout', 'opinionstage_ajax_toggle_flyout');
|
4 |
add_action( 'wp_ajax_opinionstage_ajax_toggle_article_placement', 'opinionstage_ajax_toggle_article_placement');
|
|
|
5 |
|
6 |
function opinionstage_ajax_toggle_flyout() {
|
7 |
$os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
|
@@ -14,4 +15,9 @@ function opinionstage_ajax_toggle_article_placement() {
|
|
14 |
$os_options['article_placement_active'] = $_POST['activate'];
|
15 |
update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
|
16 |
}
|
|
|
|
|
|
|
|
|
|
|
17 |
?>
|
2 |
|
3 |
add_action( 'wp_ajax_opinionstage_ajax_toggle_flyout', 'opinionstage_ajax_toggle_flyout');
|
4 |
add_action( 'wp_ajax_opinionstage_ajax_toggle_article_placement', 'opinionstage_ajax_toggle_article_placement');
|
5 |
+
add_action( 'wp_ajax_opinionstage_ajax_toggle_sidebar_placement', 'opinionstage_ajax_toggle_sidebar_placement');
|
6 |
|
7 |
function opinionstage_ajax_toggle_flyout() {
|
8 |
$os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
|
15 |
$os_options['article_placement_active'] = $_POST['activate'];
|
16 |
update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
|
17 |
}
|
18 |
+
function opinionstage_ajax_toggle_sidebar_placement() {
|
19 |
+
$os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
|
20 |
+
$os_options['sidebar_placement_active'] = $_POST['activate'];
|
21 |
+
update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
|
22 |
+
}
|
23 |
?>
|
opinionstage-functions.php
CHANGED
@@ -16,7 +16,12 @@ function opinionstage_initialize_data() {
|
|
16 |
$os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
|
17 |
$os_options['version'] = OPINIONSTAGE_WIDGET_VERSION;
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
21 |
|
22 |
/**
|
@@ -107,6 +112,10 @@ function opinionstage_add_poll_page() {
|
|
107 |
$('#article-placement-switch').change(function(){
|
108 |
toggleSettingsAjax($(this), "opinionstage_ajax_toggle_article_placement");
|
109 |
});
|
|
|
|
|
|
|
|
|
110 |
});
|
111 |
|
112 |
</script>
|
@@ -144,7 +153,7 @@ function opinionstage_add_poll_page() {
|
|
144 |
</div>
|
145 |
<a href="http://blog.opinionstage.com/fly-out-placements-in-wordpress/" class="question-link" target="_blank">(?)</a>
|
146 |
</div>
|
147 |
-
<div class="onoffswitch
|
148 |
<input type="checkbox" name="fly-out-switch" class="onoffswitch-checkbox" <?php echo($first_time ? "disabled" : "")?> id="fly-out-switch" <?php echo($os_options['fly_out_active'] == 'true' ? "checked" : "") ?>>
|
149 |
<label class="onoffswitch-label" for="fly-out-switch">
|
150 |
<div class="onoffswitch-inner"></div>
|
@@ -162,7 +171,7 @@ function opinionstage_add_poll_page() {
|
|
162 |
</div>
|
163 |
<a href="http://blog.opinionstage.com/article-placements/" class="question-link" target="_blank">(?)</a>
|
164 |
</div>
|
165 |
-
<div class="onoffswitch
|
166 |
<input type="checkbox" name="article-placement-switch" class="onoffswitch-checkbox" <?php echo($first_time ? "disabled" : "")?> id="article-placement-switch" <?php echo($os_options['article_placement_active'] == 'true' ? "checked" : "") ?>>
|
167 |
<label class="onoffswitch-label" for="article-placement-switch">
|
168 |
<div class="onoffswitch-inner"></div>
|
@@ -180,17 +189,16 @@ function opinionstage_add_poll_page() {
|
|
180 |
</div>
|
181 |
<a href="http://blog.opinionstage.com/poll-placements/?o=wp35e8" class="question-link" target="_blank">(?)</a>
|
182 |
</div>
|
183 |
-
<?php
|
184 |
-
<
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
Add sidebar using the <a href="<?php echo $url = get_admin_url('', '', 'admin') . 'widgets.php' ?>">Widgets Menu</a>
|
194 |
</div>
|
195 |
<?php } ?>
|
196 |
</div>
|
16 |
$os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
|
17 |
$os_options['version'] = OPINIONSTAGE_WIDGET_VERSION;
|
18 |
|
19 |
+
// For backward compatibility
|
20 |
+
if (!isset($os_options['sidebar_placement_active'])) {
|
21 |
+
$os_options['sidebar_placement_active'] = 'false';
|
22 |
+
}
|
23 |
+
|
24 |
+
update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
|
25 |
}
|
26 |
|
27 |
/**
|
112 |
$('#article-placement-switch').change(function(){
|
113 |
toggleSettingsAjax($(this), "opinionstage_ajax_toggle_article_placement");
|
114 |
});
|
115 |
+
|
116 |
+
$('#sidebar-placement-switch').change(function(){
|
117 |
+
toggleSettingsAjax($(this), "opinionstage_ajax_toggle_sidebar_placement");
|
118 |
+
});
|
119 |
});
|
120 |
|
121 |
</script>
|
153 |
</div>
|
154 |
<a href="http://blog.opinionstage.com/fly-out-placements-in-wordpress/" class="question-link" target="_blank">(?)</a>
|
155 |
</div>
|
156 |
+
<div class="onoffswitch <?php echo($first_time ? "disabled" : "")?>">
|
157 |
<input type="checkbox" name="fly-out-switch" class="onoffswitch-checkbox" <?php echo($first_time ? "disabled" : "")?> id="fly-out-switch" <?php echo($os_options['fly_out_active'] == 'true' ? "checked" : "") ?>>
|
158 |
<label class="onoffswitch-label" for="fly-out-switch">
|
159 |
<div class="onoffswitch-inner"></div>
|
171 |
</div>
|
172 |
<a href="http://blog.opinionstage.com/article-placements/" class="question-link" target="_blank">(?)</a>
|
173 |
</div>
|
174 |
+
<div class="onoffswitch <?php echo($first_time ? "disabled" : "")?>">
|
175 |
<input type="checkbox" name="article-placement-switch" class="onoffswitch-checkbox" <?php echo($first_time ? "disabled" : "")?> id="article-placement-switch" <?php echo($os_options['article_placement_active'] == 'true' ? "checked" : "") ?>>
|
176 |
<label class="onoffswitch-label" for="article-placement-switch">
|
177 |
<div class="onoffswitch-inner"></div>
|
189 |
</div>
|
190 |
<a href="http://blog.opinionstage.com/poll-placements/?o=wp35e8" class="question-link" target="_blank">(?)</a>
|
191 |
</div>
|
192 |
+
<div class="onoffswitch <?php echo($first_time ? "disabled" : "")?>">
|
193 |
+
<input type="checkbox" name="sidebar-placement-switch" class="onoffswitch-checkbox" <?php echo($first_time ? "disabled" : "")?> id="sidebar-placement-switch" <?php echo($os_options['sidebar_placement_active'] == 'true' ? "checked" : "") ?>>
|
194 |
+
<label class="onoffswitch-label" for="sidebar-placement-switch">
|
195 |
+
<div class="onoffswitch-inner"></div>
|
196 |
+
<div class="onoffswitch-switch"></div>
|
197 |
+
</label>
|
198 |
+
</div>
|
199 |
+
<?php if(!$first_time) {?>
|
200 |
+
<div class="os-long-text">
|
201 |
+
<a href="<?php echo $url = get_admin_url('', '', 'admin') . 'widgets.php' ?>">Conifugre</a> (using the Widgets Menu)
|
|
|
202 |
</div>
|
203 |
<?php } ?>
|
204 |
</div>
|
opinionstage-polls.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Polls by OpinionStage
|
4 |
Plugin URI: http://www.opinionstage.com
|
5 |
Description: Adds a highly engaging social polling system to your site. Easily add polls to any post/page or to your sites sidebar.
|
6 |
-
Version: 12.
|
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', '12.
|
15 |
define('OPINIONSTAGE_WIDGET_PLUGIN_NAME', 'Polls by OpinionStage');
|
16 |
define('OPINIONSTAGE_WIDGET_API_KEY', 'wp35e8');
|
17 |
define('OPINIONSTAGE_OPTIONS_KEY', 'opinionstage_widget');
|
3 |
Plugin Name: Polls by OpinionStage
|
4 |
Plugin URI: http://www.opinionstage.com
|
5 |
Description: Adds a highly engaging social polling system to your site. Easily add polls to any post/page or to your sites sidebar.
|
6 |
+
Version: 12.4.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', '12.4.0');
|
15 |
define('OPINIONSTAGE_WIDGET_PLUGIN_NAME', 'Polls by OpinionStage');
|
16 |
define('OPINIONSTAGE_WIDGET_API_KEY', 'wp35e8');
|
17 |
define('OPINIONSTAGE_OPTIONS_KEY', 'opinionstage_widget');
|
opinionstage-utility-functions.php
CHANGED
@@ -229,6 +229,7 @@ function opinionstage_parse_client_data($raw_data) {
|
|
229 |
'version' => OPINIONSTAGE_WIDGET_VERSION,
|
230 |
'fly_out_active' => 'false',
|
231 |
'article_placement_active' => 'false',
|
|
|
232 |
'token' => $raw_data['token']);
|
233 |
|
234 |
update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
|
229 |
'version' => OPINIONSTAGE_WIDGET_VERSION,
|
230 |
'fly_out_active' => 'false',
|
231 |
'article_placement_active' => 'false',
|
232 |
+
'sidebar_placement_active' => 'false',
|
233 |
'token' => $raw_data['token']);
|
234 |
|
235 |
update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
|
opinionstage-widget.php
CHANGED
@@ -11,9 +11,9 @@
|
|
11 |
$title = @$instance['title'];
|
12 |
$os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
|
13 |
|
14 |
-
if (!empty($title)) echo $before_title . apply_filters('widget_title', $title) . $after_title;
|
15 |
|
16 |
-
if (!empty($os_options["sidebar_placement_id"])) {
|
17 |
echo opinionstage_create_placement_embed_code($os_options["sidebar_placement_id"]);
|
18 |
}
|
19 |
|
11 |
$title = @$instance['title'];
|
12 |
$os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
|
13 |
|
14 |
+
if (!empty($title) && $os_options['sidebar_placement_active'] == 'true') echo $before_title . apply_filters('widget_title', $title) . $after_title;
|
15 |
|
16 |
+
if (!empty($os_options["sidebar_placement_id"]) && $os_options['sidebar_placement_active'] == 'true') {
|
17 |
echo opinionstage_create_placement_embed_code($os_options["sidebar_placement_id"]);
|
18 |
}
|
19 |
|
readme.txt
CHANGED
@@ -123,6 +123,8 @@ We support both regular multiple-sided polls and a special head-to-head poll fla
|
|
123 |
N/A
|
124 |
|
125 |
== Changelog ==
|
|
|
|
|
126 |
= Version 12.3.0 =
|
127 |
* Added Sidebar placement as a widget
|
128 |
= Version 12.2.0 =
|
123 |
N/A
|
124 |
|
125 |
== Changelog ==
|
126 |
+
= Version 12.4.0 =
|
127 |
+
* Added a control switch for the Sidebar placement
|
128 |
= Version 12.3.0 =
|
129 |
* Added Sidebar placement as a widget
|
130 |
= Version 12.2.0 =
|
style.css
CHANGED
@@ -188,6 +188,9 @@ input.onoffswitch-checkbox {
|
|
188 |
-moz-box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.75), 0px -1px 0px rgba(74, 121, 221, 0.2), inset 2px -1px 4px -1px rgba(74, 121, 221, 0.9);
|
189 |
box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.75), 0px -1px 0px rgba(74, 121, 221, 0.2), inset 2px -1px 4px -1px rgba(74, 121, 221, 0.9);
|
190 |
}
|
|
|
|
|
|
|
191 |
.os-sidebar-widget {
|
192 |
overflow: hidden;
|
193 |
margin-bottom: 15px;
|
188 |
-moz-box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.75), 0px -1px 0px rgba(74, 121, 221, 0.2), inset 2px -1px 4px -1px rgba(74, 121, 221, 0.9);
|
189 |
box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.75), 0px -1px 0px rgba(74, 121, 221, 0.2), inset 2px -1px 4px -1px rgba(74, 121, 221, 0.9);
|
190 |
}
|
191 |
+
.os-long-text {
|
192 |
+
display: inline;
|
193 |
+
}
|
194 |
.os-sidebar-widget {
|
195 |
overflow: hidden;
|
196 |
margin-bottom: 15px;
|