danix
's git repository
home
/
my projects
/
danixland-site-plugin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0b37291
)
surrounded google analytics code with cookie-notice code to block it if the user...
author
danix
<danix@danix.xyz>
Thu, 26 Jul 2018 20:00:56 +0000
(22:00 +0200)
committer
danix
<danix@danix.xyz>
Thu, 26 Jul 2018 20:00:56 +0000
(22:00 +0200)
danixland-site-plugin.php
patch
|
blob
|
blame
|
history
diff --git
a/danixland-site-plugin.php
b/danixland-site-plugin.php
index
0245d55
..
6db6576
100644
(file)
--- a/
danixland-site-plugin.php
+++ b/
danixland-site-plugin.php
@@
-2,6
+2,10
@@
/*
Plugin Name: Site Plugin for danix.xyz
Description: Site specific code changes for danix.xyz
/*
Plugin Name: Site Plugin for danix.xyz
Description: Site specific code changes for danix.xyz
+Plugin URI: https://danix.xyz
+Version: 0.7
+Author: Danilo 'danix' Macri
+Author URI: https://danix.xyz
*/
/**
*/
/**
@@
-74,7
+78,8
@@
add_shortcode('download', 'danix_download_button');
* The google analytics code
*
*/
* The google analytics code
*
*/
-function danix_google_anal() {?>
+function danix_google_anal() {
+ if ( function_exists('cn_cookies_accepted') && cn_cookies_accepted() ) { ?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-23882460-1"></script>
<script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-23882460-1"></script>
<script>
@@
-85,6
+90,7
@@
function danix_google_anal() {?>
gtag('config', 'UA-23882460-1');
</script>
<?php }
gtag('config', 'UA-23882460-1');
</script>
<?php }
+}
add_action('wp_head', 'danix_google_anal', 10);
/**
add_action('wp_head', 'danix_google_anal', 10);
/**