PopBox For Elementor - Version 1.0.2

Version Description

  • FIXED: Left window shift when modal is open on some themes - Fixes: https://wordpress.org/support/topic/bug-with-a-moving-button-and-extra-gap/.
  • NEW: Added option to switch close button position.
  • NEW: Added option to increase/decrease close button size.
  • NEW: Added option for close button padding - see ineditor description on limitations.
  • TWEAK: Moved close button color control to the Style tab under Modal content.
Download this release

Release Info

Developer norewp
Plugin Icon wp plugin PopBox For Elementor
Version 1.0.2
Comparing to
See all releases

Code changes from version 1.0.1 to 1.0.2

Files changed (4) hide show
  1. css/popup.css +11 -1
  2. modal-for-elementor.php +3 -3
  3. readme.txt +8 -1
  4. widgets/popup.php +56 -10
css/popup.css CHANGED
@@ -36,7 +36,17 @@
36
  body.modal-open .elementor-widget-wrap {
37
  z-index: auto;
38
  }
39
-
 
 
 
 
 
 
 
 
 
 
40
  .modal-popup {
41
  cursor: pointer;
42
  }
36
  body.modal-open .elementor-widget-wrap {
37
  z-index: auto;
38
  }
39
+ /* This should probably be addressed by the affected themes! */
40
+ html {
41
+ -ms-overflow-style: scrollbar;
42
+ overflow: hidden;
43
+ height: 100%;
44
+ }
45
+ body {
46
+ overflow: auto;
47
+ height: 100%;
48
+ }
49
+ /* End affected themes comment! */
50
  .modal-popup {
51
  cursor: pointer;
52
  }
modal-for-elementor.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: PopBox For Elementor
4
  * Description: Create content-rich popboxes for your site using the power of Elementor Page Builder
5
- * Version: 1.0.1
6
  * Author: Zulfikar Nore
7
  * Author URI: https://designsbynore.com/
8
  * Plugin URI: https://designsbynore.com/popups/popbox/
@@ -12,7 +12,7 @@
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
 
15
- define( 'MODAL_ELEMENTOR_VERSION', '1.0.0' );
16
 
17
  define( 'MODAL_ELEMENTOR__FILE__', __FILE__ );
18
  define( 'MODAL_ELEMENTOR_PLUGIN_BASE', plugin_basename( MODAL_ELEMENTOR__FILE__ ) );
@@ -150,4 +150,4 @@ function create_popup_post_type() {
150
  )
151
  );
152
  add_post_type_support( 'elementor-popup', 'elementor' );
