Plugin Directory

Changeset 1235502


Ignore:
Timestamp:
09/01/2015 03:08:38 PM (11 years ago)
Author:
antsanchez
Message:

Updated to WordPress v4.3

Location:
easy-cookie-law/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • easy-cookie-law/trunk/easy-cookie-law.php

    r1147881 r1235502  
    33 * Plugin Name: Easy Cookie Law
    44 * Description: Minimal code to make sure your website repect the coockie law
    5  * Version: 0.1.3
     5 * Version: 1.4
    66 * Author: Antonio Sanchez
    77 * Author URI: http://antsanchez.com
     
    1313
    1414    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
    1616    published by the Free Software Foundation.
    1717
     
    128128    <h1><?php echo __('Easy Cookie Law Menu Options', 'easy-cookie-law'); ?></h1>
    129129        <form method="post">
    130    
     130
    131131            <!-- Text -->
    132132            <div class="caja">
     
    192192                <?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'); ?>
    193193            </div>
    194    
     194
    195195            <!-- Submit button -->
    196196            <div class="caja">
     
    234234        'Scrubby robot'=> 'Scrubby',
    235235    );
    236    
     236
    237237    $regexp= '/'.  implode("|", $bots_list).'/';
    238     if ( preg_match($regexp, $USER_AGENT)){
    239         return true;
    240         // It is a bot
     238      if ( preg_match($regexp, $USER_AGENT)){
     239        return true;
     240        // It is a bot
    241241    }else{
    242         return false;
    243         // It is not
     242        return false;
     243        // It is not
    244244    }
    245245}
    246  
     246
    247247/**
    248248*
     
    258258        if(isset($_COOKIE[$name])){
    259259            $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), "/");
    262262                $ecl_user = 3;
    263263            }
     
    272272/**
    273273*
    274 * Print CSS and JavaScript needed
     274* Print CSS and JavaScript if needed
    275275*
    276276*/
     
    280280    if($ecl_user == 1){
    281281
    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     <?php
     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      <?php
    301301
    302302    }
     
    318318        global $empty_options;
    319319        $opciones_saved = get_option("ecl_options", $empty_options);
    320        
     320
    321321        $ecl_text = $opciones_saved['ecl_text'];
    322322        $ecl_more_text = $opciones_saved['ecl_link_text'];
  • easy-cookie-law/trunk/readme.txt

    r1147881 r1235502  
    11=== Easy Cookie Law ===
    2 Contributors: antsanchez 
     2Contributors: antsanchez
    33Tags: cookies, cookie law
    44Requires at least: 3.0.1
    5 Tested up to: 4.2.1
    6 Stable tag: 0.1.3
     5Tested up to: 4.3
     6Stable tag: 1.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1313== Description ==
    1414
    15 Easy Cookie Law allows you to easily comply with the european cookie law, showing
     15Easy Cookie Law allows you to easily comply with the European cookie law, showing
    1616a notice to the user only the very first time that visits your website.
    17 Message, position and the style can be easyly modified through the plugin menu.
     17Message, position and the style can be easily modified through the plugin menu.
    1818
    1919It 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. 
     20what does not make your web site load more slowly.
    2121
    2222== Installation ==
     
    5656== Changelog ==
    5757
     58= 1.4 =
     59* Updated to WordPress v4.3
     60
    5861= 1.3 =
    5962* Updated to WordPress v4.2.1
Note: See TracChangeset for help on using the changeset viewer.