Add upstream

This commit is contained in:
root
2019-10-24 00:12:05 +02:00
parent 85d41e4216
commit ac980f592c
3504 changed files with 1049983 additions and 29971 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,112 @@
/* Cookie Notice settings */
.df-credits {
float: right;
width: 280px;
background: #fff;
margin: 20px -300px 20px 20px;
position: relative;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.df-credits .inner {
padding-left: 10px;
padding-right: 10px;
}
.df-credits h3 {
font-size: 14px;
line-height: 1.4;
margin: 0;
padding: 8px 12px;
border-bottom: 1px solid #eee;
}
.df-credits .df-link {
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
font-style: italic;
padding-bottom: 10px;
margin: 0;
}
.df-credits .df-link a {
vertical-align: middle;
padding: 5px 0 0 4px;
}
.df-promo h4 {
margin-bottom: 0;
}
.cookie-notice-settings .df-credits form {
min-width: 260px;
margin-bottom: 1em;
}
.cookie-notice-settings .df-credits form input {
margin: 0;
padding: 0;
}
.cookie-notice-settings {
margin-right: 300px;
}
.cookie-notice-settings hr, .df-credits hr {
border: solid #eee;
border-width: 1px 0 0;
clear: both;
height: 0;
}
.cookie-notice-settings form {
float: left;
min-width: 463px;
width: 100%;
}
.cookie-notice-settings .ui-button {
margin-bottom: 5px;
}
.cookie-notice-settings .description {
font-size: 13px;
margin-bottom: 8px;
}
#cn_colors label {
min-width: 10em;
display: inline-block;
}
#cn_colors div {
vertical-align: middle;
}
#cn_refuse_code .nav-tab-wrapper {
padding-top: 0;
}
#cn_refuse_code .refuse-code-tab {
display: none;
}
#cn_refuse_code .refuse-code-tab.active {
display: block;
}
#cn_refuse_code .refuse-code-tab .description {
margin-top: 10px;
}
/* All Mobile Sizes (devices and browser) */
@media only screen and (max-width: 959px) {
.df-credits {
width: 100%;
float: none;
margin: 20px 0;
}
.cookie-notice-settings {
margin-right: 0;
}
}

View File

