Changeset 3151441
- Timestamp:
- 09/13/2024 02:37:55 PM (19 months ago)
- Location:
- exs-modal-widget-area
- Files:
-
- 6 edited
- 6 copied
-
tags/1.0.2 (copied) (copied from exs-modal-widget-area/trunk)
-
tags/1.0.2/LICENSE.txt (copied) (copied from exs-modal-widget-area/trunk/LICENSE.txt)
-
tags/1.0.2/assets (copied) (copied from exs-modal-widget-area/trunk/assets)
-
tags/1.0.2/assets/exs-modal-widget-area.css (modified) (2 diffs)
-
tags/1.0.2/exs-modal-widget-area.php (copied) (copied from exs-modal-widget-area/trunk/exs-modal-widget-area.php) (3 diffs)
-
tags/1.0.2/inc (copied) (copied from exs-modal-widget-area/trunk/inc)
-
tags/1.0.2/inc/view.php (modified) (2 diffs)
-
tags/1.0.2/readme.txt (copied) (copied from exs-modal-widget-area/trunk/readme.txt) (3 diffs)
-
trunk/assets/exs-modal-widget-area.css (modified) (2 diffs)
-
trunk/exs-modal-widget-area.php (modified) (3 diffs)
-
trunk/inc/view.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
exs-modal-widget-area/tags/1.0.2/assets/exs-modal-widget-area.css
r3119242 r3151441 52 52 } 53 53 54 #exs-modal-widget-area-widget { 55 max-height:100vh; 56 overflow-y:auto; 57 } 58 54 59 #exs-modal-widget-area-close-button-label, 55 60 #exs-modal-widget-area-outside-close-button-label { … … 68 73 cursor: pointer; 69 74 position: absolute; 75 z-index: 2; 70 76 top: var(--exs-modal-widget-area-close-button-offset, -8px); 71 77 right: var(--exs-modal-widget-area-close-button-offset, -8px); -
exs-modal-widget-area/tags/1.0.2/exs-modal-widget-area.php
r3119242 r3151441 4 4 Plugin Name: ExS Modal Widget Area 5 5 Description: Adds a Modal Widget area that you can toggle in a different ways 6 Version: 1.0. 16 Version: 1.0.2 7 7 Author: ExS 8 8 Author URI: https://exsthemewp.com/ … … 15 15 } 16 16 17 define( 'EXS_MODAL_WIDGET_AREA_VERSION', '1.0. 1' );17 define( 'EXS_MODAL_WIDGET_AREA_VERSION', '1.0.2' ); 18 18 define( 'EXS_MODAL_WIDGET_AREA_PATH', plugin_dir_path( __FILE__ ) ); 19 19 … … 66 66 } 67 67 68 if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) { 69 return; 70 } 71 68 72 wp_enqueue_style( 'exs-modal-widget-area', plugin_dir_url( __FILE__ ) . 'assets/exs-modal-widget-area.css', array(), EXS_MODAL_WIDGET_AREA_VERSION ); 69 73 } -
exs-modal-widget-area/tags/1.0.2/inc/view.php
r3119242 r3151441 56 56 <?php endif; ?> 57 57 <div id="exs-modal-widget-area-content"> 58 <?php 59 dynamic_sidebar( 'exs-modal-widget-area' ); 60 if ( $close_button ) : ?> 58 <div id="exs-modal-widget-area-widget"> 59 <?php dynamic_sidebar( 'exs-modal-widget-area' ); ?> 60 </div> 61 <?php if ( $close_button ) : ?> 61 62 <button id="exs-modal-widget-area-close-button" class="exs-modal-widget-area-close-button"> 62 63 <span id="exs-modal-widget-area-close-button-label"><?php echo esc_html( $close_button_label ); ?></span> 63 64 <span id="exs-modal-widget-area-close-button-icon"> 64 <span></span>65 </span>65 <span></span> 66 </span> 66 67 </button> 67 68 <?php endif; ?> … … 72 73 73 74 <script id="exs-modal-widget-area-init-js"> 74 'use strict'; 75 (function (d){ 76 d.addEventListener('DOMContentLoaded', function() { 77 var modal = d.getElementById('exs-modal-widget-area-wrap'); 78 if (!modal) { 79 return; 80 } 81 <?php if ( $cookie_id ) : ?> 82 function setCookie(val) { 83 var date = new Date(); 84 date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); 85 d.cookie = '<?php echo esc_js( sanitize_title( $cookie_id ) ); ?>=' + val + ';expires=' + date.toUTCString() + ';path=/'; 86 } 87 <?php endif; ?> 88 var closeBtns = d.querySelectorAll('<?php echo esc_js( $deactivate_selector ); ?>'); 89 closeBtns.forEach(function (btn) { 90 btn.addEventListener('click', function () { 91 modal.classList.remove('exs-active'); 75 'use strict'; 76 (function (d){ 77 d.addEventListener('DOMContentLoaded', function() { 78 var modal = d.getElementById('exs-modal-widget-area-wrap'); 79 if (!modal) { 80 return; 81 } 92 82 <?php if ( $cookie_id ) : ?> 93 setCookie(Date.now()); 83 function setCookie(val) { 84 var date = new Date(); 85 date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); 86 d.cookie = '<?php echo esc_js( sanitize_title( $cookie_id ) ); ?>=' + val + ';expires=' + date.toUTCString() + ';path=/'; 87 } 94 88 <?php endif; ?> 89 var closeBtns = d.querySelectorAll('<?php echo esc_js( $deactivate_selector ); ?>'); 90 closeBtns.forEach(function (btn) { 91 btn.addEventListener('click', function () { 92 modal.classList.remove('exs-active'); 93 <?php if ( $cookie_id ) : ?> 94 setCookie(Date.now()); 95 <?php endif; ?> 96 }); 97 }); 98 <?php if ( $close_on_esc ) : ?> 99 d.addEventListener('keyup', function (e) { 100 if (e.key === 'Escape' && modal.classList.contains('exs-active')) { 101 modal.classList.remove('exs-active'); 102 <?php if ( $cookie_id ) : ?> 103 setCookie(Date.now()); 104 <?php endif; ?> 105 } 106 }); 107 <?php 108 endif; //$close_on_esc 109 if ( $activate_selector ) : 110 ?> 111 var openBtns = d.querySelectorAll('<?php echo esc_js( $activate_selector ); ?>'); 112 openBtns.forEach(function (btn) { 113 btn.addEventListener('click', function () { 114 modal.classList.add('exs-active'); 115 }); 116 }); 117 <?php 118 endif; //$activate_selector 119 if ( ! is_null( $timeout ) ) : 120 ?> 121 setTimeout(function (){ 122 modal.classList.add('exs-active'); 123 }, <?php echo (int) esc_html( $timeout ); ?>); 124 <?php 125 endif; //$timeout 126 ?> 95 127 }); 96 }); 97 <?php if ( $close_on_esc ) : ?> 98 d.addEventListener('keyup', function (e) { 99 if (e.key === 'Escape' && modal.classList.contains('exs-active')) { 100 modal.classList.remove('exs-active'); 101 <?php if ( $cookie_id ) : ?> 102 setCookie(Date.now()); 103 <?php endif; ?> 104 } 105 }); 106 <?php 107 endif; //$close_on_esc 108 if ( $activate_selector ) : 109 ?> 110 var openBtns = d.querySelectorAll('<?php echo esc_js( $activate_selector ); ?>'); 111 openBtns.forEach(function (btn) { 112 btn.addEventListener('click', function () { 113 modal.classList.add('exs-active'); 114 }); 115 }); 116 <?php 117 endif; //$activate_selector 118 if ( ! is_null( $timeout ) ) : 119 ?> 120 setTimeout(function (){ 121 modal.classList.add('exs-active'); 122 }, <?php echo (int) esc_html( $timeout ); ?>); 123 <?php 124 endif; //$timeout 125 ?> 126 }); 127 })(document); 128 })(document); 128 129 </script> -
exs-modal-widget-area/tags/1.0.2/readme.txt
r3119242 r3151441 5 5 Tested up to: 6.6 6 6 Requires PHP: 5.6 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 26 26 - Show only once setting 27 27 - Fully customizable width, paddings, colors, close button, background, custom close selector, custom open selector etc. 28 29 https://www.youtube.com/watch?v=f_IAI-VqRdU 28 30 29 31 == Frequently Asked Questions == … … 79 81 == Changelog == 80 82 83 = 1.0.2 = 84 * September, 13, 2024 85 * High content height for modal window fixed. 86 * Widgets admin screen - preview for legacy widgets fixed. 87 81 88 = 1.0.1 = 82 89 * July, 9, 2024 -
exs-modal-widget-area/trunk/assets/exs-modal-widget-area.css
r3119242 r3151441 52 52 } 53 53 54 #exs-modal-widget-area-widget { 55 max-height:100vh; 56 overflow-y:auto; 57 } 58 54 59 #exs-modal-widget-area-close-button-label, 55 60 #exs-modal-widget-area-outside-close-button-label { … … 68 73 cursor: pointer; 69 74 position: absolute; 75 z-index: 2; 70 76 top: var(--exs-modal-widget-area-close-button-offset, -8px); 71 77 right: var(--exs-modal-widget-area-close-button-offset, -8px); -
exs-modal-widget-area/trunk/exs-modal-widget-area.php
r3119242 r3151441 4 4 Plugin Name: ExS Modal Widget Area 5 5 Description: Adds a Modal Widget area that you can toggle in a different ways 6 Version: 1.0. 16 Version: 1.0.2 7 7 Author: ExS 8 8 Author URI: https://exsthemewp.com/ … … 15 15 } 16 16 17 define( 'EXS_MODAL_WIDGET_AREA_VERSION', '1.0. 1' );17 define( 'EXS_MODAL_WIDGET_AREA_VERSION', '1.0.2' ); 18 18 define( 'EXS_MODAL_WIDGET_AREA_PATH', plugin_dir_path( __FILE__ ) ); 19 19 … … 66 66 } 67 67 68 if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) { 69 return; 70 } 71 68 72 wp_enqueue_style( 'exs-modal-widget-area', plugin_dir_url( __FILE__ ) . 'assets/exs-modal-widget-area.css', array(), EXS_MODAL_WIDGET_AREA_VERSION ); 69 73 } -
exs-modal-widget-area/trunk/inc/view.php
r3119242 r3151441 56 56 <?php endif; ?> 57 57 <div id="exs-modal-widget-area-content"> 58 <?php 59 dynamic_sidebar( 'exs-modal-widget-area' ); 60 if ( $close_button ) : ?> 58 <div id="exs-modal-widget-area-widget"> 59 <?php dynamic_sidebar( 'exs-modal-widget-area' ); ?> 60 </div> 61 <?php if ( $close_button ) : ?> 61 62 <button id="exs-modal-widget-area-close-button" class="exs-modal-widget-area-close-button"> 62 63 <span id="exs-modal-widget-area-close-button-label"><?php echo esc_html( $close_button_label ); ?></span> 63 64 <span id="exs-modal-widget-area-close-button-icon"> 64 <span></span>65 </span>65 <span></span> 66 </span> 66 67 </button> 67 68 <?php endif; ?> … … 72 73 73 74 <script id="exs-modal-widget-area-init-js"> 74 'use strict'; 75 (function (d){ 76 d.addEventListener('DOMContentLoaded', function() { 77 var modal = d.getElementById('exs-modal-widget-area-wrap'); 78 if (!modal) { 79 return; 80 } 81 <?php if ( $cookie_id ) : ?> 82 function setCookie(val) { 83 var date = new Date(); 84 date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); 85 d.cookie = '<?php echo esc_js( sanitize_title( $cookie_id ) ); ?>=' + val + ';expires=' + date.toUTCString() + ';path=/'; 86 } 87 <?php endif; ?> 88 var closeBtns = d.querySelectorAll('<?php echo esc_js( $deactivate_selector ); ?>'); 89 closeBtns.forEach(function (btn) { 90 btn.addEventListener('click', function () { 91 modal.classList.remove('exs-active'); 75 'use strict'; 76 (function (d){ 77 d.addEventListener('DOMContentLoaded', function() { 78 var modal = d.getElementById('exs-modal-widget-area-wrap'); 79 if (!modal) { 80 return; 81 } 92 82 <?php if ( $cookie_id ) : ?> 93 setCookie(Date.now()); 83 function setCookie(val) { 84 var date = new Date(); 85 date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); 86 d.cookie = '<?php echo esc_js( sanitize_title( $cookie_id ) ); ?>=' + val + ';expires=' + date.toUTCString() + ';path=/'; 87 } 94 88 <?php endif; ?> 89 var closeBtns = d.querySelectorAll('<?php echo esc_js( $deactivate_selector ); ?>'); 90 closeBtns.forEach(function (btn) { 91 btn.addEventListener('click', function () { 92 modal.classList.remove('exs-active'); 93 <?php if ( $cookie_id ) : ?> 94 setCookie(Date.now()); 95 <?php endif; ?> 96 }); 97 }); 98 <?php if ( $close_on_esc ) : ?> 99 d.addEventListener('keyup', function (e) { 100 if (e.key === 'Escape' && modal.classList.contains('exs-active')) { 101 modal.classList.remove('exs-active'); 102 <?php if ( $cookie_id ) : ?> 103 setCookie(Date.now()); 104 <?php endif; ?> 105 } 106 }); 107 <?php 108 endif; //$close_on_esc 109 if ( $activate_selector ) : 110 ?> 111 var openBtns = d.querySelectorAll('<?php echo esc_js( $activate_selector ); ?>'); 112 openBtns.forEach(function (btn) { 113 btn.addEventListener('click', function () { 114 modal.classList.add('exs-active'); 115 }); 116 }); 117 <?php 118 endif; //$activate_selector 119 if ( ! is_null( $timeout ) ) : 120 ?> 121 setTimeout(function (){ 122 modal.classList.add('exs-active'); 123 }, <?php echo (int) esc_html( $timeout ); ?>); 124 <?php 125 endif; //$timeout 126 ?> 95 127 }); 96 }); 97 <?php if ( $close_on_esc ) : ?> 98 d.addEventListener('keyup', function (e) { 99 if (e.key === 'Escape' && modal.classList.contains('exs-active')) { 100 modal.classList.remove('exs-active'); 101 <?php if ( $cookie_id ) : ?> 102 setCookie(Date.now()); 103 <?php endif; ?> 104 } 105 }); 106 <?php 107 endif; //$close_on_esc 108 if ( $activate_selector ) : 109 ?> 110 var openBtns = d.querySelectorAll('<?php echo esc_js( $activate_selector ); ?>'); 111 openBtns.forEach(function (btn) { 112 btn.addEventListener('click', function () { 113 modal.classList.add('exs-active'); 114 }); 115 }); 116 <?php 117 endif; //$activate_selector 118 if ( ! is_null( $timeout ) ) : 119 ?> 120 setTimeout(function (){ 121 modal.classList.add('exs-active'); 122 }, <?php echo (int) esc_html( $timeout ); ?>); 123 <?php 124 endif; //$timeout 125 ?> 126 }); 127 })(document); 128 })(document); 128 129 </script> -
exs-modal-widget-area/trunk/readme.txt
r3119242 r3151441 5 5 Tested up to: 6.6 6 6 Requires PHP: 5.6 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 26 26 - Show only once setting 27 27 - Fully customizable width, paddings, colors, close button, background, custom close selector, custom open selector etc. 28 29 https://www.youtube.com/watch?v=f_IAI-VqRdU 28 30 29 31 == Frequently Asked Questions == … … 79 81 == Changelog == 80 82 83 = 1.0.2 = 84 * September, 13, 2024 85 * High content height for modal window fixed. 86 * Widgets admin screen - preview for legacy widgets fixed. 87 81 88 = 1.0.1 = 82 89 * July, 9, 2024
Note: See TracChangeset
for help on using the changeset viewer.