Version Description
Escaped text strings for echoing in JS & option field descriptions.
Download this release
Release Info
Developer | wunderfarm |
Plugin | WF Cookie Consent |
Version | 0.8.4 |
Comparing to | |
See all releases |
Code changes from version 0.8.3 to 0.8.4
- readme.txt +5 -2
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- wf-cookie-consent.php +10 -7
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: wunderfarm
|
3 |
Donate link: http://wunderfarm.com/
|
4 |
-
Tags: compliance, cookie law, cookielaw, cookies, eu cookie law, eu privacy directive, privacy, privacy directive, cookie consent, cookieconsent, Multi language, WPML, polylang, responsive
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.2.2
|
7 |
-
Stable tag: 0.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -29,6 +29,9 @@ WF Cookie Consent is the "wunderfarm-way" to show how your website complies with
|
|
29 |
|
30 |
== Changelog ==
|
31 |
|
|
|
|
|
|
|
32 |
= 0.8.3 =
|
33 |
Bugfix: Custom settings with Polylang
|
34 |
|
1 |
=== Plugin Name ===
|
2 |
Contributors: wunderfarm
|
3 |
Donate link: http://wunderfarm.com/
|
4 |
+
Tags: compliance, cookie law, cookielaw, cookies, cookiebar, policy, bar, eu cookie law, cookie law banner, cookiechoices, eu privacy directive, privacy, privacy directive, cookie consent, cookieconsent, Multi language, WPML, polylang, responsive, admin, code, content, embed, google, html, integration, javascript, links, login, marketing, page, pages, plugin, simple, text, url, wordpress, law,
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 4.2.2
|
7 |
+
Stable tag: 0.8.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
+
= 0.8.4 =
|
33 |
+
Escaped text strings for echoing in JS & option field descriptions.
|
34 |
+
|
35 |
= 0.8.3 =
|
36 |
Bugfix: Custom settings with Polylang
|
37 |
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
wf-cookie-consent.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WF Cookie Consent
|
4 |
Plugin URI: http://www.wunderfarm.com/plugins/wf-cookie-consent
|
5 |
Description: The wunderfarm-way to show how your website complies with the EU Cookie Law.
|
6 |
-
Version: 0.8.
|
7 |
License: GNU General Public License v2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Author: wunderfarm
|
@@ -43,7 +43,7 @@
|
|
43 |
|
44 |
?>
|
45 |
<script type="text/javascript">
|
46 |
-
document.addEventListener('DOMContentLoaded', function(event) { cookieChoices.showCookieBar({ linkHref: '<?php echo $linkHref; ?>', dismissText: '<?php echo $dismissText; ?>', position: '<?php echo $position; ?>', cookieText:'<?php echo $cookieText; ?>', linkText: '<?php echo $linkText; ?>', language: '<?php echo $language; ?>'}) });
|
47 |
</script>
|
48 |
<?php
|
49 |
|
@@ -89,14 +89,14 @@ function plugin_admin_init(){
|
|
89 |
register_setting( 'wf_cookieconsent_options', 'wf_cookieconsent_options' );
|
90 |
|
91 |
add_settings_section('plugin_main', 'General settings', '', 'wf-cookieconsent');
|
92 |
-
add_settings_field('wf_position', esc_html__('Position'), 'plugin_setting_radio', 'wf-cookieconsent', 'plugin_main', array( 'fieldname' => 'wf_position','radioFields' => array( 'top' , 'bottom') ) );
|
93 |
|
94 |
foreach(wf_get_languages() as $lang){
|
95 |
add_settings_section('plugin_main_' . $lang, 'Custom settings (' . $lang . ')', '', 'wf-cookieconsent');
|
96 |
-
add_settings_field('wf_linkhref', esc_html__('Page to provide more information'), 'plugin_setting_page_selector', 'wf-cookieconsent', 'plugin_main_' . $lang, array( 'fieldname' => 'wf_linkhref', 'lang' => $lang ) );
|
97 |
-
add_settings_field('wf_linktext', esc_html__('
|
98 |
-
add_settings_field('wf_cookietext', esc_html__('
|
99 |
-
add_settings_field('wf_dismisstext', esc_html__('
|
100 |
}
|
101 |
}
|
102 |
|
@@ -107,6 +107,7 @@ function plugin_setting_string($args) {
|
|
107 |
$options[$args['lang']][$args['fieldname']] = '';
|
108 |
|
109 |
echo "<input id='plugin_text_string' name='wf_cookieconsent_options[{$args['lang']}][{$args['fieldname']}]' size='40' type='text' value='{$options[$args['lang']][$args['fieldname']]}' />";
|
|
|
110 |
}
|
111 |
|
112 |
function plugin_setting_page_selector($args) {
|
@@ -119,6 +120,7 @@ function plugin_setting_page_selector($args) {
|
|
119 |
'name' => 'wf_cookieconsent_options['.$args['lang'].']['.$args['fieldname'].']',
|
120 |
'selected' => $options[$args['lang']][$args['fieldname']],
|
121 |
'show_option_none' => ' '));
|
|
|
122 |
}
|
123 |
|
124 |
function plugin_setting_radio($args) {
|
@@ -133,6 +135,7 @@ function plugin_setting_radio($args) {
|
|
133 |
echo "<input type='radio' id='' name='wf_cookieconsent_options[{$args['fieldname']}]' value='{$radioField}'" . ($radioField == $options[$args['fieldname']] ? 'checked' : '')."><label for=''>" . $radioField . "</label><br />";
|
134 |
}
|
135 |
}
|
|
|
136 |
echo "</fieldset>";
|
137 |
}
|
138 |
|
3 |
Plugin Name: WF Cookie Consent
|
4 |
Plugin URI: http://www.wunderfarm.com/plugins/wf-cookie-consent
|
5 |
Description: The wunderfarm-way to show how your website complies with the EU Cookie Law.
|
6 |
+
Version: 0.8.4
|
7 |
License: GNU General Public License v2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Author: wunderfarm
|
43 |
|
44 |
?>
|
45 |
<script type="text/javascript">
|
46 |
+
document.addEventListener('DOMContentLoaded', function(event) { cookieChoices.showCookieBar({ linkHref: '<?php echo esc_js($linkHref); ?>', dismissText: '<?php echo esc_js($dismissText); ?>', position: '<?php echo esc_js($position); ?>', cookieText:'<?php echo esc_js($cookieText); ?>', linkText: '<?php echo esc_js($linkText); ?>', language: '<?php echo esc_js($language); ?>'}) });
|
47 |
</script>
|
48 |
<?php
|
49 |
|
89 |
register_setting( 'wf_cookieconsent_options', 'wf_cookieconsent_options' );
|
90 |
|
91 |
add_settings_section('plugin_main', 'General settings', '', 'wf-cookieconsent');
|
92 |
+
add_settings_field('wf_position', esc_html__('Position'), 'plugin_setting_radio', 'wf-cookieconsent', 'plugin_main', array( 'fieldname' => 'wf_position', 'fielddescription' => 'Choose the position for the infobar', 'radioFields' => array( 'top' , 'bottom') ) );
|
93 |
|
94 |
foreach(wf_get_languages() as $lang){
|
95 |
add_settings_section('plugin_main_' . $lang, 'Custom settings (' . $lang . ')', '', 'wf-cookieconsent');
|
96 |
+
add_settings_field('wf_linkhref', esc_html__('Page to provide more information'), 'plugin_setting_page_selector', 'wf-cookieconsent', 'plugin_main_' . $lang, array( 'fieldname' => 'wf_linkhref', 'fielddescription' => '', 'lang' => $lang ) );
|
97 |
+
add_settings_field('wf_linktext', esc_html__('Link text to provide more information'), 'plugin_setting_string', 'wf-cookieconsent', 'plugin_main_' . $lang, array( 'fieldname' => 'wf_linktext', 'fielddescription' => '', 'lang' => $lang ) );
|
98 |
+
add_settings_field('wf_cookietext', esc_html__('Info text'), 'plugin_setting_string', 'wf-cookieconsent', 'plugin_main_' . $lang, array( 'fieldname' => 'wf_cookietext', 'fielddescription' => '', 'lang' => $lang ) );
|
99 |
+
add_settings_field('wf_dismisstext', esc_html__('Dismiss text'), 'plugin_setting_string', 'wf-cookieconsent', 'plugin_main_' . $lang, array( 'fieldname' => 'wf_dismisstext', 'fielddescription' => '', 'lang' => $lang ) );
|
100 |
}
|
101 |
}
|
102 |
|
107 |
$options[$args['lang']][$args['fieldname']] = '';
|
108 |
|
109 |
echo "<input id='plugin_text_string' name='wf_cookieconsent_options[{$args['lang']}][{$args['fieldname']}]' size='40' type='text' value='{$options[$args['lang']][$args['fieldname']]}' />";
|
110 |
+
echo (empty($args['fielddescription']) ? '' : "<p class='description'>". $args['fielddescription'] ."</p>");
|
111 |
}
|
112 |
|
113 |
function plugin_setting_page_selector($args) {
|
120 |
'name' => 'wf_cookieconsent_options['.$args['lang'].']['.$args['fieldname'].']',
|
121 |
'selected' => $options[$args['lang']][$args['fieldname']],
|
122 |
'show_option_none' => ' '));
|
123 |
+
echo (empty($args['fielddescription']) ? '' : "<p class='description'>". $args['fielddescription'] ."</p>");
|
124 |
}
|
125 |
|
126 |
function plugin_setting_radio($args) {
|
135 |
echo "<input type='radio' id='' name='wf_cookieconsent_options[{$args['fieldname']}]' value='{$radioField}'" . ($radioField == $options[$args['fieldname']] ? 'checked' : '')."><label for=''>" . $radioField . "</label><br />";
|
136 |
}
|
137 |
}
|
138 |
+
echo (empty($args['fielddescription']) ? '' : "<p class='description'>". $args['fielddescription'] ."</p>");
|
139 |
echo "</fieldset>";
|
140 |
}
|
141 |
|