@@ -0,0 +1 @@
.df-credits{float:right;width:280px;background:#fff;margin:20px -300px 20px 20px;position:relative;box-shadow:0 0 0 1px rgba(0,0,0,0.05)}.df-credits .inner{padding-left:10px;padding-right:10px}.df-credits h3{font-size:14px;line-height:1.4;margin:0;padding:8px 12px;border-bottom:1px solid #eee}.df-credits .df-link{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-style:italic;padding-bottom:10px;margin:0}.df-credits .df-link a{vertical-align:middle;padding:5px 0 0 4px}.df-promo h4{margin-bottom:0}.cookie-notice-settings .df-credits form{min-width:260px;margin-bottom:1em}.cookie-notice-settings .df-credits form input{margin:0;padding:0}.cookie-notice-settings{margin-right:300px}.cookie-notice-settings hr,.df-credits hr{border:solid #eee;border-width:1px 0 0;clear:both;height:0}.cookie-notice-settings form{float:left;min-width:463px;width:100%}.cookie-notice-settings .ui-button{margin-bottom:5px}.cookie-notice-settings .description{font-size:13px;margin-bottom:8px}#cn_colors label{min-width:10em;display:inline-block}#cn_colors div{vertical-align:middle}#cn_refuse_code .nav-tab-wrapper{padding-top:0}#cn_refuse_code .refuse-code-tab{display:none}#cn_refuse_code .refuse-code-tab.active{display:block}#cn_refuse_code .refuse-code-tab .description{margin-top:10px}@media only screen and (max-width: 959px){.df-credits{width:100%;float:none;margin:20px 0}.cookie-notice-settings{margin-right:0}}

View File

@@ -0,0 +1,151 @@
#cookie-notice {
display: block;
visibility: hidden;
position: fixed;
min-width: 100%;
height: auto;
z-index: 100000;
font-size: 13px;
line-height: 20px;
left: 0;
text-align: center;
}
.cn-top {
top: 0;
}
.cn-bottom {
bottom: 0;
}
.cookie-notice-container {
padding: 10px;
text-align: center;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.cookie-notice-revoke-container {
position: absolute;
bottom: 0;
width: 100%;
z-index: 1;
visibility: hidden;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.cn-top .cookie-notice-revoke-container {
top: 0;
bottom: auto;
}
#cookie-notice .cn-revoke-cookie {
margin: 0;
}
.cn-button.wp-default,
.cn-button.wp-default:hover,
.cn-button.bootstrap,
.cn-button.bootstrap:hover {
box-shadow: none;
text-decoration: none;
}
#cookie-notice .cn-button {
margin-left: 10px;
}
.cn-button.wp-default {
font-family: sans-serif;
line-height: 18px;
padding: 2px 12px;
background: linear-gradient(to bottom, #FEFEFE, #F4F4F4) repeat scroll 0 0 #F3F3F3;
border-color: #BBB;
color: #333;
text-shadow: 0 1px 0 #FFF;
-moz-box-sizing: border-box;
border-radius: 3px 3px 3px 3px;
border-style: solid;
border-width: 1px;
cursor: pointer;
display: inline-block;
font-size: 12px;
font-style: normal;
text-decoration: none;
white-space: nowrap;
outline: none;
}
.cn-button.wp-default:hover {
background: linear-gradient(to bottom, #FFFFFF, #F3F3F3) repeat scroll 0 0 #F3F3F3;
border-color: #999;
color: #222;
}
.cn-button.bootstrap {
font-family: sans-serif;
display: inline-block;
*display: inline;
padding: 4px 12px;
margin-right: .3em;
margin-bottom: 0;
*margin-left: .3em;
line-height: 20px;
color: #333;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, .75);
font-style: normal;
vertical-align: middle;
cursor: pointer;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
background-color: #006dcc;
*background-color: #04c;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
background-repeat: repeat-x;
border-style: solid;
border-width: 1px;
border-color: #04c #04c #002a80;
border-color: rgba(0, 0, 0, .1) rgba(0, 0, 0, .1) rgba(0, 0, 0, .25);
box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 1px 2px rgba(0, 0, 0, .05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
padding: 2px 10px;
font-size: 12px;
text-decoration: none;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
outline: none;
}
.cn-button.bootstrap:hover {
color: #fff;
background-color: #04c;
*background-color: #003bb3;
background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
@media all and (max-width: 900px) {
.cookie-notice-container #cn-notice-text {
display: block;
margin-bottom: 5px;
}
#cookie-notice .cn-button {
margin-left: 5px;
margin-right: 5px;
}
}

View File

@@ -0,0 +1 @@
#cookie-notice{display:block;visibility:hidden;position:fixed;min-width:100%;height:auto;z-index:100000;font-size:13px;line-height:20px;left:0;text-align:center}.cn-top{top:0}.cn-bottom{bottom:0}.cookie-notice-container{padding:10px;text-align:center;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.cookie-notice-revoke-container{position:absolute;bottom:0;width:100%;z-index:1;visibility:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.cn-top .cookie-notice-revoke-container{top:0;bottom:auto}#cookie-notice .cn-revoke-cookie{margin:0}.cn-button.wp-default,.cn-button.wp-default:hover,.cn-button.bootstrap,.cn-button.bootstrap:hover{box-shadow:none;text-decoration:none}#cookie-notice .cn-button{margin-left:10px}.cn-button.wp-default{font-family:sans-serif;line-height:18px;padding:2px 12px;background:linear-gradient(to bottom,#FEFEFE,#F4F4F4) repeat scroll 0 0 #F3F3F3;border-color:#BBB;color:#333;text-shadow:0 1px 0 #FFF;-moz-box-sizing:border-box;border-radius:3px 3px 3px 3px;border-style:solid;border-width:1px;cursor:pointer;display:inline-block;font-size:12px;font-style:normal;text-decoration:none;white-space:nowrap;outline:none}.cn-button.wp-default:hover{background:linear-gradient(to bottom,#FFFFFF,#F3F3F3) repeat scroll 0 0 #F3F3F3;border-color:#999;color:#222}.cn-button.bootstrap{font-family:sans-serif;display:inline-block;*display:inline;padding:4px 12px;margin-right:.3em;margin-bottom:0;*margin-left:.3em;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,.75);font-style:normal;vertical-align:middle;cursor:pointer;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#0088cc,#0044cc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#0088cc),to(#0044cc));background-image:-webkit-linear-gradient(top,#0088cc,#0044cc);background-image:-o-linear-gradient(top,#0088cc,#0044cc);background-image:linear-gradient(to bottom,#0088cc,#0044cc);background-repeat:repeat-x;border-style:solid;border-width:1px;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);box-shadow:0 1px 0 rgba(255,255,255,.2) inset,0 1px 2px rgba(0,0,0,.05);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);padding:2px 10px;font-size:12px;text-decoration:none;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;outline:none}.cn-button.bootstrap:hover{color:#fff;background-color:#04c;*background-color:#003bb3;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear}@media all and (max-width:900px){.cookie-notice-container #cn-notice-text{display:block;margin-bottom:5px}#cookie-notice .cn-button{margin-left:5px;margin-right:5px}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -0,0 +1,26 @@
<?php
// exit if accessed directly
if ( ! defined( 'ABSPATH' ) )
exit;
/**
* Check if cookies are accepted.
*
* @return boolean Whether cookies are accepted
*/
if ( ! function_exists( 'cn_cookies_accepted' ) ) {
function cn_cookies_accepted() {
return (bool) Cookie_Notice::cookies_accepted();
}
}
/**
* Check if cookies are set.
*
* @return boolean Whether cookies are set
*/
if ( ! function_exists( 'cn_cookies_set' ) ) {
function cn_cookies_set() {
return (bool) Cookie_Notice::cookies_set();
}
}

View File

@@ -0,0 +1,34 @@
<?php
// exit if accessed directly
if ( ! defined( 'ABSPATH' ) )
exit;
new Cookie_Notice_Upgrade( $cookie_notice );
class Cookie_Notice_Upgrade {
private $defaults;
public function __construct( $cookie_notice ) {
// attributes
$this->defaults = $cookie_notice->get_defaults();
// actions
add_action( 'init', array( $this, 'check_upgrade' ) );
}
public function check_upgrade() {
if ( ! current_user_can( 'manage_options' ) )
return;
// gets current database version
$current_db_version = get_option( 'cookie_notice_version', '1.0.0' );
// new version?
if ( version_compare( $current_db_version, $this->defaults['version'], '<' ) ) {
// updates plugin version
update_option( 'cookie_notice_version', $this->defaults['version'], false );
}
}
}

View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

View File

@@ -0,0 +1,73 @@
( function ( $ ) {
$( document ).ready( function () {
// initialize color picker
$( '.cn_color' ).wpColorPicker();
// refuse option
$( '#cn_refuse_opt' ).change( function () {
if ( $( this ).is( ':checked' ) ) {
$( '#cn_refuse_opt_container' ).slideDown( 'fast' );
} else {
$( '#cn_refuse_opt_container' ).slideUp( 'fast' );
}
} );
// revoke option
$( '#cn_revoke_cookies' ).change( function () {
if ( $( this ).is( ':checked' ) ) {
$( '#cn_revoke_opt_container' ).slideDown( 'fast' );
} else {
$( '#cn_revoke_opt_container' ).slideUp( 'fast' );
}
} );
// privacy policy option
$( '#cn_see_more' ).change( function () {
if ( $( this ).is( ':checked' ) ) {
$( '#cn_see_more_opt' ).slideDown( 'fast' );
} else {
$( '#cn_see_more_opt' ).slideUp( 'fast' );
}
} );
// privacy policy option
$( '#cn_on_scroll' ).change( function () {
if ( $( this ).is( ':checked' ) ) {
$( '#cn_on_scroll_offset' ).slideDown( 'fast' );
} else {
$( '#cn_on_scroll_offset' ).slideUp( 'fast' );
}
} );
// privacy policy link
$( '#cn_see_more_link-custom, #cn_see_more_link-page' ).change( function () {
if ( $( '#cn_see_more_link-custom:checked' ).val() === 'custom' ) {
$( '#cn_see_more_opt_page' ).slideUp( 'fast', function () {
$( '#cn_see_more_opt_link' ).slideDown( 'fast' );
} );
} else if ( $( '#cn_see_more_link-page:checked' ).val() === 'page' ) {
$( '#cn_see_more_opt_link' ).slideUp( 'fast', function () {
$( '#cn_see_more_opt_page' ).slideDown( 'fast' );
} );
}
} );
$( '#cn_refuse_code_fields' ).find( 'a' ).click( function ( e ) {
e.preventDefault();
$( '#cn_refuse_code_fields' ).find( 'a' ).removeClass( 'nav-tab-active' );
$( '.refuse-code-tab' ).removeClass( 'active' );
var id = $( this ).attr( 'id' ).replace( '-tab', '' );
$( '#' + id ).addClass( 'active' );
$( this ).addClass( 'nav-tab-active' );
} );
} );
$( document ).on( 'click', 'input#reset_cookie_notice_options', function () {
return confirm( cnArgs.resetToDefaults );
} );
} )( jQuery );

View File

@@ -0,0 +1 @@
!function(c){c(document).ready(function(){c(".cn_color").wpColorPicker(),c("#cn_refuse_opt").change(function(){c(this).is(":checked")?c("#cn_refuse_opt_container").slideDown("fast"):c("#cn_refuse_opt_container").slideUp("fast")}),c("#cn_revoke_cookies").change(function(){c(this).is(":checked")?c("#cn_revoke_opt_container").slideDown("fast"):c("#cn_revoke_opt_container").slideUp("fast")}),c("#cn_see_more").change(function(){c(this).is(":checked")?c("#cn_see_more_opt").slideDown("fast"):c("#cn_see_more_opt").slideUp("fast")}),c("#cn_on_scroll").change(function(){c(this).is(":checked")?c("#cn_on_scroll_offset").slideDown("fast"):c("#cn_on_scroll_offset").slideUp("fast")}),c("#cn_see_more_link-custom, #cn_see_more_link-page").change(function(){"custom"===c("#cn_see_more_link-custom:checked").val()?c("#cn_see_more_opt_page").slideUp("fast",function(){c("#cn_see_more_opt_link").slideDown("fast")}):"page"===c("#cn_see_more_link-page:checked").val()&&c("#cn_see_more_opt_link").slideUp("fast",function(){c("#cn_see_more_opt_page").slideDown("fast")})}),c("#cn_refuse_code_fields").find("a").click(function(e){e.preventDefault(),c("#cn_refuse_code_fields").find("a").removeClass("nav-tab-active"),c(".refuse-code-tab").removeClass("active");var n=c(this).attr("id").replace("-tab","");c("#"+n).addClass("active"),c(this).addClass("nav-tab-active")})}),c(document).on("click","input#reset_cookie_notice_options",function(){return confirm(cnArgs.resetToDefaults)})}(jQuery);

View File

@@ -0,0 +1,291 @@
( function ( $ ) {
// ready event
$( document ).ready( function () {
var notice = $( '#cookie-notice' ),
cookie = $.fn.getCookieNotice();
// handle set-cookie button click
$( document ).on( 'click', '.cn-set-cookie', function ( e ) {
e.preventDefault();
$( this ).setCookieNotice( $( this ).data( 'cookie-set' ) );
} );
// handle revoke button click
$( document ).on( 'click', '.cn-revoke-cookie', function ( e ) {
e.preventDefault();
if ( cnArgs.refuse === 'yes' ) {
var revoke = $( this );
if ( cnArgs.onScroll === 'yes' ) {
// enable cookie acceptance by scrolling again
$( window ).on( 'scroll', handleScroll );
}
if ( cnArgs.revoke_cookies === '1' ) {
// clicked shortcode button?
if ( revoke.hasClass( 'cn-revoke-inline' ) ) {
var body = $( 'body' );
// is cookie notice hidden?
if ( ! ( body.hasClass( 'cookies-revoke' ) || body.hasClass( 'cookies-not-set' ) ) ) {
// display automatic revoke button?
if ( cnArgs.revoke_cookies_opt === 'automatic' ) {
notice.showCookieNotice( 3 );
} else {
notice.showCookieNotice( 2 );
}
}
} else {
notice.showCookieNotice( 1 );
}
// update cookie value
cookie = $.fn.getCookieNotice();
// add body class
$.fn.setCookieNoticeBodyClass( 'cookies-set cookies-revoke ' + ( cookie === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
}
}
} );
// cookie is not set
if ( typeof cookie === 'undefined' ) {
// handle on scroll
if ( cnArgs.onScroll === 'yes' ) {
$( window ).on( 'scroll', handleScroll );
}
notice.showCookieNotice( 0 );
$.fn.setCookieNoticeBodyClass( 'cookies-not-set' );
// active refuse button?
} else if ( cnArgs.refuse === 'yes' ) {
if ( cnArgs.revoke_cookies === '1' ) {
if ( cnArgs.revoke_cookies_opt === 'automatic' ) {
notice.hideCookieNotice( 1 );
}
$.fn.setCookieNoticeBodyClass( 'cookies-set ' + ( cookie === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
}
// remove cookie notice
} else {
// add body class
$.fn.setCookieNoticeBodyClass( 'cookies-set ' + ( cookie === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
}
} );
// handle mouse scrolling
function handleScroll( event ) {
var win = $( this );
if ( win.scrollTop() > parseInt( cnArgs.onScrollOffset ) ) {
// accept cookie
win.setCookieNotice( 'accept' );
// remove itself after cookie accept
win.off( 'scroll', handleScroll );
}
};
// set Cookie Notice
$.fn.setCookieNotice = function ( cookie_value ) {
if ( cnArgs.onScroll === 'yes' ) {
$( window ).off( 'scroll', handleScroll );
}
var date = new Date(),
later_date = new Date(),
notice = $( '#cookie-notice' );
// set expiry time in seconds
later_date.setTime( parseInt( date.getTime() ) + parseInt( cnArgs.cookieTime ) * 1000 );
// set cookie
cookie_value = cookie_value === 'accept' ? 'true' : 'false';
document.cookie = cnArgs.cookieName + '=' + cookie_value + ';expires=' + later_date.toUTCString() + ';' + ( cnArgs.cookieDomain !== undefined && cnArgs.cookieDomain !== '' ? 'domain=' + cnArgs.cookieDomain + ';' : '' ) + ( cnArgs.cookiePath !== undefined && cnArgs.cookiePath !== '' ? 'path=' + cnArgs.cookiePath + ';' : '' ) + ( cnArgs.secure === '1' ? 'secure;' : '' );
// trigger custom event
$.event.trigger( {
type: 'setCookieNotice',
value: cookie_value,
time: date,
expires: later_date
} );
// add body class
$.fn.setCookieNoticeBodyClass( 'cookies-set ' + ( cookie_value === 'true' ? 'cookies-accepted' : 'cookies-refused' ) );
if ( cnArgs.refuse === 'yes' && cnArgs.revoke_cookies === '1' && cnArgs.revoke_cookies_opt === 'automatic' ) {
notice.hideCookieNotice( 2 );
} else {
notice.hideCookieNotice( 0 );
}
if ( cookie_value && cnArgs.redirection === '1' ) {
var url = window.location.protocol + '//',
hostname = window.location.host + '/' + window.location.pathname;
if ( cnArgs.cache === '1' ) {
url = url + hostname.replace( '//', '/' ) + ( window.location.search === '' ? '?' : window.location.search + '&' ) + 'cn-reloaded=1' + window.location.hash;
window.location.href = url;
} else {
url = url + hostname.replace( '//', '/' ) + window.location.search + window.location.hash;
window.location.reload( true );
}
return;
}
};
// add class(es) to body
$.fn.setCookieNoticeBodyClass = function( classes ) {
$( 'body' ).removeClass( 'cookies-revoke cookies-accepted cookies-refused cookies-set cookies-not-set' ).addClass( classes );
}
// get cookie value
$.fn.getCookieNotice = function () {
var value = "; " + document.cookie,
parts = value.split( '; cookie_notice_accepted=' );
if ( parts.length === 2 )
return parts.pop().split( ';' ).shift();
else
return;
}
// display cookie notice
$.fn.showCookieNotice = function( type ) {
// trigger custom event
$.event.trigger( {
type: 'showCookieNotice',
value: type,
data: cnArgs
} );
var notice = this;
switch ( type ) {
case 0:
if ( cnArgs.hideEffect === 'fade' ) {
// show cookie notice
notice.css( { 'visibility': 'visible', 'display': 'none' } ).fadeIn( 400 );
} else if ( cnArgs.hideEffect === 'slide' ) {
// show cookie notice
notice.css( { 'visibility': 'visible', 'display': 'none' } ).slideDown( 400 );
} else {
// show cookie notice
notice.css( { 'visibility': 'visible' } ).show();
}
break;
case 1:
if ( cnArgs.hideEffect === 'fade' ) {
// hide revoke button
notice.find( '.cookie-notice-revoke-container' ).fadeOut( 400, function () {
// show cookie notice
notice.css( { 'visibility': 'visible', 'display': 'none' } ).fadeIn( 400 );
} );
} else if ( cnArgs.hideEffect === 'slide' ) {
// hide revoke button
notice.find( '.cookie-notice-revoke-container' ).slideUp( 400, function () {
// show cookie notice
notice.css( { 'visibility': 'visible', 'display': 'none' } ).slideDown( 400 );
} );
} else {
// hide revoke button
notice.css( { 'visibility': 'visible' } ).find( '.cookie-notice-revoke-container' ).hide();
}
break;
case 2:
if ( cnArgs.hideEffect === 'fade' ) {
// show cookie notice
notice.css( { 'visibility': 'visible', 'display': 'none' } ).fadeIn( 400 );
} else if ( cnArgs.hideEffect === 'slide' ) {
// show cookie notice
notice.css( { 'visibility': 'visible', 'display': 'none' } ).slideDown( 400 );
} else {
// show cookie notice
notice.css( { 'visibility': 'visible' } );
}
break;
case 3:
if ( cnArgs.hideEffect === 'fade' ) {
// hide revoke button
notice.find( '.cookie-notice-revoke-container' ).fadeOut( 400, function () {
// show cookie notice
notice.css( { 'visibility': 'visible', 'display': 'none' } ).fadeIn( 400 );
} );
} else if ( cnArgs.hideEffect === 'slide' ) {
// hide revoke button
notice.find( '.cookie-notice-revoke-container' ).slideUp( 400, function () {
// show cookie notice
notice.css( { 'visibility': 'visible', 'display': 'none' } ).slideDown( 400 );
} );
} else {
// hide revoke button
notice.css( { 'visibility': 'visible' } ).find( '.cookie-notice-revoke-container' ).hide();
}
break;
}
}
// hide cookie notice
$.fn.hideCookieNotice = function ( type ) {
// trigger custom event
$.event.trigger( {
type: 'hideCookieNotice',
value: type,
data: cnArgs
} );
var notice = this,
display = this.css( 'display' );
switch ( type ) {
case 0:
if ( cnArgs.hideEffect === 'fade' ) {
notice.fadeOut( 400 );
} else if ( cnArgs.hideEffect === 'slide' ) {
notice.slideUp( 400 );
} else {
notice.css( { 'visibility': 'hidden' } );
}
break;
case 1:
if ( cnArgs.hideEffect === 'fade' ) {
notice.find( '.cookie-notice-revoke-container' ).hide().fadeIn( 400 ).css( { 'visibility': 'visible', 'display': 'block' } );
} else if ( cnArgs.hideEffect === 'slide' ) {
notice.find( '.cookie-notice-revoke-container' ).hide().slideDown( 400 ).css( { 'visibility': 'visible', 'display': 'block' } );
} else {
notice.find( '.cookie-notice-revoke-container' ).css( { 'visibility': 'visible', 'display': 'block' } );
}
break;
case 2:
if ( cnArgs.hideEffect === 'fade' ) {
notice.fadeOut( 400, function () {
// show revoke button
notice.css( { 'visibility': 'hidden', 'display': display } ).find( '.cookie-notice-revoke-container' ).hide().fadeIn( 400 ).css( { 'visibility': 'visible', 'display': 'block' } );
} );
} else if ( cnArgs.hideEffect === 'slide' ) {
notice.slideUp( 400, function () {
// show revoke button
notice.css( { 'visibility': 'hidden', 'display': display } ).find( '.cookie-notice-revoke-container' ).hide().slideDown( 400 ).css( { 'visibility': 'visible', 'display': 'block' } );
} );
} else {
// show revoke button
notice.css( { 'visibility': 'hidden' } ).find( '.cookie-notice-revoke-container' ).css( { 'visibility': 'visible', 'display': 'block' } );
}
break;
}
}
} )( jQuery );

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,378 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Cookie Notice\n"
"POT-Creation-Date: 2018-06-11 10:36+0200\n"
"PO-Revision-Date: 2015-03-24 11:30+0100\n"
"Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
"Language-Team: dFactory <info@dfactory.eu>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.8\n"
"X-Poedit-KeywordsList: gettext;gettext_noop;__;_e;_n\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-SearchPath-0: ..\n"
#: ../cookie-notice.php:134
msgid "Top"
msgstr ""
#: ../cookie-notice.php:135
msgid "Bottom"
msgstr ""
#: ../cookie-notice.php:139 ../cookie-notice.php:176
msgid "None"
msgstr ""
#: ../cookie-notice.php:140
msgid "WordPress"
msgstr ""
#: ../cookie-notice.php:141
msgid "Bootstrap"
msgstr ""
#: ../cookie-notice.php:145
msgid "Automatic"
msgstr ""
#: ../cookie-notice.php:146
msgid "Manual"
msgstr ""
#: ../cookie-notice.php:150
msgid "Page link"
msgstr ""
#: ../cookie-notice.php:151
msgid "Custom link"
msgstr ""
#: ../cookie-notice.php:160
msgid "Text color"
msgstr ""
#: ../cookie-notice.php:161
msgid "Bar color"
msgstr ""
#: ../cookie-notice.php:165
msgid "An hour"
msgstr ""
#: ../cookie-notice.php:166
msgid "1 day"
msgstr ""
#: ../cookie-notice.php:167
msgid "1 week"
msgstr ""
#: ../cookie-notice.php:168
msgid "1 month"
msgstr ""
#: ../cookie-notice.php:169
msgid "3 months"
msgstr ""
#: ../cookie-notice.php:170
msgid "6 months"
msgstr ""
#: ../cookie-notice.php:171
msgid "1 year"
msgstr ""
#: ../cookie-notice.php:172
msgid "infinity"
msgstr ""
#: ../cookie-notice.php:177
msgid "Fade"
msgstr ""
#: ../cookie-notice.php:178
msgid "Slide"
msgstr ""
#: ../cookie-notice.php:182
msgid "Header"
msgstr ""
#: ../cookie-notice.php:183
msgid "Footer"
msgstr ""
#: ../cookie-notice.php:189
msgid "We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it."
msgstr ""
#: ../cookie-notice.php:190
msgid "Ok"
msgstr ""
#: ../cookie-notice.php:191
msgid "No"
msgstr ""
#: ../cookie-notice.php:192 ../cookie-notice.php:394
msgid "Revoke cookies"
msgstr ""
#: ../cookie-notice.php:193 ../cookie-notice.php:391
msgid "Privacy policy"
msgstr ""
#: ../cookie-notice.php:335 ../cookie-notice.php:346 ../cookie-notice.php:349
msgid "Cookie Notice"
msgstr ""
#: ../cookie-notice.php:351
msgid "Need support?"
msgstr ""
#: ../cookie-notice.php:352
#, php-format
msgid "If you are having problems with this plugin, please browse it's <a href=\"%s\" target=\"_blank\">Documentation</a> or talk about them in the <a href=\"%s\" target=\"_blank\">Support forum</a>"
msgstr ""
#: ../cookie-notice.php:354
msgid "Do you like this plugin?"
msgstr ""
#: ../cookie-notice.php:355
#, php-format
msgid "<a href=\"%s\" target=\"_blank\">Rate it 5</a> on WordPress.org"
msgstr ""
#: ../cookie-notice.php:356
#, php-format
msgid "Blog about it & link to the <a href=\"%s\" target=\"_blank\">plugin page</a>."
msgstr ""
#: ../cookie-notice.php:357
#, php-format
msgid "Check out our other <a href=\"%s\" target=\"_blank\">WordPress plugins</a>."
msgstr ""
#: ../cookie-notice.php:372
msgid "Reset to defaults"
msgstr ""
#: ../cookie-notice.php:388
msgid "Configuration"
msgstr ""
#: ../cookie-notice.php:389
msgid "Message"
msgstr ""
#: ../cookie-notice.php:390
msgid "Button text"
msgstr ""
#: ../cookie-notice.php:392
msgid "Link target"
msgstr ""
#: ../cookie-notice.php:393
msgid "Refuse cookies"
msgstr ""
#: ../cookie-notice.php:395
msgid "Script blocking"
msgstr ""
#: ../cookie-notice.php:396
msgid "Reloading"
msgstr ""
#: ../cookie-notice.php:397
msgid "On scroll"
msgstr ""
#: ../cookie-notice.php:398
msgid "Cookie expiry"
msgstr ""
#: ../cookie-notice.php:399
msgid "Script placement"
msgstr ""
#: ../cookie-notice.php:400
msgid "Deactivation"
msgstr ""
#: ../cookie-notice.php:403
msgid "Design"
msgstr ""
#: ../cookie-notice.php:404
msgid "Position"
msgstr ""
#: ../cookie-notice.php:405
msgid "Animation"
msgstr ""
#: ../cookie-notice.php:406
msgid "Button style"
msgstr ""
#: ../cookie-notice.php:407
msgid "Button class"
msgstr ""
#: ../cookie-notice.php:408
msgid "Colors"
msgstr ""
#: ../cookie-notice.php:423
msgid "Enable if you want all plugin data to be deleted on deactivation."
msgstr ""
#: ../cookie-notice.php:435
msgid "Enter the cookie notice message."
msgstr ""
#: ../cookie-notice.php:448
msgid "The text of the option to accept the usage of the cookies and make the notification disappear."
msgstr ""
#: ../cookie-notice.php:459
msgid "Enable to give to the user the possibility to refuse third party non functional cookies."
msgstr ""
#: ../cookie-notice.php:463
msgid "The text of the button to refuse the usage of the cookies."
msgstr ""
#: ../cookie-notice.php:481
msgid "Head"
msgstr ""
#: ../cookie-notice.php:482
msgid "Body"
msgstr ""
#: ../cookie-notice.php:485
msgid "The code to be used in your site header, before the closing head tag."
msgstr ""
#: ../cookie-notice.php:489
msgid "The code to be used in your site footer, before the closing body tag."
msgstr ""
#: ../cookie-notice.php:493
msgid "Enter non functional cookies Javascript code here (for e.g. Google Analitycs) to be used after cookies are accepted."
msgstr ""
#: ../cookie-notice.php:493
msgid "To get the cookie notice status use <code>cn_cookies_accepted()</code> function."
msgstr ""
#: ../cookie-notice.php:504
msgid "Enable to give to the user the possibility to revoke their cookie consent <i>(requires \"Refuse cookies\" option enabled)</i>."
msgstr ""
#: ../cookie-notice.php:507
msgid "The text of the button to revoke the cookie consent."
msgstr ""
#: ../cookie-notice.php:515
msgid "Select the method for displaying the revoke button - automatic (in the Cookie Notice container) or manual using <code>[cookies_revoke]</code> shortcode."
msgstr ""
#: ../cookie-notice.php:526
msgid "Enable to reload the page after cookies are accepted."
msgstr ""
#: ../cookie-notice.php:549
msgid "Enable privacy policy link."
msgstr ""
#: ../cookie-notice.php:550
#, php-format
msgid "Need a Cookie Policy? Generate one with <a href=\"%s\" target=\"_blank\" title=\"iubenda\">iubenda</a>."
msgstr ""
#: ../cookie-notice.php:553
msgid "The text of the privacy policy button."
msgstr ""
#: ../cookie-notice.php:565
msgid "Select where to redirect user for more information about cookies."
msgstr ""
#: ../cookie-notice.php:568
msgid "-- select page --"
msgstr ""
#: ../cookie-notice.php:579
msgid "Select from one of your site's pages."
msgstr ""
#: ../cookie-notice.php:585
msgid "Synchronize with WordPress Privacy Policy page."
msgstr ""
#: ../cookie-notice.php:592
msgid "Enter the full URL starting with http(s)://"
msgstr ""
#: ../cookie-notice.php:614
msgid "Select the privacy policy link target."
msgstr ""
#: ../cookie-notice.php:637
msgid "The ammount of time that cookie should be stored for."
msgstr ""
#: ../cookie-notice.php:655
msgid "Select where all the plugin scripts should be placed."
msgstr ""
#: ../cookie-notice.php:675
msgid "Select location for your cookie notice."
msgstr ""
#: ../cookie-notice.php:696
msgid "Cookie notice acceptance animation."
msgstr ""
#: ../cookie-notice.php:707
msgid "Enable cookie notice acceptance when users scroll."
msgstr ""
#: ../cookie-notice.php:710
msgid "Number of pixels user has to scroll to accept the usage of the cookies and make the notification disappear."
msgstr ""
#: ../cookie-notice.php:731
msgid "Choose buttons style."
msgstr ""
#: ../cookie-notice.php:744
msgid "Enter additional button CSS classes separated by spaces."
msgstr ""
#: ../cookie-notice.php:870
msgid "Settings restored to defaults."
msgstr ""
#: ../cookie-notice.php:976
msgid "Support"
msgstr ""
#: ../cookie-notice.php:993
msgid "Settings"
msgstr ""
#: ../cookie-notice.php:1060
msgid "Are you sure you want to reset these settings to defaults?"
msgstr ""

View File

@@ -0,0 +1,267 @@
=== Cookie Notice for GDPR ===
Contributors: dfactory
Donate link: http://www.dfactory.eu/
Tags: gdpr, cookie, cookies, notice, notification, notify, cookie, cookie compliance, cookie law, eu cookie, privacy, privacy directive, consent
Requires at least: 3.3
Requires PHP: 5.2.4
Tested up to: 5.0.3
Stable tag: 1.2.46
License: MIT License
License URI: http://opensource.org/licenses/MIT
Cookie Notice allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law GDPR regulations.
== Description ==
[Cookie Notice](http://www.dfactory.eu/plugins/cookie-notice/) allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law GDPR regulations.
For more information, check out plugin page at [dFactory](http://www.dfactory.eu/) or plugin [support forum](http://www.dfactory.eu/support/forum/cookie-notice/).
= Features include: =
* Customizable cookie message
* Redirects users to specified page for more cookie information
* Multiple cookie expiry options
* Link to Privacy Policy page
* WordPress Privacy Policy page synchronization
* Option to accept cookies on scroll
* Option to set on scroll offset
* Option to refuse functional cookies
* Option to revoke the user consent
* Option to manually block scripts
* Option to reload the page after cookies are accepted
* Select the position of the cookie message box
* Animate the message box after cookie is accepted
* Select bottons style from None, WordPress and Bootstrap
* Set the text and bar background colors
* WPML and Polylang compatible
* SEO friendly
* .pot file for translations included
= Usage: =
If you'd like to code a functionality depending on the cookie notice value use the function below:
`if ( function_exists('cn_cookies_accepted') && cn_cookies_accepted() ) {
// Your third-party non functional code here
}`
= Get involved =
Feel free to contribute to the source code on the [dFactory GitHub Repository](https://github.com/dfactoryplugins).
== Installation ==
1. Install Cookie Notice either via the WordPress.org plugin directory, or by uploading the files to your server
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to the Cookie Notice settings and set your options.
== Frequently Asked Questions ==
No questions yet.
== Screenshots ==
1. screenshot-1.png
== Changelog ==
= 1.2.46 =
* Tweak: Remove WP Super Cache cookie on deactivation
* Tweak: Remove plugin version from the db on deactivation
= 1.2.45 =
* Tweak: Improved WP Super Cache support
* Tweak: CSS container style issue and media query for mobile
= 1.2.44 =
* Fix: The text of the revoke button ignored in shortcode
* Fix: Revoke consent button not displayed automatically in top position
* Tweak: Add shortcode parsing for content of [cookies_accepted], thanks to [dsturm](https://github.com/dsturm)
= 1.2.43 =
* New: Option to revoke the user consent
* New: Script blocking extended to header and footer
* New: Synchronization with WordPress 4.9.6 Privacy Policy page
* New: Custom button class option
* Tweak: Added 1 hour cookie expiry option
= 1.2.42 =
* New: Introducing [cookies_accepted][/cookies_accepted] shortcode
* Fix: Infinite cookie expiry issue
= 1.2.41 =
* Fix: Infinite redirection loop with scroll enabled
= 1.2.40 =
* Fix: Div align center on some themes
* Tweak: Extended list of allowed HTML tags in refuse code
* Tweak: Minified CSS and JS
= 1.2.39 =
* New: Option to reload the page after cookies are accepted
= 1.2.38 =
* Tweak: Move frontend cookie js functions before the document ready call, thanks to [fgreinus](https://github.com/fgreinus)
* Tweak: Adjust functional javascript code handling
* Fix: Chhromium infinity expiration date not valid
* Fix: Remove deprecated screen_icon() function
= 1.2.37 =
* Tweak: Add aria landmark role="banner"
* Tweak: Extend cn_cookie_notice_args with button class
= 1.2.36.1 =
* Fix: Repository upload issue with 1.2.36
= 1.2.36 =
* Fix: String translation support for WMPL 3.2+
* Fix: Global var possible conflict with other plugins
* Tweak: Add $options array to "cn_cookie_notice_output" filter, thanks to [chesio](https://github.com/chesio).
* Tweak: Removed local translation files in favor of WP repository translations.
= 1.2.35 =
* Tweak: Use html_entity_decode on non-functional code block
* Tweak: get_pages() function placement optimization
* Tweak: Filterable manage cookie notice capability
= 1.2.34 =
* Fix: Empty href in links HTML validation issue
= 1.2.33 =
* New: Greek translation thanks to Elias Stefanidis
= 1.2.32 =
* Fix: Accept cookie button hidden on acceptance instead of the cookie message container
= 1.2.31 =
* New: Non functional Javascript code field
* Fix: Minified Javascript caching issue
= 1.2.30 =
* Fix: jQuery error after accepting cookies
= 1.2.29 =
* Tweak: Add class to body element when displayed
* Tweak: Italian translation update
= 1.2.28 =
* New: Option to set on scroll offset
= 1.2.27 =
* Tweak: Correctly remove scroll event, limit possible conflicts
* Tweak: Italian translation update
= 1.2.26 =
* Fix: Accept cookies on scroll option working unchecked.
* Fix: call_user_func() warning on lower version of WP
= 1.2.25 =
* New: Option to accept cookies on scroll, thanks to [Cristian Pascottini](http://cristian.pascottini.net/)
= 1.2.24 =
* New: Option to refuse to accept cookies
* New: setCookieNotice custom jQuery event
* Tweak: Italian translation updated, thanks to Luca Speranza
= 1.2.23 =
* New: Finnish translation, thanks to [Daniel Storgards](www.danielstorgards.com)
= 1.2.22 =
* Tweak: Swedish translation updated, thx to Ove Kaufeldt
= 1.2.21 =
* New: Plugin development moved to [dFactory GitHub Repository](https://github.com/dfactoryplugins)
* Tweak: Code cleanup
= 1.2.20 =
* New: Option to select scripts placement, header or footer
= 1.2.19 =
* New: Danish translation, thanks to Lui Wallentin Gottler
= 1.2.18.1 =
* Fix: Quick fix for 1.2.18 print_r in code
= 1.2.18 =
* New: More info link target option
* Tweak: Additional HTML ids, for more flexible customization
= 1.2.17 =
* New: Hebrew translation, thanks to [Ahrale Shrem](http://atar4u.com/)
= 1.2.16 =
* Tweak: Dutch translation missing due to a typo
= 1.2.15 =
* New: Danish translation, thanks to Hans C. Jorgensen
* Fix: Notice bar not visible if no animation selected
= 1.2.14 =
* New: Hungarian translation, thanks to [Surbma](http://surbma.hu)
= 1.2.13 =
* New: Croatian translation, thanks to [Marko Beus](http://www.markobeus.com/)
= 1.2.12 =
* New: Slovenian translation, thanks to Thomas Cuk
= 1.2.11 =
* New: Swedish translation, thanks to [Daniel Storgards](http://www.danielstorgards.com/)
= 1.2.10 =
* New: Italian translation, thanks to [Luca](http://www.lucacicca.it)
* Tweak: Confirmed WP 4.0 compatibility
= 1.2.9.1 =
* Tweak: Enable HTML in cookie message text
* New: Option to donate this plugin :)
= 1.2.8 =
* New: Czech translation, thanks to [Adam Laita](http://laita.cz)
= 1.2.7 =
* New: French translation, thanks to [Laura Orsal](http://www.traductrice-independante.fr)
* New: Deleting plugin settings on deactivation as an option
= 1.2.6 =
* New: German translation, thanks to Alex Ernst
= 1.2.5 =
* New: Spanish translation, thanks to Fernando Blasco
= 1.2.4 =
* New: Added filter hooks to customize where and how display the cookie notice
= 1.2.3 =
* New: Portuguese translation, thanks to Luis Maia
= 1.2.2 =
* Fix: Read more linking to default site language in WPML & Polylang
= 1.2.1 =
* Tweak: UI improvements for WP 3.8
= 1.2.0 =
* Fix: Cookie not saving in IE
* Fix: Notice hidden under Admin bar bug
* Tweak: Improved WPML & Polylang compatibility
= 1.1.0 =
* New: Rewritten cookie setting method to pure JS
* Fix: Compatibility with WP Super Cache and other caching plugins
= 1.0.2 =
* New: Dutch translation, thanks to Heleen van den Bos
= 1.0.1 =
* Tweak: Changed setting cookie mode from AJAX to JS driven
= 1.0.0 =
Initial release
== Upgrade Notice ==
= 1.2.46 =
* Tweak: Remove WP Super Cache cookie on deactivation
* Tweak: Remove plugin version from the db on deactivation