EU Cookie Law - Version 1.2

Version Description

  • Fixed cookie storing bug in Firefox
Download this release

Release Info

Developer pleer
Plugin Icon 128x128 EU Cookie Law
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

Files changed (3) hide show
  1. class-frontend.php +11 -11
  2. eu-cookie-law.php +1 -1
  3. readme.txt +8 -3
class-frontend.php CHANGED
@@ -12,25 +12,25 @@ add_action('wp_head', 'peadig_eucookie_scripts');
12
  function peadig_eucookie_bar(){
13
  $options = get_option('peadig_eucookie');
14
  if ($options['enabled'] == '1') {
15
-
16
- if(!$_COOKIE['peadigCookie']){
17
  //for Cookie
18
  switch($options['length']){
19
  case "hours":
20
- $multi = 3600;
21
  break;
22
  case "days":
23
- $multi = 3600 * 24;
24
  break;
25
  case "weeks":
26
- $multi = 3600 * 24 * 7;
27
  break;
28
  case "months":
29
- $multi = 3600 * 24 * 30;
30
- break;
31
  }
32
-
33
- $expireTimer = $multi * $options['lengthnum']
34
  ?>
35
  <div class="pea_cook_wrapper pea_cook_<?php if ($options['position']!="") {echo $options['position'];} else {echo "bottomright";} ?>">
36
  <p><?php echo $options['barmessage']; ?> <a href="#" id="fom"><?php echo $options['barlink']; ?></a> <button id="pea_cook_btn" class="pea_cook_btn" href="#"><?php echo $options['barbutton']; ?></button></p>
@@ -53,8 +53,8 @@ function peadig_eucookie_bar(){
53
  $(".pea_cook_more_info_popover").fadeOut("slow");
54
  });
55
  $('#pea_cook_btn').click(function() {
56
- var today = new Date();
57
- var expire = new Date() + <?php echo $expireTimer?>;
58
  document.cookie = "peadigCookie=set; expires=" + expire;
59
  $(".pea_cook_wrapper").fadeOut("fast");
60
  });
12
  function peadig_eucookie_bar(){
13
  $options = get_option('peadig_eucookie');
14
  if ($options['enabled'] == '1') {
15
+
16
+ if(!$_COOKIE['peadigCookie']){
17
  //for Cookie
18
  switch($options['length']){
19
  case "hours":
20
+ $multi = (1/24);
21
  break;
22
  case "days":
23
+ $multi = 1;
24
  break;
25
  case "weeks":
26
+ $multi = 7;
27
  break;
28
  case "months":
29
+ $multi = 30;
30
+ break;
31
  }
32
+
33
+ $expireTimer = $multi * $options['lengthnum'];
34
  ?>
35
  <div class="pea_cook_wrapper pea_cook_<?php if ($options['position']!="") {echo $options['position'];} else {echo "bottomright";} ?>">
36
  <p><?php echo $options['barmessage']; ?> <a href="#" id="fom"><?php echo $options['barlink']; ?></a> <button id="pea_cook_btn" class="pea_cook_btn" href="#"><?php echo $options['barbutton']; ?></button></p>
53
  $(".pea_cook_more_info_popover").fadeOut("slow");
54
  });
55
  $('#pea_cook_btn').click(function() {
56
+ var expire = new Date();
57
+ expire.setDate(expire.getDate() + <?php echo $expireTimer?>);
58
  document.cookie = "peadigCookie=set; expires=" + expire;
59
  $(".pea_cook_wrapper").fadeOut("fast");
60
  });
eu-cookie-law.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: EU Cookie Law
4
  Plugin URI: http://3doordigital.com/wordpress/plugins/eu-cookie-law/
5
  Description: Inserts a bar within your website to warn users about the EU cookie law, with a popup for more information. Clicking accept will remove the bar for a selected amount of time
6
- Version: 1.1
7
  Author: Shane Jones & Alex Moss
8
  Author URI: http://3doordigital.com/
9
  Contributors: alexmoss, pleer, ShaneJones
3
  Plugin Name: EU Cookie Law
4
  Plugin URI: http://3doordigital.com/wordpress/plugins/eu-cookie-law/
5
  Description: Inserts a bar within your website to warn users about the EU cookie law, with a popup for more information. Clicking accept will remove the bar for a selected amount of time
6
+ Version: 1.2
7
  Author: Shane Jones & Alex Moss
8
  Author URI: http://3doordigital.com/
9
  Contributors: alexmoss, pleer, ShaneJones
readme.txt CHANGED
@@ -4,14 +4,14 @@ Plugin Name: EU Cookie Law
4
  Plugin URI: http://3doordigital.com/wordpress/plugins/eu-cookie-law/
5
  Donate link: http://3doordigital.com/go/eu-cookie-paypal/
6
  Description: Inserts a bar within your website to warn users about the EU cookie law, with a popup for more information. Clicking accept will remove the bar for a selected amount of time.
7
- Version: 1.1
8
  Author: Alex Moss and Shane Jones
9
  Author URI: http://3doordigital.com/
10
  Link: http://3doordigital.com/wordpress/plugins/facebook-comments/
11
  Tags: eu cookie, cookies, law, analytics
12
  Requires at least: 2.7
13
- Tested up to: 3.4
14
- Stable tag: 1.1
15
 
16
  == Description ==
17
 
@@ -35,6 +35,11 @@ This section describes how to install the plugin and get it working.
35
 
36
  == Changelog ==
37
 
 
 
 
 
 
38
  = 1.1 =
39
 
40
  * Fixed cookie storing bug
4
  Plugin URI: http://3doordigital.com/wordpress/plugins/eu-cookie-law/
5
  Donate link: http://3doordigital.com/go/eu-cookie-paypal/
6
  Description: Inserts a bar within your website to warn users about the EU cookie law, with a popup for more information. Clicking accept will remove the bar for a selected amount of time.
7
+ Version: 1.2
8
  Author: Alex Moss and Shane Jones
9
  Author URI: http://3doordigital.com/
10
  Link: http://3doordigital.com/wordpress/plugins/facebook-comments/
11
  Tags: eu cookie, cookies, law, analytics
12
  Requires at least: 2.7
13
+ Tested up to: 3.4.1
14
+ Stable tag: 1.2
15
 
16
  == Description ==
17
 
35
 
36
  == Changelog ==
37
 
38
+ = 1.2 =
39
+
40
+ * Fixed cookie storing bug in Firefox
41
+
42
+
43
  = 1.1 =
44
 
45
  * Fixed cookie storing bug