Popups for Divi - Version 2.0.1

Version Description

  • Fix urgent problem where the plugin would remove the contents of the page while saving the page in Divi!

Plugin tested with WordPress 5.3.2 and Divi 4.4.0

Download this release

Release Info

Developer stracker.phil
Plugin Icon 128x128 Popups for Divi
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0.0 to 2.0.1

include/class-popups-for-divi-editor.php CHANGED
@@ -329,15 +329,21 @@ class Popups_For_Divi_Editor {
329
  * @since 1.2.0
330
  */
331
  public function et_fb_ajax_save() {
 
 
 
 
 
 
332
  // phpcs:disable
333
  if (
334
- ! isset( $_POST['et_fb_save_nonce'] ) || // input var okay.
335
  ! wp_verify_nonce( $_POST['et_fb_save_nonce'], 'et_fb_save_nonce' )
336
  ) {
337
  return;
338
  }
339
 
340
- $post_id = absint( $_POST['post_id'] ); // input var okay.
341
 
342
  if ( ! et_fb_current_user_can_save( $post_id, $_POST['options']['status'] ) ) {
343
  return;
@@ -486,6 +492,6 @@ class Popups_For_Divi_Editor {
486
  $shortcode_data[ $id ]['attrs'] = $attrs;
487
  }
488
 
489
- $_POST['modules'] = wp_json_encode( $shortcode_data );
490
  }
491
  }
329
  * @since 1.2.0
330
  */
331
  public function et_fb_ajax_save() {
332
+ /**
333
+ * We disable phpcs for the following block, so we can use the identical
334
+ * code that is used inside the Divi theme.
335
+ *
336
+ * @see et_fb_ajax_save() in themes/Divi/includes/builder/functions.php
337
+ */
338
  // phpcs:disable
339
  if (
340
+ ! isset( $_POST['et_fb_save_nonce'] ) ||
341
  ! wp_verify_nonce( $_POST['et_fb_save_nonce'], 'et_fb_save_nonce' )
342
  ) {
343
  return;
344
  }
345
 
346
+ $post_id = absint( $_POST['post_id'] );
347
 
348
  if ( ! et_fb_current_user_can_save( $post_id, $_POST['options']['status'] ) ) {
349
  return;
492
  $shortcode_data[ $id ]['attrs'] = $attrs;
493
  }
494
 
495
+ $_POST['modules'] = addslashes( wp_json_encode( $shortcode_data ) );
496
  }
497
  }
plugin.php CHANGED
@@ -12,7 +12,7 @@
12
  * Author: Philipp Stracker
13
  * Author URI: https://philippstracker.com/
14
  * Created: 30.12.2017
15
- * Version: 2.0.0
16
  * License: GPLv2 or later
17
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
18
  * Text Domain: divi-popup
@@ -39,7 +39,7 @@ define( 'DIVI_POPUP_PLUGIN', plugin_basename( __FILE__ ) );
39
  /**
40
  * A new version value will force refresh of CSS and JS files for all users.
41
  */
42
- define( 'DIVI_POPUP_VERSION', '2.0.0' );
43
 
44
  add_action(
45
  'plugins_loaded',
12
  * Author: Philipp Stracker
13
  * Author URI: https://philippstracker.com/
14
  * Created: 30.12.2017
15
+ * Version: 2.0.1
16
  * License: GPLv2 or later
17
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
18
  * Text Domain: divi-popup
39
  /**
40
  * A new version value will force refresh of CSS and JS files for all users.
41
  */
42
+ define( 'DIVI_POPUP_VERSION', '2.0.1' );
43
 
44
  add_action(
45
  'plugins_loaded',
readme.txt CHANGED
@@ -173,6 +173,11 @@ When you need additional features, then please have a look at our the Premium pl
173
 
174
  == Changelog ==
175
 
 
 
 
 
 
176
  = 2.0.0 =
177
  * Add a brand new Tab to the Visual Builder that allows you to configure all popup details using Divi! No more class names 🥳
178
  * Fix JS API integration for IE 11
@@ -180,8 +185,6 @@ When you need additional features, then please have a look at our the Premium pl
180
  = 1.7.2 =
181
  * Fix positioning of full-height Popups for all users/devices
182
 
183
- Plugin tested with WordPress 5.3.2 and Divi 4.2
184
-
185
  = 1.7.1 =
186
  * Fix scroll bars in Popups that are taller than the screen height
187
  * Fix position of full-height popups that were displayed too far up on the screen
173
 
174
  == Changelog ==
175
 
176
+ = 2.0.1 =
177
+ * Fix urgent problem where the plugin would remove the contents of the page while saving the page in Divi! 😳
178
+
179
+ Plugin tested with WordPress 5.3.2 and Divi 4.4.0
180
+
181
  = 2.0.0 =
182
  * Add a brand new Tab to the Visual Builder that allows you to configure all popup details using Divi! No more class names 🥳
183
  * Fix JS API integration for IE 11
185
  = 1.7.2 =
186
  * Fix positioning of full-height Popups for all users/devices
187
 
 
 
188
  = 1.7.1 =
189
  * Fix scroll bars in Popups that are taller than the screen height
190
  * Fix position of full-height popups that were displayed too far up on the screen