Changeset 2358313
- Timestamp:
- 08/12/2020 07:21:11 AM (6 years ago)
- Location:
- google-analytics-opt-out/trunk
- Files:
-
- 3 edited
-
google-analytics-opt-out.php (modified) (1 diff)
-
inc/shortcodes.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
google-analytics-opt-out/trunk/google-analytics-opt-out.php
r2261745 r2358313 4 4 Plugin URI: https://wp-buddy.com/products/plugins/google-analytics-opt-out 5 5 Description: Provides an Opt-Out functionality for Google Analytics 6 Version: 2.3. 26 Version: 2.3.3 7 7 Author: WP-Buddy 8 8 Author URI: https://wp-buddy.com -
google-analytics-opt-out/trunk/inc/shortcodes.php
r1634286 r2358313 25 25 * Adds the shortcodes 26 26 * 27 * @return void 27 28 * @since 1.0 28 * @return void29 29 */ 30 30 function gaoop_init_shortcodes() { … … 40 40 * Creating the shortcode content 41 41 * 42 * @param array $atts42 * @param array $atts 43 43 * @param string $content 44 44 * 45 * @return string 45 46 * @since 1.0 46 47 * 47 * @return string48 48 */ 49 49 function gaoop_shortcode( $atts, $content = '' ) { … … 68 68 * Close the banner button shortcode. 69 69 * 70 * @param array $atts70 * @param array $atts 71 71 * @param string $content 72 72 * @param string $name 73 73 * 74 * @return string 74 75 * @since 1.4.0 75 *76 * @return string77 76 */ 78 77 function gaoop_shortcode_close( $atts, $content, $name ) { 79 78 80 79 if ( empty( $content ) ) { 81 $content = __( ' OK', 'google-analytics-opt-out' );80 $content = __( 'Close Opt-Out Banner', 'google-analytics-opt-out' ); 82 81 } 83 82 84 return sprintf( '<a href="#" class="gaoop-close-link">%s</a>', $content ); 83 ob_start(); 84 ?> 85 <script> 86 (function () { 87 var links = document.querySelectorAll('.gaoop-close-link'); 88 89 for (var i = 0; i < links.length; i++) { 90 links[i].addEventListener('click', function (e) { 91 e.preventDefault(); 92 var elm = document.querySelector('#gaoop_checkbox'); 93 if (elm.checked === false) { 94 elm.click(); 95 } 96 }) 97 } 98 }()); 99 </script> 100 <?php 101 102 return sprintf( '<a href="#" class="gaoop-close-link">%s</a>%s', $content, ob_get_clean() ); 85 103 } 86 104 -
google-analytics-opt-out/trunk/readme.txt
r2261745 r2358313 3 3 Donate link: https://wp-buddy.com/products/plugins/google-analytics-opt-out/ 4 4 Tags: google analytics opt-out, monster insights, gdpr, dsgvo 5 Version: 2.3. 26 Stable tag: 2.3. 25 Version: 2.3.3 6 Stable tag: 2.3.3 7 7 Requires at least: 4.8.0 8 Tested up to: 5. 48 Tested up to: 5.5 9 9 Requires PHP: 5.6.0 10 10 License: GPLv2 … … 42 42 43 43 == Changelog == 44 45 = 2.3.3 = 46 * Fixed: [google_analytics_optout_close] shortcode did not close the popup 44 47 45 48 = 2.3.2 =
Note: See TracChangeset
for help on using the changeset viewer.