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

Version Description

  • better AJAX handling
Download this release

Release Info

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

Code changes from version 19.4.1 to 19.4.2

admin/deactivate-feedback.php CHANGED
@@ -18,4 +18,4 @@ function add_deactivate_feedback_form() {
18
  include 'views/deactivate-feedback-form.php';
19
  }
20
 
21
- ?>
18
  include 'views/deactivate-feedback-form.php';
19
  }
20
 
21
+ ?>
includes/opinionstage-functions.php CHANGED
@@ -9,21 +9,14 @@ defined( 'ABSPATH' ) or die();
9
  * Initialize the plugin
10
  */
11
  function opinionstage_init() {
12
- opinionstage_initialize_data();
13
- }
14
-
15
- /**
16
- * Initialiaze the data options
17
- */
18
- function opinionstage_initialize_data() {
19
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
20
  $os_options['version'] = OPINIONSTAGE_WIDGET_VERSION;
21
-
22
  // For backward compatibility
23
- if (!isset($os_options['sidebar_placement_active'])) {
24
  $os_options['sidebar_placement_active'] = 'false';
25
  }
26
-
27
  update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
28
  }
29
 
9
  * Initialize the plugin
10
  */
11
  function opinionstage_init() {
 
 
 
 
 
 
 
12
  $os_options = (array) get_option(OPINIONSTAGE_OPTIONS_KEY);
13
  $os_options['version'] = OPINIONSTAGE_WIDGET_VERSION;
14
+
15
  // For backward compatibility
16
+ if ( !isset($os_options['sidebar_placement_active']) ) {
17
  $os_options['sidebar_placement_active'] = 'false';
18
  }
19
+
20
  update_option(OPINIONSTAGE_OPTIONS_KEY, $os_options);
21
  }
22
 
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Poll, Survey, Quiz, Slideshow, Form & Story Article
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.4.1
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.4.1');
28
 
29
  define('OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage');
30
 
@@ -56,22 +56,22 @@ require_once( plugin_dir_path( __FILE__ ).'includes/opinionstage-functions.php'
56
  if (opinionstage_check_plugin_available('opinionstage_popup')) {
57
  add_action('admin_notices', 'opinionstage_other_plugin_installed_warning');
58
  } else {
 
 
 
59
 
60
- if( (function_exists('wp_doing_ajax') && wp_doing_ajax()) || (defined('DOING_AJAX')) ){
61
- // AJAX running, don't include anything.
62
- }else{
63
- require_once( plugin_dir_path( __FILE__ ).'includes/opinionstage-utility-functions.php' );
64
- require_once( plugin_dir_path( __FILE__ ).'includes/opinionstage-article-placement-functions.php' );
65
- require_once( plugin_dir_path( __FILE__ ).'includes/opinionstage-sidebar-widget.php' );
66
-
67
  if ( is_admin() ) {
68
  require( plugin_dir_path( __FILE__ ).'admin/init.php' );
69
  } else {
70
  require( plugin_dir_path( __FILE__ ).'public/init.php' );
71
  }
72
-
73
- add_action('widgets_init', 'opinionstage_init_widget');
74
- add_action('plugins_loaded', 'opinionstage_init');
75
  }
 
 
 
76
  }
77
  ?>
3
  Plugin Name: Poll, Survey, Quiz, Slideshow, Form & Story Article
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.4.2
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.4.2');
28
 
29
  define('OPINIONSTAGE_TEXT_DOMAIN', 'social-polls-by-opinionstage');
30
 
56
  if (opinionstage_check_plugin_available('opinionstage_popup')) {
57
  add_action('admin_notices', 'opinionstage_other_plugin_installed_warning');
58
  } else {
59
+ require_once( plugin_dir_path( __FILE__ ).'includes/opinionstage-utility-functions.php' );
60
+ require_once( plugin_dir_path( __FILE__ ).'includes/opinionstage-article-placement-functions.php' );
61
+ require_once( plugin_dir_path( __FILE__ ).'includes/opinionstage-sidebar-widget.php' );
62
 
63
+ if ( (function_exists('wp_doing_ajax') && wp_doing_ajax()) || (defined('DOING_AJAX')) ) {
64
+ // AJAX running, include public for widgets rendering via ajax.
65
+ require( plugin_dir_path( __FILE__ ).'public/init.php' );
66
+ } else {
 
 
 
67
  if ( is_admin() ) {
68
  require( plugin_dir_path( __FILE__ ).'admin/init.php' );
69
  } else {
70
  require( plugin_dir_path( __FILE__ ).'public/init.php' );
71
  }
 
 
 
72
  }
73
+
74
+ add_action('widgets_init', 'opinionstage_init_widget');
75
+ add_action('plugins_loaded', 'opinionstage_init');
76
  }
77
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.opinionstage.com
4
  Tags: poll, quiz, survey, form, slideshow, story, article
5
  Requires at least: 2.8
6
  Tested up to: 4.9
7
- Stable tag: 19.4.1
8
 
9
  Easily add polls, surveys, quizzes, slideshows, forms & story article to your website. 
10
 
@@ -169,6 +169,8 @@ Yes, all content created with Opinion Stage is fully responsive, and designed to
169
  N/A
170
 
171
  == Changelog ==
 
 
172
  = 19.4.1 =
173
  * fix deactivation issue
174
  = 19.4.0 =
4
  Tags: poll, quiz, survey, form, slideshow, story, article
5
  Requires at least: 2.8
6
  Tested up to: 4.9
7
+ Stable tag: 19.4.2
8
 
9
  Easily add polls, surveys, quizzes, slideshows, forms & story article to your website. 
10
 
169
  N/A
170
 
171
  == Changelog ==
172
+ = 19.4.2 =
173
+ * better AJAX handling
174
  = 19.4.1 =
175
  * fix deactivation issue
176
  = 19.4.0 =