Changeset 1235502
- Timestamp:
- 09/01/2015 03:08:38 PM (11 years ago)
- Location:
- easy-cookie-law/trunk
- Files:
-
- 2 edited
-
easy-cookie-law.php (modified) (9 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-cookie-law/trunk/easy-cookie-law.php
r1147881 r1235502 3 3 * Plugin Name: Easy Cookie Law 4 4 * Description: Minimal code to make sure your website repect the coockie law 5 * Version: 0.1.35 * Version: 1.4 6 6 * Author: Antonio Sanchez 7 7 * Author URI: http://antsanchez.com … … 13 13 14 14 This program is free software; you can redistribute it and/or modify 15 it under the terms of the GNU General Public License, version 2, as 15 it under the terms of the GNU General Public License, version 2, as 16 16 published by the Free Software Foundation. 17 17 … … 128 128 <h1><?php echo __('Easy Cookie Law Menu Options', 'easy-cookie-law'); ?></h1> 129 129 <form method="post"> 130 130 131 131 <!-- Text --> 132 132 <div class="caja"> … … 192 192 <?php echo __('Check this if you want to use your custom CSS written in any other stylesheet.<br>All your stlyes should be included within the id #ecl_notice, since it is the only css id that this plugin uses.', 'easy-cookie-law'); ?> 193 193 </div> 194 194 195 195 <!-- Submit button --> 196 196 <div class="caja"> … … 234 234 'Scrubby robot'=> 'Scrubby', 235 235 ); 236 236 237 237 $regexp= '/'. implode("|", $bots_list).'/'; 238 if ( preg_match($regexp, $USER_AGENT)){239 return true;240 // It is a bot238 if ( preg_match($regexp, $USER_AGENT)){ 239 return true; 240 // It is a bot 241 241 }else{ 242 return false;243 // It is not242 return false; 243 // It is not 244 244 } 245 245 } 246 246 247 247 /** 248 248 * … … 258 258 if(isset($_COOKIE[$name])){ 259 259 $ecl_user = $_COOKIE[$name]; 260 if($ecl_user == 1){ 261 setcookie($name, 3, time() + (86400 * 30), "/"); 260 if($ecl_user == 1){ 261 setcookie($name, 3, time() + (86400 * 30), "/"); 262 262 $ecl_user = 3; 263 263 } … … 272 272 /** 273 273 * 274 * Print CSS and JavaScript needed274 * Print CSS and JavaScript if needed 275 275 * 276 276 */ … … 280 280 if($ecl_user == 1){ 281 281 282 global $empty_options;283 $opciones_saved = get_option("ecl_options", $empty_options);284 $eclcustom = esc_attr($opciones_saved['ecl_custom']);285 286 if($eclcustom == 0){287 $eclback = esc_attr($opciones_saved['ecl_noticecolor']);288 $ecltext = esc_attr($opciones_saved['ecl_textcolor']);289 $ecllink = esc_attr($opciones_saved['ecl_linkscolor']);290 291 if($opciones_saved['ecl_position'] == "top"){292 echo "<style type='text/css'>#ecl-notice{position: fixed; z-index: 1000000; top: 0; left: 0; width: 100%; font-size: 14px; padding: 0.5em; background-color: $eclback; color: $ecltext;}#ecl-notice a{color:$ecllink;}</style>";293 }else{294 echo "<style type='text/css'>#ecl-notice{position: fixed; z-index: 1000000; bottom: 0; left: 0; width: 100%; font-size: 14px; padding: 0.5em; background-color: $eclback; color: $ecltext;}#ecl-notice a{color:$ecllink;}</style>";295 }296 }297 298 ?>299 <script type="text/javascript">function ecl_close_div(){document.getElementById('ecl-notice').style.display = "none";}</script>300 <?php282 global $empty_options; 283 $opciones_saved = get_option("ecl_options", $empty_options); 284 $eclcustom = esc_attr($opciones_saved['ecl_custom']); 285 286 if($eclcustom == 0){ 287 $eclback = esc_attr($opciones_saved['ecl_noticecolor']); 288 $ecltext = esc_attr($opciones_saved['ecl_textcolor']); 289 $ecllink = esc_attr($opciones_saved['ecl_linkscolor']); 290 291 if($opciones_saved['ecl_position'] == "top"){ 292 echo "<style type='text/css'>#ecl-notice{position: fixed; z-index: 1000000; top: 0; left: 0; width: 100%; font-size: 14px; padding: 0.5em; background-color: $eclback; color: $ecltext;}#ecl-notice a{color:$ecllink;}</style>"; 293 }else{ 294 echo "<style type='text/css'>#ecl-notice{position: fixed; z-index: 1000000; bottom: 0; left: 0; width: 100%; font-size: 14px; padding: 0.5em; background-color: $eclback; color: $ecltext;}#ecl-notice a{color:$ecllink;}</style>"; 295 } 296 } 297 298 ?> 299 <script type="text/javascript">function ecl_close_div(){document.getElementById('ecl-notice').style.display = "none";}</script> 300 <?php 301 301 302 302 } … … 318 318 global $empty_options; 319 319 $opciones_saved = get_option("ecl_options", $empty_options); 320 320 321 321 $ecl_text = $opciones_saved['ecl_text']; 322 322 $ecl_more_text = $opciones_saved['ecl_link_text']; -
easy-cookie-law/trunk/readme.txt
r1147881 r1235502 1 1 === Easy Cookie Law === 2 Contributors: antsanchez 2 Contributors: antsanchez 3 3 Tags: cookies, cookie law 4 4 Requires at least: 3.0.1 5 Tested up to: 4. 2.16 Stable tag: 0.1.35 Tested up to: 4.3 6 Stable tag: 1.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 13 13 == Description == 14 14 15 Easy Cookie Law allows you to easily comply with the european cookie law, showing15 Easy Cookie Law allows you to easily comply with the European cookie law, showing 16 16 a notice to the user only the very first time that visits your website. 17 Message, position and the style can be eas yly modified through the plugin menu.17 Message, position and the style can be easily modified through the plugin menu. 18 18 19 19 It helps you with SEO, since the plugin will not add any CSS stylesheet or Javascript file, 20 what does not make your web site load more slowly. 20 what does not make your web site load more slowly. 21 21 22 22 == Installation == … … 56 56 == Changelog == 57 57 58 = 1.4 = 59 * Updated to WordPress v4.3 60 58 61 = 1.3 = 59 62 * Updated to WordPress v4.2.1
Note: See TracChangeset
for help on using the changeset viewer.