Popups by OptinMonster – Best WordPress Lead Generation Plugin - Version 1.1.5.9

Version Description

  • Added the async attribute to the OptinMonster API script output for improved performance.
  • Fixed a bug that caused the debugging report to not properly grab shortcodes.
  • Added helper to remove faulty admin scripts from the OptinMonster settings area that would cause things to fail in some cases.
Download this release

Release Info

Developer griffinjt
Plugin Icon 128x128 Popups by OptinMonster – Best WordPress Lead Generation Plugin
Version 1.1.5.9
Comparing to
See all releases

Code changes from version 1.1.5.8 to 1.1.5.9

Files changed (4) hide show
  1. OMAPI/Menu.php +22 -1
  2. OMAPI/Output.php +2 -2
  3. optin-monster-wp-api.php +2 -2
  4. readme.txt +5 -0
OMAPI/Menu.php CHANGED
@@ -152,6 +152,7 @@ class OMAPI_Menu {
152
  add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
153
  add_filter( 'admin_footer_text', array( $this, 'footer' ) );
154
  add_action( 'in_admin_header', array( $this, 'output_plugin_screen_banner') );
 
155
 
156
  }
157
 
@@ -206,6 +207,26 @@ class OMAPI_Menu {
206
 
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  /**
210
  * Combine Support data together to pass into localization
211
  *
@@ -256,7 +277,7 @@ class OMAPI_Menu {
256
  'Categories' => get_post_meta( $optin->ID, '_omapi_categories', true ),
257
  'Taxonomies' => get_post_meta( $optin->ID, '_omapi_taxonomies', true ),
258
  'Template types to Show on' => get_post_meta( $optin->ID, '_omapi_show', true ),
259
- 'Shortcodes Synced and Recognized' => get_post_meta( $optin->ID, '_omapi_shortecode', true ),
260
  );
261
  }
262
  }
152
  add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
153
  add_filter( 'admin_footer_text', array( $this, 'footer' ) );
154
  add_action( 'in_admin_header', array( $this, 'output_plugin_screen_banner') );
155
+ add_action( 'admin_enqueue_scripts', array( $this, 'fix_plugin_js_conflicts'), 100 );
156
 
157
  }
158
 
207
 
208
  }
209
 
210
+ /**
211
+ * Deque specific scripts that cause conflicts on settings page
212
+ *
213
+ * @since 1.1.5.9
214
+ */
215
+ public function fix_plugin_js_conflicts(){
216
+
217
+ // Get current screen.
218
+ $screen = get_current_screen();
219
+
220
+ // Bail if we're not on the OptinMonster Settings screen.
221
+ if ( isset( $screen->id ) && 'toplevel_page_optin-monster-api-settings' !== $screen->id ) {
222
+ return;
223
+ }
224
+
225
+ // Dequeue scripts that might cause our settings not to work properly.
226
+ wp_dequeue_script( 'optimizely_config' );
227
+
228
+ }
229
+
230
  /**
231
  * Combine Support data together to pass into localization
232
  *
277
  'Categories' => get_post_meta( $optin->ID, '_omapi_categories', true ),
278
  'Taxonomies' => get_post_meta( $optin->ID, '_omapi_taxonomies', true ),
279
  'Template types to Show on' => get_post_meta( $optin->ID, '_omapi_show', true ),
280
+ 'Shortcodes Synced and Recognized' => get_post_meta( $optin->ID, '_omapi_shortcode', true ) ? htmlspecialchars_decode( get_post_meta( $optin->ID, '_omapi_shortcode_output', true ) ) : 'None recognized',
281
  );
282
  }
283
  }
OMAPI/Output.php CHANGED
@@ -144,7 +144,7 @@ class OMAPI_Output {
144
  }
145
 
146
  // Adjust the output to add our custom script ID.
147
- return str_replace( ' src', ' data-cfasync="false" id="omapi-script" src', $tag );
148
 
149
  }
150
 
@@ -164,7 +164,7 @@ class OMAPI_Output {
164
  }
165
 
166
  // Adjust the URL to add our custom script ID.
167
- return "$url' id='omapi-script";
168
 
169
  }
170
 
144
  }
145
 
146
  // Adjust the output to add our custom script ID.
147
+ return str_replace( ' src', ' data-cfasync="false" id="omapi-script" async="async" src', $tag );
148
 
149
  }
150
 
164
  }
165
 
166
  // Adjust the URL to add our custom script ID.
167
+ return "$url' async='async' id='omapi-script";
168
 
169
  }
170
 
optin-monster-wp-api.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: OptinMonster API plugin to connect your WordPress site to your OptinMonster forms.
6
  * Author: Thomas Griffin
7
  * Author URI: https://thomasgriffin.io
8
- * Version: 1.1.5.8
9
  * Text Domain: optin-monster-api
10
  * Domain Path: languages
11
  *
@@ -60,7 +60,7 @@ class OMAPI {
60
  *
61
  * @var string
62
  */
63
- public $version = '1.1.5.8';
64
 
65
  /**
66
  * The name of the plugin.
5
  * Description: OptinMonster API plugin to connect your WordPress site to your OptinMonster forms.
6
  * Author: Thomas Griffin
7
  * Author URI: https://thomasgriffin.io
8
+ * Version: 1.1.5.9
9
  * Text Domain: optin-monster-api
10
  * Domain Path: languages
11
  *
60
  *
61
  * @var string
62
  */
63
+ public $version = '1.1.5.9';
64
 
65
  /**
66
  * The name of the plugin.
readme.txt CHANGED
@@ -160,6 +160,11 @@ OptinMonster is the <a href="http://optinmonster.com" rel="friend" title="OptinM
160
 
161
  == Changelog ==
162
 
 
 
 
 
 
163
  = 1.1.5.8 =
164
  * Fixed bug that caused the MailPoet integration to fail in some scenarios.
165
 
160
 
161
  == Changelog ==
162
 
163
+ = 1.1.5.9 =
164
+ * Added the async attribute to the OptinMonster API script output for improved performance.
165
+ * Fixed a bug that caused the debugging report to not properly grab shortcodes.
166
+ * Added helper to remove faulty admin scripts from the OptinMonster settings area that would cause things to fail in some cases.
167
+
168
  = 1.1.5.8 =
169
  * Fixed bug that caused the MailPoet integration to fail in some scenarios.
170