-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathcookieconsent.php
More file actions
32 lines (26 loc) · 1010 Bytes
/
Copy pathcookieconsent.php
File metadata and controls
32 lines (26 loc) · 1010 Bytes
1
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
<?php
/**
* Alert users about the use of cookies.
*
* @wordpress-plugin
* Plugin Name: Cookie Consent (MU)
* Description: The most popular solution to the EU cookie law.
* Version: 0.1.2
* Plugin URI: https://cookieconsent.insites.com/download/
*/
add_action( 'wp_footer', function () {
// EDIT here!
$policy_url = '/cookie-policy/';
$cookieconsent_template = '
<!-- Cookie Consent by Insites -->
<style scoped>@import url("//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css");</style>
<script async src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"
integrity="sha384-PDjg2ZdS3khPzd53i18+7tzB32JVQfFMrTXYo21RqPgUmEVAPwIhxOUF/8sP79CS" crossorigin="anonymous"></script>
<script>
// EDIT here!
// JavaScript generated by https://cookieconsent.insites.com/download/
// if (typeof window.cookieconsent !== "object") { return; }
// "href": "%s"
</script>';
printf( $cookieconsent_template, $policy_url );
}, 51 );