Version Description
- Using SVG icons instead of images.
- Added new filters:
gaoop_info_icon_html
andgaoop_close_icon_html
. - Removed dependency from jQuery.
- Removed deferred loading of JS file because it makes no sense when script is in the footer.
Download this release
Release Info
Developer | wp-buddy |
Plugin | Google Analytics Opt-Out |
Version | 2.3.0 |
Comparing to | |
See all releases |
Code changes from version 2.2.6 to 2.3.0
- google-analytics-opt-out.php +2 -2
- inc/frontend.php +90 -27
- inc/scripts.php +15 -25
- js/frontend.js +73 -103
- readme.txt +9 -3
google-analytics-opt-out.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: Google Analytics Opt-Out
|
4 |
Plugin URI: https://wp-buddy.com/products/plugins/google-analytics-opt-out
|
5 |
Description: Provides an Opt-Out functionality for Google Analytics
|
6 |
-
Version: 2.
|
7 |
Author: WP-Buddy
|
8 |
Author URI: https://wp-buddy.com
|
9 |
License: GPL2
|
10 |
Text Domain: google-analytics-opt-out
|
11 |
Domain Path: /languages/
|
12 |
|
13 |
-
Copyright
|
14 |
|
15 |
This program is free software; you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License, version 2, as
|
3 |
Plugin Name: Google Analytics Opt-Out
|
4 |
Plugin URI: https://wp-buddy.com/products/plugins/google-analytics-opt-out
|
5 |
Description: Provides an Opt-Out functionality for Google Analytics
|
6 |
+
Version: 2.3.0
|
7 |
Author: WP-Buddy
|
8 |
Author URI: https://wp-buddy.com
|
9 |
License: GPL2
|
10 |
Text Domain: google-analytics-opt-out
|
11 |
Domain Path: /languages/
|
12 |
|
13 |
+
Copyright 2020 WP-Buddy (email : info@wp-buddy.com)
|
14 |
|
15 |
This program is free software; you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License, version 2, as
|
inc/frontend.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
/**
|
4 |
* Adds a hidden div to the footer
|
5 |
*
|
6 |
-
* @since 1.0
|
7 |
* @return void
|
|
|
8 |
*/
|
9 |
function gaoop_footer() {
|
10 |
|
@@ -16,11 +16,56 @@ function gaoop_footer() {
|
|
16 |
if ( empty( $opt_out_text ) ) {
|
17 |
return;
|
18 |
}
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
}
|
26 |
|
@@ -53,8 +98,8 @@ add_filter( 'gaoop_optout_text', 'do_shortcode', 15 );
|
|
53 |
/**
|
54 |
* Adds the custom styles to the header
|
55 |
*
|
56 |
-
* @since 1.0
|
57 |
* @return void
|
|
|
58 |
*/
|
59 |
function gaoop_wp_head() {
|
60 |
|
@@ -72,8 +117,34 @@ function gaoop_wp_head() {
|
|
72 |
'-moz-box-shadow' => $box_shadow,
|
73 |
'box-shadow' => $box_shadow,
|
74 |
'background-color' => '#0E90D2',
|
75 |
-
'padding' =>
|
76 |
'margin' => 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
),
|
78 |
'.gaoop a' => array(
|
79 |
'color' => '#67C2F0',
|
@@ -84,15 +155,19 @@ function gaoop_wp_head() {
|
|
84 |
'text-decoration' => 'underline',
|
85 |
),
|
86 |
'.gaoop-info-icon' => array(
|
87 |
-
'
|
88 |
-
'
|
89 |
-
'
|
90 |
-
|
91 |
-
|
92 |
-
'
|
93 |
-
'
|
|
|
|
|
|
|
94 |
),
|
95 |
'.gaoop-close-icon' => array(
|
|
|
96 |
'position' => 'relative',
|
97 |
'opacity' => '0.5',
|
98 |
'ms-filter' => '"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"',
|
@@ -104,7 +179,6 @@ function gaoop_wp_head() {
|
|
104 |
'text-align' => 'center',
|
105 |
'vertical-align' => 'top',
|
106 |
'display' => 'inline-block',
|
107 |
-
'width' => '5%',
|
108 |
),
|
109 |
'.gaoop-close-icon:hover' => array(
|
110 |
'z-index' => '1',
|
@@ -117,16 +191,6 @@ function gaoop_wp_head() {
|
|
117 |
'.gaoop_closed .gaoop-opt-out-link, .gaoop_closed .gaoop-close-icon' => array(
|
118 |
'display' => 'none',
|
119 |
),
|
120 |
-
'.gaoop_closed' => array(
|
121 |
-
'width' => '55px',
|
122 |
-
'right' => 0,
|
123 |
-
'left' => 'auto',
|
124 |
-
'opacity' => '0.5',
|
125 |
-
'ms-filter' => '"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"',
|
126 |
-
'filter' => 'alpha(opacity=50)',
|
127 |
-
'-moz-opacity' => '0.5',
|
128 |
-
'-khtml-opacity' => '0.5',
|
129 |
-
),
|
130 |
'.gaoop_closed:hover' => array(
|
131 |
'opacity' => '1',
|
132 |
'ms-filter' => '"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"',
|
@@ -142,7 +206,6 @@ function gaoop_wp_head() {
|
|
142 |
),
|
143 |
'.gaoop-opt-out-content' => array(
|
144 |
'display' => 'inline-block',
|
145 |
-
'width' => '90%',
|
146 |
'vertical-align' => 'top',
|
147 |
),
|
148 |
);
|
3 |
/**
|
4 |
* Adds a hidden div to the footer
|
5 |
*
|
|
|
6 |
* @return void
|
7 |
+
* @since 1.0
|
8 |
*/
|
9 |
function gaoop_footer() {
|
10 |
|
16 |
if ( empty( $opt_out_text ) ) {
|
17 |
return;
|
18 |
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* INFO icon
|
22 |
+
*/
|
23 |
+
$info_icon_url = apply_filters( 'gaoop_info_icon', '' );
|
24 |
+
|
25 |
+
if ( empty( $info_icon_url ) ) {
|
26 |
+
$info_icon = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="info-circle" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"></path></svg>';
|
27 |
+
} else {
|
28 |
+
$info_icon = sprintf(
|
29 |
+
'<img src="%s" alt="%s" />',
|
30 |
+
esc_url( $info_icon_url ),
|
31 |
+
esc_html( __( 'Close', 'google-analytics-opt-out' ) )
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
$info_icon = apply_filters( 'gaoop_info_icon_html', $info_icon );
|
36 |
+
|
37 |
+
/**
|
38 |
+
* CLOSE icon
|
39 |
+
*/
|
40 |
+
$close_icon_url = apply_filters( 'gaoop_close_icon', '' );
|
41 |
+
|
42 |
+
if ( empty( $close_icon_url ) ) {
|
43 |
+
$close_icon = '<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="times" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512"><path fill="currentColor" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"></path></svg>';
|
44 |
+
} else {
|
45 |
+
$close_icon = sprintf(
|
46 |
+
'<img src="%s" alt="%s" />',
|
47 |
+
esc_url( $close_icon_url ),
|
48 |
+
esc_html( __( 'Close', 'google-analytics-opt-out' ) )
|
49 |
+
);
|
50 |
+
}
|
51 |
+
|
52 |
+
$close_icon = apply_filters( 'gaoop_close_icon_html', $close_icon );
|
53 |
+
|
54 |
+
printf(
|
55 |
+
'<input type="checkbox" class="gaoop-checkbox" id="gaoop_checkbox" />'
|
56 |
+
. '<div data-gaoop_ua="%s" data-gaoop_hide_after_close="%d" class="gaoop gaoop-hidden">'
|
57 |
+
. '<label for="gaoop_checkbox" class="gaoop-info-icon" title="%s">%s</label>'
|
58 |
+
. '<div class="gaoop-opt-out-content">%s</div>'
|
59 |
+
. '<label for="gaoop_checkbox" class="gaoop-close-icon" title="%s">%s</label>'
|
60 |
+
. '</div>',
|
61 |
+
gaoop_get_ua_code(),
|
62 |
+
intval( get_option( 'gaoop_hide', 0 ) ),
|
63 |
+
esc_attr( __( 'Google Analytics Opt-Out Information', 'google-analytics-opt-out' ) ),
|
64 |
+
$info_icon,
|
65 |
+
$opt_out_text,
|
66 |
+
esc_attr( __( 'Close this and do not ask me again', 'google-analytics-opt-out' ) ),
|
67 |
+
$close_icon
|
68 |
+
);
|
69 |
|
70 |
}
|
71 |
|
98 |
/**
|
99 |
* Adds the custom styles to the header
|
100 |
*
|
|
|
101 |
* @return void
|
102 |
+
* @since 1.0
|
103 |
*/
|
104 |
function gaoop_wp_head() {
|
105 |
|
117 |
'-moz-box-shadow' => $box_shadow,
|
118 |
'box-shadow' => $box_shadow,
|
119 |
'background-color' => '#0E90D2',
|
120 |
+
'padding' => '1rem',
|
121 |
'margin' => 0,
|
122 |
+
'display' => 'flex',
|
123 |
+
'align-items' => 'center',
|
124 |
+
'justify-content' => 'space-between'
|
125 |
+
),
|
126 |
+
'.gaoop-hidden' => array(
|
127 |
+
'display' => 'none',
|
128 |
+
),
|
129 |
+
'.gaoop-checkbox:checked + .gaoop' => array(
|
130 |
+
'width' => 'auto',
|
131 |
+
'right' => 0,
|
132 |
+
'left' => 'auto',
|
133 |
+
'opacity' => '0.5',
|
134 |
+
'ms-filter' => '"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"',
|
135 |
+
'filter' => 'alpha(opacity=50)',
|
136 |
+
'-moz-opacity' => '0.5',
|
137 |
+
'-khtml-opacity' => '0.5',
|
138 |
+
),
|
139 |
+
'.gaoop-checkbox:checked + .gaoop .gaoop-close-icon' => array(
|
140 |
+
'display' => 'none',
|
141 |
+
),
|
142 |
+
'.gaoop-checkbox:checked + .gaoop .gaoop-opt-out-content' => array(
|
143 |
+
'display' => 'none',
|
144 |
+
),
|
145 |
+
'input.gaoop-checkbox' => array(
|
146 |
+
# 'display' => 'none',
|
147 |
+
'margin-bottom' => '10rem'
|
148 |
),
|
149 |
'.gaoop a' => array(
|
150 |
'color' => '#67C2F0',
|
155 |
'text-decoration' => 'underline',
|
156 |
),
|
157 |
'.gaoop-info-icon' => array(
|
158 |
+
'margin' => '0',
|
159 |
+
'padding' => '0',
|
160 |
+
'cursor' => 'pointer',
|
161 |
+
),
|
162 |
+
'.gaoop svg' => array(
|
163 |
+
'position' => 'relative',
|
164 |
+
'margin' => '0',
|
165 |
+
'padding' => '0',
|
166 |
+
'width' => 'auto',
|
167 |
+
'height' => '25px',
|
168 |
),
|
169 |
'.gaoop-close-icon' => array(
|
170 |
+
'cursor' => 'pointer',
|
171 |
'position' => 'relative',
|
172 |
'opacity' => '0.5',
|
173 |
'ms-filter' => '"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"',
|
179 |
'text-align' => 'center',
|
180 |
'vertical-align' => 'top',
|
181 |
'display' => 'inline-block',
|
|
|
182 |
),
|
183 |
'.gaoop-close-icon:hover' => array(
|
184 |
'z-index' => '1',
|
191 |
'.gaoop_closed .gaoop-opt-out-link, .gaoop_closed .gaoop-close-icon' => array(
|
192 |
'display' => 'none',
|
193 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
'.gaoop_closed:hover' => array(
|
195 |
'opacity' => '1',
|
196 |
'ms-filter' => '"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"',
|
206 |
),
|
207 |
'.gaoop-opt-out-content' => array(
|
208 |
'display' => 'inline-block',
|
|
|
209 |
'vertical-align' => 'top',
|
210 |
),
|
211 |
);
|
inc/scripts.php
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
/**
|
4 |
* Echos the Javascript or returns it (if $echo is set to TRUE)
|
5 |
*
|
|
|
6 |
* @since 1.0
|
7 |
*
|
8 |
-
* @return void|string
|
9 |
*/
|
10 |
function gaoop_js() {
|
11 |
|
@@ -14,24 +14,24 @@ function gaoop_js() {
|
|
14 |
return;
|
15 |
}
|
16 |
?>
|
17 |
-
|
18 |
-
|
19 |
<?php do_action( 'gaoop_js_before_script' ); ?>
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
<?php echo apply_filters( 'gaoop_cookie_set', '' ); ?>
|
30 |
-
|
31 |
<?php
|
32 |
do_action( 'gaoop_js_after_script' );
|
33 |
?>
|
34 |
-
|
35 |
<?php
|
36 |
}
|
37 |
|
@@ -44,17 +44,7 @@ add_action( 'wp_head', 'gaoop_js', 0 );
|
|
44 |
* @since 1.0
|
45 |
*/
|
46 |
function gaoop_enqueue_scripts() {
|
47 |
-
|
48 |
-
wp_enqueue_script( 'goop', GAOOP_URL . 'js/frontend.js', array( 'jquery' ), false, true );
|
49 |
-
|
50 |
-
add_filter( 'script_loader_tag', function ( $tag, $handle ) {
|
51 |
-
|
52 |
-
if ( $handle === 'goop' && false === stripos( $tag, 'defer' ) ) {
|
53 |
-
return str_replace( '<script', '<script defer ', $tag );
|
54 |
-
}
|
55 |
-
|
56 |
-
return $tag;
|
57 |
-
}, 10, 2 );
|
58 |
}
|
59 |
|
60 |
add_action( 'init', 'gaoop_enqueue_scripts' );
|
3 |
/**
|
4 |
* Echos the Javascript or returns it (if $echo is set to TRUE)
|
5 |
*
|
6 |
+
* @return void|string
|
7 |
* @since 1.0
|
8 |
*
|
|
|
9 |
*/
|
10 |
function gaoop_js() {
|
11 |
|
14 |
return;
|
15 |
}
|
16 |
?>
|
17 |
+
<script type="text/javascript">
|
18 |
+
/* Google Analytics Opt-Out by WP-Buddy | https://wp-buddy.com/products/plugins/google-analytics-opt-out */
|
19 |
<?php do_action( 'gaoop_js_before_script' ); ?>
|
20 |
+
var gaoop_property = '<?php echo $ua_code; ?>';
|
21 |
+
var gaoop_disable_str = 'ga-disable-' + gaoop_property;
|
22 |
+
if (document.cookie.indexOf(gaoop_disable_str + '=true') > -1) {
|
23 |
+
window[gaoop_disable_str] = true;
|
24 |
+
}
|
25 |
+
|
26 |
+
function gaoop_analytics_optout() {
|
27 |
+
document.cookie = gaoop_disable_str + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
|
28 |
+
window[gaoop_disable_str] = true;
|
29 |
<?php echo apply_filters( 'gaoop_cookie_set', '' ); ?>
|
30 |
+
}
|
31 |
<?php
|
32 |
do_action( 'gaoop_js_after_script' );
|
33 |
?>
|
34 |
+
</script>
|
35 |
<?php
|
36 |
}
|
37 |
|
44 |
* @since 1.0
|
45 |
*/
|
46 |
function gaoop_enqueue_scripts() {
|
47 |
+
wp_enqueue_script( 'goop', GAOOP_URL . 'js/frontend.js', array(), false, true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
add_action( 'init', 'gaoop_enqueue_scripts' );
|
js/frontend.js
CHANGED
@@ -1,103 +1,73 @@
|
|
1 |
-
(function (
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
$gaoop.find( '.gaoop-info-icon' ).click( function ( e ) {
|
75 |
-
e.preventDefault();
|
76 |
-
|
77 |
-
if ( $gaoop.hasClass( 'gaoop_closed' ) ) {
|
78 |
-
gaoop_open();
|
79 |
-
}
|
80 |
-
|
81 |
-
} );
|
82 |
-
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Click to close the window
|
86 |
-
*/
|
87 |
-
$gaoop.find( '.gaoop-close-icon' ).click( function ( e ) {
|
88 |
-
e.preventDefault();
|
89 |
-
gaoop_close();
|
90 |
-
} );
|
91 |
-
|
92 |
-
|
93 |
-
/**
|
94 |
-
* Click to close the window
|
95 |
-
*/
|
96 |
-
|
97 |
-
jQuery( document ).on( 'click', '.gaoop-close-link', function ( e ) {
|
98 |
-
e.preventDefault();
|
99 |
-
gaoop_close();
|
100 |
-
} );
|
101 |
-
|
102 |
-
} );
|
103 |
-
})( jQuery );
|
1 |
+
(function () {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
var $gaoop_checkbox = document.querySelector('.gaoop-checkbox');
|
5 |
+
|
6 |
+
if (!$gaoop_checkbox || $gaoop_checkbox.length <= 0) {
|
7 |
+
return;
|
8 |
+
}
|
9 |
+
|
10 |
+
var $gaoop = document.querySelector('.gaoop');
|
11 |
+
var ua_code = $gaoop.dataset.gaoop_ua;
|
12 |
+
|
13 |
+
function gaoop_to_infobox() {
|
14 |
+
$gaoop_checkbox.checked = true;
|
15 |
+
}
|
16 |
+
|
17 |
+
var opted_out = document.cookie.indexOf('ga-disable-' + ua_code + '=true') >= 0;
|
18 |
+
var closed_box = document.cookie.indexOf('gaoop_hide_info=true') >= 0;
|
19 |
+
var hide_after_close = 1 === parseInt($gaoop.dataset.gaoop_hide_after_close);
|
20 |
+
|
21 |
+
if (!opted_out && !closed_box) {
|
22 |
+
/* Full banner */
|
23 |
+
$gaoop.classList.remove('gaoop-hidden');
|
24 |
+
} else if (!hide_after_close && (opted_out || closed_box)) {
|
25 |
+
/* info box only */
|
26 |
+
$gaoop.classList.remove('gaoop-hidden');
|
27 |
+
gaoop_to_infobox();
|
28 |
+
} else if (hide_after_close && (opted_out || closed_box)) {
|
29 |
+
/* fully hidden */
|
30 |
+
$gaoop.classList.add('gaoop-hidden');
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Click Opt-Out Button
|
35 |
+
*/
|
36 |
+
var $opt_out_button = $gaoop.querySelector('.gaoo-opt-out');
|
37 |
+
if ($opt_out_button) {
|
38 |
+
$opt_out_button.addEventListener('click', function () {
|
39 |
+
if (hide_after_close) {
|
40 |
+
$gaoop.classList.add('gaoop-hidden');
|
41 |
+
} else {
|
42 |
+
gaoop_to_infobox();
|
43 |
+
}
|
44 |
+
});
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Click info icon
|
50 |
+
*/
|
51 |
+
var $info_button = $gaoop.querySelector('.gaoop-info-icon');
|
52 |
+
if ($info_button) {
|
53 |
+
$info_button.addEventListener('click', function () {
|
54 |
+
/* destroy cookie */
|
55 |
+
document.cookie = 'gaoop_hide_info=true; expires=Thu, 31 Dec 1901 23:59:59 UTC; path=/';
|
56 |
+
});
|
57 |
+
}
|
58 |
+
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Click to close the banner
|
62 |
+
*/
|
63 |
+
var $close_button = $gaoop.querySelector('.gaoop-close-icon');
|
64 |
+
if ($close_button) {
|
65 |
+
$close_button.addEventListener('click', function () {
|
66 |
+
document.cookie = 'gaoop_hide_info=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
|
67 |
+
|
68 |
+
if (hide_after_close) {
|
69 |
+
$gaoop.classList.add('gaoop-hidden');
|
70 |
+
}
|
71 |
+
});
|
72 |
+
}
|
73 |
+
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Contributors: wp-buddy, floriansimeth
|
3 |
Donate link: https://wp-buddy.com/products/plugins/google-analytics-opt-out/
|
4 |
Tags: google analytics opt-out, monster insights, gdpr, dsgvo
|
5 |
-
Version: 2.
|
6 |
-
Stable tag: 2.
|
7 |
Requires at least: 4.8.0
|
8 |
-
Tested up to: 5.
|
9 |
Requires PHP: 5.6.0
|
10 |
License: GPLv2
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -42,6 +42,12 @@ The free and the pro version have now been merged together. So you now can have
|
|
42 |
|
43 |
== Changelog ==
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
= 2.2.6 =
|
46 |
* Bring back the sub-menu under "Insights" if MonsterInsights is installed.
|
47 |
|
2 |
Contributors: wp-buddy, floriansimeth
|
3 |
Donate link: https://wp-buddy.com/products/plugins/google-analytics-opt-out/
|
4 |
Tags: google analytics opt-out, monster insights, gdpr, dsgvo
|
5 |
+
Version: 2.3.0
|
6 |
+
Stable tag: 2.3.0
|
7 |
Requires at least: 4.8.0
|
8 |
+
Tested up to: 5.4
|
9 |
Requires PHP: 5.6.0
|
10 |
License: GPLv2
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
42 |
|
43 |
== Changelog ==
|
44 |
|
45 |
+
= 2.3.0 =
|
46 |
+
* Using SVG icons instead of images.
|
47 |
+
* Added new filters: `gaoop_info_icon_html` and `gaoop_close_icon_html`.
|
48 |
+
* Removed dependency from jQuery.
|
49 |
+
* Removed deferred loading of JS file because it makes no sense when script is in the footer.
|
50 |
+
|
51 |
= 2.2.6 =
|
52 |
* Bring back the sub-menu under "Insights" if MonsterInsights is installed.
|
53 |
|