153
- }
2
  /**
3
  * Plugin Name: PopBox For Elementor
4
  * Description: Create content-rich popboxes for your site using the power of Elementor Page Builder
5
+ * Version: 1.0.2
6
  * Author: Zulfikar Nore
7
  * Author URI: https://designsbynore.com/
8
  * Plugin URI: https://designsbynore.com/popups/popbox/
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
 
15
+ define( 'MODAL_ELEMENTOR_VERSION', '1.0.2' );
16
 
17
  define( 'MODAL_ELEMENTOR__FILE__', __FILE__ );
18
  define( 'MODAL_ELEMENTOR_PLUGIN_BASE', plugin_basename( MODAL_ELEMENTOR__FILE__ ) );
150
  )
151
  );
152
  add_post_type_support( 'elementor-popup', 'elementor' );
153
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/NoreMarketing/5
4
  Tags: PopBox, Modal, Popup, Elementor
5
  Requires at least: 4.4
6
  Tested up to: 4.9
7
- Stable tag: 1.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -32,6 +32,13 @@ Brief video on setup (Sorry for the lack of sound): https://youtu.be/M3B9aLLTXKY
32
  Go to settings > permalinks and click save. (you need to do that in order to register the popup post types.)
33
 
34
  == Changelog ==
 
 
 
 
 
 
 
35
  = 1.0.1 =
36
  * FIXED: Bug with non Elementor authored content not showing in the PopBox - Fixes: https://wordpress.org/support/topic/not-working-video/
37
 
4
  Tags: PopBox, Modal, Popup, Elementor
5
  Requires at least: 4.4
6
  Tested up to: 4.9
7
+ Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
32
  Go to settings > permalinks and click save. (you need to do that in order to register the popup post types.)
33
 
34
  == Changelog ==
35
+ = 1.0.2 =
36
+ * FIXED: Left window shift when modal is open on some themes - Fixes: https://wordpress.org/support/topic/bug-with-a-moving-button-and-extra-gap/.
37
+ * NEW: Added option to switch close button position.
38
+ * NEW: Added option to increase/decrease close button size.
39
+ * NEW: Added option for close button padding - see ineditor description on limitations.
40
+ * TWEAK: Moved close button color control to the Style tab under Modal content.
41
+
42
  = 1.0.1 =
43
  * FIXED: Bug with non Elementor authored content not showing in the PopBox - Fixes: https://wordpress.org/support/topic/not-working-video/
44
 
widgets/popup.php CHANGED
@@ -203,28 +203,61 @@ class ElementorModal extends Widget_Base {
203
  );
204
 
205
  $this->add_control(
206
- 'Close Button',
207
  [
208
  'label' => __( 'Show Close Button', 'modal-for-elementor' ),
209
  'type' => Controls_Manager::SWITCHER,
210
  'label_off' => __( 'Hide', 'modal-for-elementor' ),
211
  'label_on' => __( 'Show', 'modal-for-elementor' ),
212
  'default' => 'yes',
213
- 'selectors' => [
214
  '{{WRAPPER}} button.close' => 'display: inherit;',
215
  ],
216
  ]
217
  );
218
-
219
- $this->add_control(
220
- 'button_close_text_color',
221
  [
222
- 'label' => __( 'Close Button Color', 'modal-for-elementor' ),
223
- 'type' => Controls_Manager::COLOR,
224
- 'default' => '',
 
 
225
  'selectors' => [
226
- '{{WRAPPER}} button.close' => 'color: {{VALUE}};',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  ],
 
228
  ]
229
  );
230
 
@@ -466,6 +499,18 @@ class ElementorModal extends Widget_Base {
466
  'selector' => '{{WRAPPER}} .modal-content',
467
  ]
468
  );
 
 
 
 
 
 
 
 
 
 
 
 
469
 
470
  $this->add_responsive_control(
471
  'modal_content_width',
@@ -598,8 +643,9 @@ class ElementorModal extends Widget_Base {
598
  $this->add_render_attribute( 'button', 'class', 'modal-popup' );
599
  $this->add_render_attribute( 'content-wrapper', 'class', 'elementor-button-content-wrapper' );
600
  $this->add_render_attribute( 'icon-align', 'class', 'elementor-align-icon-' . $settings['icon_align'] );
601
- $this->add_render_attribute( 'icon-align', 'class', 'elementor-button-icon' );
602
  ?>
 
603
  <!-- Popup trigger button -->
604
  <div <?php echo $this->get_render_attribute_string( 'wrapper' ); ?>>
605
  <a <?php echo $this->get_render_attribute_string( 'button' ); ?>>
203
  );
204
 
205
  $this->add_control(
206
+ 'close_button',
207
  [
208
  'label' => __( 'Show Close Button', 'modal-for-elementor' ),
209
  'type' => Controls_Manager::SWITCHER,
210
  'label_off' => __( 'Hide', 'modal-for-elementor' ),
211
  'label_on' => __( 'Show', 'modal-for-elementor' ),
212
  'default' => 'yes',
213
+ 'selectors' => [
214
  '{{WRAPPER}} button.close' => 'display: inherit;',
215
  ],
216
  ]
217
  );
218
+
219
+ $this->add_control(
220
+ 'close_button_pos',
221
  [
222
+ 'label' => __( 'Switch Button Position', 'modal-for-elementor' ),
223
+ 'type' => Controls_Manager::SWITCHER,
224
+ 'label_off' => __( 'Right', 'modal-for-elementor' ),
225
+ 'label_on' => __( 'Left', 'modal-for-elementor' ),
226
+ 'default' => '',
227
  'selectors' => [
228
+ '{{WRAPPER}} button.close' => 'left: 0;',
229
+ ],
230
+ ]
231
+ );
232
+
233
+ $this->add_control(
234
+ 'close_size',
235
+ [
236
+ 'label' => __( 'Size', 'modal-for-elementor' ),
237
+ 'type' => Controls_Manager::SLIDER,
238
+ 'range' => [
239
+ 'px' => [
240
+ 'min' => 6,
241
+ 'max' => 300,
242
+ ],
243
+ ],
244
+ 'selectors' => [
245
+ '{{WRAPPER}} button.close' => 'font-size: {{SIZE}}{{UNIT}};',
246
+ ],
247
+ ]
248
+ );
249
+
250
+ $this->add_control(
251
+ 'close_padding',
252
+ [
253
+ 'label' => __( 'Close Padding', 'modal-for-elementor' ),
254
+ 'description' => __( 'Please note that padding bottom has no effect - Left/Right padding will depend on button position!', 'modal-for-elementor' ),
255
+ 'type' => Controls_Manager::DIMENSIONS,
256
+ 'size_units' => [ 'px', 'em', '%' ],
257
+ 'selectors' => [
258
+ '{{WRAPPER}} button.close' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
259
  ],
260
+ 'separator' => 'before',
261
  ]
262
  );
263
 
499
  'selector' => '{{WRAPPER}} .modal-content',
500
  ]
501
  );
502
+
503
+ $this->add_control(
504
+ 'button_close_text_color',
505
+ [
506
+ 'label' => __( 'Close Button Color', 'modal-for-elementor' ),
507
+ 'type' => Controls_Manager::COLOR,
508
+ 'default' => '',
509
+ 'selectors' => [
510
+ '{{WRAPPER}} button.close' => 'color: {{VALUE}};',
511
+ ],
512
+ ]
513
+ );
514
 
515
  $this->add_responsive_control(
516
  'modal_content_width',
643
  $this->add_render_attribute( 'button', 'class', 'modal-popup' );
644
  $this->add_render_attribute( 'content-wrapper', 'class', 'elementor-button-content-wrapper' );
645
  $this->add_render_attribute( 'icon-align', 'class', 'elementor-align-icon-' . $settings['icon_align'] );
646
+ $this->add_render_attribute( 'icon-align', 'class', 'elementor-button-icon' );
647
  ?>
648
+ <!-- PopBox:popboxRender -->
649
  <!-- Popup trigger button -->
650
  <div <?php echo $this->get_render_attribute_string( 'wrapper' ); ?>>
651
  <a <?php echo $this->get_render_attribute_string( 'button' ); ?>>