Cookie Law / GDPR Info - Version 1.6.7

Version Description

  • In the previous update a title with default text This website uses cookies would get added to the existing cookie bar. In this update this title will get removed to that it is blank by default. In case you need this to be added again you need to explicitly add suitable content for the title.
  • Addressed the conflict with [cookie_reject] shortcode for previous users who had the reject button option enabled.
  • Optimized the plugin js and css assets to render only in plugin pages.
Download this release

Release Info

Developer webtoffee
Plugin Icon Cookie Law / GDPR Info
Version 1.6.7
Comparing to
See all releases

Code changes from version 1.6.6 to 1.6.7

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.webtoffee.com/plugins/
4
  Tags: eu cookie law, GDPR, cookie law, cookie consent, eu privacy directive, privacy directive, cookies, privacy, compliance
5
  Requires at least: 3.3.1
6
  Tested up to: 4.9.8
7
- Stable tag: 1.6.5
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -173,6 +173,12 @@ See http://cookielawinfo.com for more information on what is required.
173
 
174
  == Changelog ==
175
 
 
 
 
 
 
 
176
  = 1.6.6 =
177
 
178
  * Improved UI.
@@ -319,3 +325,8 @@ See http://cookielawinfo.com for more information on what is required.
319
  = 1.6.6 =
320
  * Improved UI.
321
  * Enhancements to cookie message bar - included title and option for overlay layout.
 
 
 
 
 
4
  Tags: eu cookie law, GDPR, cookie law, cookie consent, eu privacy directive, privacy directive, cookies, privacy, compliance
5
  Requires at least: 3.3.1
6
  Tested up to: 4.9.8
7
+ Stable tag: 1.6.7
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
173
 
174
  == Changelog ==
175
 
176
+ = 1.6.7 =
177
+
178
+ * In the previous update a title with default text ‘This website uses cookies‘ would get added to the existing cookie bar. In this update this title will get removed to that it is blank by default. In case you need this to be added again you need to explicitly add suitable content for the title.
179
+ * Addressed the conflict with [cookie_reject] shortcode for previous users who had the reject button option enabled.
180
+ * Optimized the plugin js and css assets to render only in plugin pages.
181
+
182
  = 1.6.6 =
183
 
184
  * Improved UI.
325
  = 1.6.6 =
326
  * Improved UI.
327
  * Enhancements to cookie message bar - included title and option for overlay layout.
328
+
329
+ = 1.6.7 =
330
+ * In the previous update a title with default text ‘This website uses cookies‘ would get added to the existing cookie bar. In this update this title will get removed to that it is blank by default. In case you need this to be added again you need to explicitly add suitable content for the title.
331
+ * Addressed the conflict with [cookie_reject] shortcode for previous users who had the reject button option enabled.
332
+ * Optimized the plugin js and css assets to render only in plugin pages.
admin/class-cookie-law-info-admin.php CHANGED
@@ -4,7 +4,7 @@
4
  * The admin-specific functionality of the plugin.
5
  *
6
  * @link http://cookielawinfo.com/
7
- * @since 1.6.6
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/admin
@@ -25,7 +25,7 @@ class Cookie_Law_Info_Admin {
25
  /**
26
  * The ID of this plugin.
27
  *
28
- * @since 1.6.6
29
  * @access private
30
  * @var string $plugin_name The ID of this plugin.
31
  */
@@ -34,7 +34,7 @@ class Cookie_Law_Info_Admin {
34
  /**
35
  * The version of this plugin.
36
  *
37
- * @since 1.6.6
38
  * @access private
39
  * @var string $version The current version of this plugin.
40
  */
@@ -53,7 +53,7 @@ class Cookie_Law_Info_Admin {
53
  /**
54
  * Initialize the class and set its properties.
55
  *
56
- * @since 1.6.6
57
  * @param string $plugin_name The name of this plugin.
58
  * @param string $version The version of this plugin.
59
  */
@@ -67,7 +67,7 @@ class Cookie_Law_Info_Admin {
67
  /**
68
  * Register the stylesheets for the admin area.
69
  *
70
- * @since 1.6.6
71
  */
72
  public function enqueue_styles() {
73
 
@@ -83,14 +83,14 @@ class Cookie_Law_Info_Admin {
83
  * class.
84
  */
85
  wp_enqueue_style( 'wp-color-picker' );
86
- wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/cookie-law-info-admin-'.$this->version.'.css', array(), null, 'all' );
87
 
88
  }
89
 
90
  /**
91
  * Register the JavaScript for the admin area.
92
  *
93
- * @since 1.6.6
94
  */
95
  public function enqueue_scripts() {
96
 
@@ -106,7 +106,7 @@ class Cookie_Law_Info_Admin {
106
  * class.
107
  */
108
 
109
- wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cookie-law-info-admin-'.$this->version.'.js', array( 'jquery' ,'wp-color-picker'), null, false );
110
 
111
  }
112
 
@@ -164,6 +164,8 @@ class Cookie_Law_Info_Admin {
164
 
165
  public function admin_non_necessary_cookie_page()
166
  {
 
 
167
  $options = array('thirdparty_on_field',
168
  'thirdparty_head_section',
169
  'thirdparty_body_section',
@@ -218,6 +220,8 @@ class Cookie_Law_Info_Admin {
218
  */
219
  public function admin_settings_page()
220
  {
 
 
221
  // Lock out non-admins:
222
  if (!current_user_can('manage_options'))
223
  {
4
  * The admin-specific functionality of the plugin.
5
  *
6
  * @link http://cookielawinfo.com/
7
+ * @since 1.6.7
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/admin
25
  /**
26
  * The ID of this plugin.
27
  *
28
+ * @since 1.6.7
29
  * @access private
30
  * @var string $plugin_name The ID of this plugin.
31
  */
34
  /**
35
  * The version of this plugin.
36
  *
37
+ * @since 1.6.7
38
  * @access private
39
  * @var string $version The current version of this plugin.
40
  */
53
  /**
54
  * Initialize the class and set its properties.
55
  *
56
+ * @since 1.6.7
57
  * @param string $plugin_name The name of this plugin.
58
  * @param string $version The version of this plugin.
59
  */
67
  /**
68
  * Register the stylesheets for the admin area.
69
  *
70
+ * @since 1.6.7
71
  */
72
  public function enqueue_styles() {
73
 
83
  * class.
84
  */
85
  wp_enqueue_style( 'wp-color-picker' );
86
+ wp_register_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/cookie-law-info-admin-'.$this->version.'.css', array(), null, 'all' );
87
 
88
  }
89
 
90
  /**
91
  * Register the JavaScript for the admin area.
92
  *
93
+ * @since 1.6.7
94
  */
95
  public function enqueue_scripts() {
96
 
106
  * class.
107
  */
108
 
109
+ wp_register_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cookie-law-info-admin-'.$this->version.'.js', array( 'jquery' ,'wp-color-picker'), null, false );
110
 
111
  }
112
 
164
 
165
  public function admin_non_necessary_cookie_page()
166
  {
167
+ wp_enqueue_style($this->plugin_name);
168
+ wp_enqueue_script($this->plugin_name);
169
  $options = array('thirdparty_on_field',
170
  'thirdparty_head_section',
171
  'thirdparty_body_section',
220
  */
221
  public function admin_settings_page()
222
  {
223
+ wp_enqueue_style($this->plugin_name);
224
+ wp_enqueue_script($this->plugin_name);
225
  // Lock out non-admins:
226
  if (!current_user_can('manage_options'))
227
  {
admin/css/{cookie-law-info-admin-1.6.6.css → cookie-law-info-admin-1.6.7.css} RENAMED
File without changes
admin/js/{cookie-law-info-admin-1.6.6.js → cookie-law-info-admin-1.6.7.js} RENAMED
File without changes
admin/views/admin-settings-help.php CHANGED
@@ -82,7 +82,7 @@ if ( ! defined( 'WPINC' ) ) {
82
  <img src="<?php echo $admin_img_path;?>support.png">
83
  <h3><?php _e('Help and Support', 'cookie-law-info'); ?></h3>
84
  <p><?php _e('We would love to help you on any queries or issues.', 'cookie-law-info'); ?></p>
85
- <a target="_blank" href="https://www.webtoffee.com/support/" class="button button-primary">
86
  <?php _e('Contact Us', 'cookie-law-info'); ?>
87
  </a>
88
  </li>
82
  <img src="<?php echo $admin_img_path;?>support.png">
83
  <h3><?php _e('Help and Support', 'cookie-law-info'); ?></h3>
84
  <p><?php _e('We would love to help you on any queries or issues.', 'cookie-law-info'); ?></p>
85
+ <a target="_blank" href="https://wordpress.org/support/plugin/cookie-law-info/" class="button button-primary">
86
  <?php _e('Contact Us', 'cookie-law-info'); ?>
87
  </a>
88
  </li>
admin/views/goto-pro.php CHANGED
@@ -96,7 +96,7 @@
96
 
97
  <div class="cli_gopro_block">
98
  <h3 style="text-align: center;"><?php echo __('Like this plugin?','cookie-law-info'); ?></h3>
99
- <p><?php echo __('If you find this plugin useful please show your support and rate it','cookie-law-info'); ?> <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info" target="_blank" style="color: #ffc600; text-decoration: none;">★★★★★</a><?php echo __(' on','cookie-law-info'); ?> <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info?filter=5" target="_blank">WordPress.org</a> -<?php echo __(' much appreciated!','cookie-law-info'); ?> :)</p>
100
  </div>
101
 
102
  <!-- <div>
96
 
97
  <div class="cli_gopro_block">
98
  <h3 style="text-align: center;"><?php echo __('Like this plugin?','cookie-law-info'); ?></h3>
99
+ <p><?php echo __('If you find this plugin useful please show your support and rate it','cookie-law-info'); ?> <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info" target="_blank" style="color: #ffc600; text-decoration: none;">★★★★★</a><?php echo __(' on','cookie-law-info'); ?> <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info" target="_blank">WordPress.org</a> -<?php echo __(' much appreciated!','cookie-law-info'); ?> :)</p>
100
  </div>
101
 
102
  <!-- <div>
cookie-law-info.php CHANGED
@@ -9,14 +9,14 @@
9
  * that starts the plugin.
10
  *
11
  * @link https://www.webtoffee.com/product/gdpr-cookie-consent/
12
- * @since 1.6.6
13
  * @package Cookie_Law_Info
14
  *
15
  * @wordpress-plugin
16
  * Plugin Name: GDPR Cookie Consent
17
  * Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
18
  * Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
19
- * Version: 1.6.6
20
  * Author: WebToffee
21
  * Author URI: http://cookielawinfo.com/
22
  * License: GPLv3
@@ -63,7 +63,7 @@ define ( 'CLI_POST_TYPE','cookielawinfo');
63
  * Currently plugin version.
64
  * Rename this for your plugin and update it as you release new versions.
65
  */
66
- define( 'CLI_VERSION', '1.6.6' );
67
 
68
 
69
  /**
@@ -144,7 +144,7 @@ require plugin_dir_path( __FILE__ ) . 'includes/class-cookie-law-info.php';
144
  * then kicking off the plugin from this point in the file does
145
  * not affect the page life cycle.
146
  *
147
- * @since 1.6.6
148
  */
149
  function run_cookie_law_info() {
150
 
9
  * that starts the plugin.
10
  *
11
  * @link https://www.webtoffee.com/product/gdpr-cookie-consent/
12
+ * @since 1.6.7
13
  * @package Cookie_Law_Info
14
  *
15
  * @wordpress-plugin
16
  * Plugin Name: GDPR Cookie Consent
17
  * Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
18
  * Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
19
+ * Version: 1.6.7
20
  * Author: WebToffee
21
  * Author URI: http://cookielawinfo.com/
22
  * License: GPLv3
63
  * Currently plugin version.
64
  * Rename this for your plugin and update it as you release new versions.
65
  */
66
+ define( 'CLI_VERSION', '1.6.7' );
67
 
68
 
69
  /**
144
  * then kicking off the plugin from this point in the file does
145
  * not affect the page life cycle.
146
  *
147
+ * @since 1.6.7
148
  */
149
  function run_cookie_law_info() {
150
 
includes/class-cookie-law-info-activator.php CHANGED
@@ -4,7 +4,7 @@
4
  * Fired during plugin activation
5
  *
6
  * @link http://cookielawinfo.com/
7
- * @since 1.6.6
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/includes
@@ -15,7 +15,7 @@
15
  *
16
  * This class defines all code necessary to run during the plugin's activation.
17
  *
18
- * @since 1.6.6
19
  * @package Cookie_Law_Info
20
  * @subpackage Cookie_Law_Info/includes
21
  * @author WebToffee <info@webtoffee.com>
@@ -27,7 +27,7 @@ class Cookie_Law_Info_Activator {
27
  *
28
  * Long Description.
29
  *
30
- * @since 1.6.6
31
  */
32
  public static function activate()
33
  {
4
  * Fired during plugin activation
5
  *
6
  * @link http://cookielawinfo.com/
7
+ * @since 1.6.7
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/includes
15
  *
16
  * This class defines all code necessary to run during the plugin's activation.
17
  *
18
+ * @since 1.6.7
19
  * @package Cookie_Law_Info
20
  * @subpackage Cookie_Law_Info/includes
21
  * @author WebToffee <info@webtoffee.com>
27
  *
28
  * Long Description.
29
  *
30
+ * @since 1.6.7
31
  */
32
  public static function activate()
33
  {
includes/class-cookie-law-info-deactivator.php CHANGED
@@ -4,7 +4,7 @@
4
  * Fired during plugin deactivation
5
  *
6
  * @link http://cookielawinfo.com/
7
- * @since 1.6.6
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/includes
@@ -15,7 +15,7 @@
15
  *
16
  * This class defines all code necessary to run during the plugin's deactivation.
17
  *
18
- * @since 1.6.6
19
  * @package Cookie_Law_Info
20
  * @subpackage Cookie_Law_Info/includes
21
  * @author WebToffee <info@webtoffee.com>
@@ -27,7 +27,7 @@ class Cookie_Law_Info_Deactivator {
27
  *
28
  * Long Description.
29
  *
30
- * @since 1.6.6
31
  */
32
  public static function deactivate()
33
  {
4
  * Fired during plugin deactivation
5
  *
6
  * @link http://cookielawinfo.com/
7
+ * @since 1.6.7
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/includes
15
  *
16
  * This class defines all code necessary to run during the plugin's deactivation.
17
  *
18
+ * @since 1.6.7
19
  * @package Cookie_Law_Info
20
  * @subpackage Cookie_Law_Info/includes
21
  * @author WebToffee <info@webtoffee.com>
27
  *
28
  * Long Description.
29
  *
30
+ * @since 1.6.7
31
  */
32
  public static function deactivate()
33
  {
includes/class-cookie-law-info-i18n.php CHANGED
@@ -7,7 +7,7 @@
7
  * so that it is ready for translation.
8
  *
9
  * @link http://cookielawinfo.com/
10
- * @since 1.6.6
11
  *
12
  * @package Cookie_Law_Info
13
  * @subpackage Cookie_Law_Info/includes
@@ -19,7 +19,7 @@
19
  * Loads and defines the internationalization files for this plugin
20
  * so that it is ready for translation.
21
  *
22
- * @since 1.6.6
23
  * @package Cookie_Law_Info
24
  * @subpackage Cookie_Law_Info/includes
25
  * @author WebToffee <info@webtoffee.com>
@@ -30,7 +30,7 @@ class Cookie_Law_Info_i18n {
30
  /**
31
  * Load the plugin text domain for translation.
32
  *
33
- * @since 1.6.6
34
  */
35
  public function load_plugin_textdomain() {
36
  load_plugin_textdomain(
7
  * so that it is ready for translation.
8
  *
9
  * @link http://cookielawinfo.com/
10
+ * @since 1.6.7
11
  *
12
  * @package Cookie_Law_Info
13
  * @subpackage Cookie_Law_Info/includes
19
  * Loads and defines the internationalization files for this plugin
20
  * so that it is ready for translation.
21
  *
22
+ * @since 1.6.7
23
  * @package Cookie_Law_Info
24
  * @subpackage Cookie_Law_Info/includes
25
  * @author WebToffee <info@webtoffee.com>
30
  /**
31
  * Load the plugin text domain for translation.
32
  *
33
+ * @since 1.6.7
34
  */
35
  public function load_plugin_textdomain() {
36
  load_plugin_textdomain(
includes/class-cookie-law-info-loader.php CHANGED
@@ -4,7 +4,7 @@
4
  * Register all actions and filters for the plugin
5
  *
6
  * @link http://cookielawinfo.com/
7
- * @since 1.6.6
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/includes
@@ -26,7 +26,7 @@ class Cookie_Law_Info_Loader {
26
  /**
27
  * The array of actions registered with WordPress.
28
  *
29
- * @since 1.6.6
30
  * @access protected
31
  * @var array $actions The actions registered with WordPress to fire when the plugin loads.
32
  */
@@ -35,7 +35,7 @@ class Cookie_Law_Info_Loader {
35
  /**
36
  * The array of filters registered with WordPress.
37
  *
38
- * @since 1.6.6
39
  * @access protected
40
  * @var array $filters The filters registered with WordPress to fire when the plugin loads.
41
  */
@@ -44,7 +44,7 @@ class Cookie_Law_Info_Loader {
44
  /**
45
  * Initialize the collections used to maintain the actions and filters.
46
  *
47
- * @since 1.6.6
48
  */
49
  public function __construct() {
50
 
@@ -56,7 +56,7 @@ class Cookie_Law_Info_Loader {
56
  /**
57
  * Add a new action to the collection to be registered with WordPress.
58
  *
59
- * @since 1.6.6
60
  * @param string $hook The name of the WordPress action that is being registered.
61
  * @param object $component A reference to the instance of the object on which the action is defined.
62
  * @param string $callback The name of the function definition on the $component.
@@ -70,7 +70,7 @@ class Cookie_Law_Info_Loader {
70
  /**
71
  * Add a new filter to the collection to be registered with WordPress.
72
  *
73
- * @since 1.6.6
74
  * @param string $hook The name of the WordPress filter that is being registered.
75
  * @param object $component A reference to the instance of the object on which the filter is defined.
76
  * @param string $callback The name of the function definition on the $component.
@@ -85,7 +85,7 @@ class Cookie_Law_Info_Loader {
85
  * A utility function that is used to register the actions and hooks into a single
86
  * collection.
87
  *
88
- * @since 1.6.6
89
  * @access private
90
  * @param array $hooks The collection of hooks that is being registered (that is, actions or filters).
91
  * @param string $hook The name of the WordPress filter that is being registered.
@@ -112,7 +112,7 @@ class Cookie_Law_Info_Loader {
112
  /**
113
  * Register the filters and actions with WordPress.
114
  *
115
- * @since 1.6.6
116
  */
117
  public function run() {
118
 
4
  * Register all actions and filters for the plugin
5
  *
6
  * @link http://cookielawinfo.com/
7
+ * @since 1.6.7
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/includes
26
  /**
27
  * The array of actions registered with WordPress.
28
  *
29
+ * @since 1.6.7
30
  * @access protected
31
  * @var array $actions The actions registered with WordPress to fire when the plugin loads.
32
  */
35
  /**
36
  * The array of filters registered with WordPress.
37
  *
38
+ * @since 1.6.7
39
  * @access protected
40
  * @var array $filters The filters registered with WordPress to fire when the plugin loads.
41
  */
44
  /**
45
  * Initialize the collections used to maintain the actions and filters.
46
  *
47
+ * @since 1.6.7
48
  */
49
  public function __construct() {
50
 
56
  /**
57
  * Add a new action to the collection to be registered with WordPress.
58
  *
59
+ * @since 1.6.7
60
  * @param string $hook The name of the WordPress action that is being registered.
61
  * @param object $component A reference to the instance of the object on which the action is defined.
62
  * @param string $callback The name of the function definition on the $component.
70
  /**
71
  * Add a new filter to the collection to be registered with WordPress.
72
  *
73
+ * @since 1.6.7
74
  * @param string $hook The name of the WordPress filter that is being registered.
75
  * @param object $component A reference to the instance of the object on which the filter is defined.
76
  * @param string $callback The name of the function definition on the $component.
85
  * A utility function that is used to register the actions and hooks into a single
86
  * collection.
87
  *
88
+ * @since 1.6.7
89
  * @access private
90
  * @param array $hooks The collection of hooks that is being registered (that is, actions or filters).
91
  * @param string $hook The name of the WordPress filter that is being registered.
112
  /**
113
  * Register the filters and actions with WordPress.
114
  *
115
+ * @since 1.6.7
116
  */
117
  public function run() {
118
 
includes/class-cookie-law-info.php CHANGED
@@ -7,7 +7,7 @@
7
  * public-facing side of the site and the admin area.
8
  *
9
  * @link http://cookielawinfo.com/
10
- * @since 1.6.6
11
  *
12
  * @package Cookie_Law_Info
13
  * @subpackage Cookie_Law_Info/includes
@@ -22,7 +22,7 @@
22
  * Also maintains the unique identifier of this plugin as well as the current
23
  * version of the plugin.
24
  *
25
- * @since 1.6.6
26
  * @package Cookie_Law_Info
27
  * @subpackage Cookie_Law_Info/includes
28
  * @author WebToffee <info@webtoffee.com>
@@ -33,7 +33,7 @@ class Cookie_Law_Info {
33
  * The loader that's responsible for maintaining and registering all hooks that power
34
  * the plugin.
35
  *
36
- * @since 1.6.6
37
  * @access protected
38
  * @var Cookie_Law_Info_Loader $loader Maintains and registers all hooks for the plugin.
39
  */
@@ -42,7 +42,7 @@ class Cookie_Law_Info {
42
  /**
43
  * The unique identifier of this plugin.
44
  *
45
- * @since 1.6.6
46
  * @access protected
47
  * @var string $plugin_name The string used to uniquely identify this plugin.
48
  */
@@ -51,7 +51,7 @@ class Cookie_Law_Info {
51
  /**
52
  * The current version of the plugin.
53
  *
54
- * @since 1.6.6
55
  * @access protected
56
  * @var string $version The current version of the plugin.
57
  */
@@ -66,7 +66,7 @@ class Cookie_Law_Info {
66
  * Load the dependencies, define the locale, and set the hooks for the admin area and
67
  * the public-facing side of the site.
68
  *
69
- * @since 1.6.6
70
  */
71
  public function __construct()
72
  {
@@ -76,7 +76,7 @@ class Cookie_Law_Info {
76
  }
77
  else
78
  {
79
- $this->version = '1.6.6';
80
  }
81
  $this->plugin_name = 'cookie-law-info';
82
 
@@ -84,7 +84,7 @@ class Cookie_Law_Info {
84
  $this->set_locale();
85
  $this->define_admin_hooks();
86
  $this->define_public_hooks();
87
-
88
  }
89
 
90
  /**
@@ -100,7 +100,7 @@ class Cookie_Law_Info {
100
  * Create an instance of the loader which will be used to register the hooks
101
  * with WordPress.
102
  *
103
- * @since 1.6.6
104
  * @access private
105
  */
106
  private function load_dependencies() {
@@ -138,7 +138,7 @@ class Cookie_Law_Info {
138
  * Uses the Cookie_Law_Info_i18n class in order to set the domain and to register the hook
139
  * with WordPress.
140
  *
141
- * @since 1.6.6
142
  * @access private
143
  */
144
  private function set_locale() {
@@ -153,7 +153,7 @@ class Cookie_Law_Info {
153
  * Register all of the hooks related to the admin area functionality
154
  * of the plugin.
155
  *
156
- * @since 1.6.6
157
  * @access private
158
  */
159
  private function define_admin_hooks() {
@@ -187,7 +187,7 @@ class Cookie_Law_Info {
187
  * Register all of the hooks related to the public-facing functionality
188
  * of the plugin.
189
  *
190
- * @since 1.6.6
191
  * @access private
192
  */
193
  private function define_public_hooks()
@@ -198,6 +198,7 @@ class Cookie_Law_Info {
198
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
199
  $this->loader->add_action( 'init', $plugin_public,'register_custom_post_type');
200
 
 
201
  $plugin_public->common_modules();
202
 
203
  //below hook's functions needs update
@@ -210,7 +211,7 @@ class Cookie_Law_Info {
210
  /**
211
  * Run the loader to execute all of the hooks with WordPress.
212
  *
213
- * @since 1.6.6
214
  */
215
  public function run() {
216
  $this->loader->run();
@@ -220,7 +221,7 @@ class Cookie_Law_Info {
220
  * The name of the plugin used to uniquely identify it within the context of
221
  * WordPress and to define internationalization functionality.
222
  *
223
- * @since 1.6.6
224
  * @return string The name of the plugin.
225
  */
226
  public function get_plugin_name() {
@@ -230,7 +231,7 @@ class Cookie_Law_Info {
230
  /**
231
  * The reference to the class that orchestrates the hooks with the plugin.
232
  *
233
- * @since 1.6.6
234
  * @return Cookie_Law_Info_Loader Orchestrates the hooks of the plugin.
235
  */
236
  public function get_loader() {
@@ -240,7 +241,7 @@ class Cookie_Law_Info {
240
  /**
241
  * Retrieve the version number of the plugin.
242
  *
243
- * @since 1.6.6
244
  * @return string The version number of the plugin.
245
  */
246
  public function get_version() {
@@ -254,7 +255,8 @@ class Cookie_Law_Info {
254
  public static function get_settings()
255
  {
256
  $settings = self::get_default_settings();
257
- self::$stored_options=self::$stored_options && count(self::$stored_options)>0 ? self::$stored_options : get_option(CLI_SETTINGS_FIELD);
 
258
  if(!empty(self::$stored_options))
259
  {
260
  foreach(self::$stored_options as $key => $option )
@@ -343,7 +345,7 @@ class Cookie_Law_Info {
343
  'is_GMT_on' => true,
344
  'as_popup' => false,
345
  'popup_overlay' => true,
346
- 'bar_heading_text' =>__('This website uses cookies','cookie-law-info'),
347
  );
348
  return $key!="" ? $settings_v0_9[$key] : $settings_v0_9;
349
  }
@@ -430,6 +432,7 @@ class Cookie_Law_Info {
430
  switch ($key) {
431
  // Convert all boolean values from text to bool:
432
  case 'is_on':
 
433
  case 'is_eu_on':
434
  case 'logging_on':
435
  case 'border_on':
@@ -732,4 +735,56 @@ class Cookie_Law_Info {
732
  $ipaddress = 'UNKNOWN';
733
  return $ipaddress;
734
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
  }
7
  * public-facing side of the site and the admin area.
8
  *
9
  * @link http://cookielawinfo.com/
10
+ * @since 1.6.7
11
  *
12
  * @package Cookie_Law_Info
13
  * @subpackage Cookie_Law_Info/includes
22
  * Also maintains the unique identifier of this plugin as well as the current
23
  * version of the plugin.
24
  *
25
+ * @since 1.6.7
26
  * @package Cookie_Law_Info
27
  * @subpackage Cookie_Law_Info/includes
28
  * @author WebToffee <info@webtoffee.com>
33
  * The loader that's responsible for maintaining and registering all hooks that power
34
  * the plugin.
35
  *
36
+ * @since 1.6.7
37
  * @access protected
38
  * @var Cookie_Law_Info_Loader $loader Maintains and registers all hooks for the plugin.
39
  */
42
  /**
43
  * The unique identifier of this plugin.
44
  *
45
+ * @since 1.6.7
46
  * @access protected
47
  * @var string $plugin_name The string used to uniquely identify this plugin.
48
  */
51
  /**
52
  * The current version of the plugin.
53
  *
54
+ * @since 1.6.7
55
  * @access protected
56
  * @var string $version The current version of the plugin.
57
  */
66
  * Load the dependencies, define the locale, and set the hooks for the admin area and
67
  * the public-facing side of the site.
68
  *
69
+ * @since 1.6.7
70
  */
71
  public function __construct()
72
  {
76
  }
77
  else
78
  {
79
+ $this->version = '1.6.7';
80
  }
81
  $this->plugin_name = 'cookie-law-info';
82
 
84
  $this->set_locale();
85
  $this->define_admin_hooks();
86
  $this->define_public_hooks();
87
+ $this->cli_patches();
88
  }
89
 
90
  /**
100
  * Create an instance of the loader which will be used to register the hooks
101
  * with WordPress.
102
  *
103
+ * @since 1.6.7
104
  * @access private
105
  */
106
  private function load_dependencies() {
138
  * Uses the Cookie_Law_Info_i18n class in order to set the domain and to register the hook
139
  * with WordPress.
140
  *
141
+ * @since 1.6.7
142
  * @access private
143
  */
144
  private function set_locale() {
153
  * Register all of the hooks related to the admin area functionality
154
  * of the plugin.
155
  *
156
+ * @since 1.6.7
157
  * @access private
158
  */
159
  private function define_admin_hooks() {
187
  * Register all of the hooks related to the public-facing functionality
188
  * of the plugin.
189
  *
190
+ * @since 1.6.7
191
  * @access private
192
  */
193
  private function define_public_hooks()
198
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
199
  $this->loader->add_action( 'init', $plugin_public,'register_custom_post_type');
200
 
201
+
202
  $plugin_public->common_modules();
203
 
204
  //below hook's functions needs update
211
  /**
212
  * Run the loader to execute all of the hooks with WordPress.
213
  *
214
+ * @since 1.6.7
215
  */
216
  public function run() {
217
  $this->loader->run();
221
  * The name of the plugin used to uniquely identify it within the context of
222
  * WordPress and to define internationalization functionality.
223
  *
224
+ * @since 1.6.7
225
  * @return string The name of the plugin.
226
  */
227
  public function get_plugin_name() {
231
  /**
232
  * The reference to the class that orchestrates the hooks with the plugin.
233
  *
234
+ * @since 1.6.7
235
  * @return Cookie_Law_Info_Loader Orchestrates the hooks of the plugin.
236
  */
237
  public function get_loader() {
241
  /**
242
  * Retrieve the version number of the plugin.
243
  *
244
+ * @since 1.6.7
245
  * @return string The version number of the plugin.
246
  */
247
  public function get_version() {
255
  public static function get_settings()
256
  {
257
  $settings = self::get_default_settings();
258
+ //self::$stored_options=self::$stored_options && count(self::$stored_options)>0 ? self::$stored_options : get_option(CLI_SETTINGS_FIELD);
259
+ self::$stored_options=get_option(CLI_SETTINGS_FIELD);
260
  if(!empty(self::$stored_options))
261
  {
262
  foreach(self::$stored_options as $key => $option )
345
  'is_GMT_on' => true,
346
  'as_popup' => false,
347
  'popup_overlay' => true,
348
+ 'bar_heading_text' =>'',
349
  );
350
  return $key!="" ? $settings_v0_9[$key] : $settings_v0_9;
351
  }
432
  switch ($key) {
433
  // Convert all boolean values from text to bool:
434
  case 'is_on':
435
+ case 'is_reject_on':
436
  case 'is_eu_on':
437
  case 'logging_on':
438
  case 'border_on':
735
  $ipaddress = 'UNKNOWN';
736
  return $ipaddress;
737
  }
738
+
739
+ /*
740
+ *
741
+ * Patch script while updating versions
742
+ */
743
+ public static function cli_patches()
744
+ {
745
+ $options=self::get_settings();
746
+
747
+ //========reject button missing issue=========
748
+ $message_bar_text=$options['notify_message'];
749
+ //user turned on the reject button with his previous settings
750
+ if(isset($options['is_reject_on']) && $options['is_reject_on']==true)
751
+ {
752
+ if(strpos($message_bar_text,'cookie_reject')===false) //user not manualy inserted the code
753
+ {
754
+ $pattern = get_shortcode_regex();
755
+ if(preg_match_all ('/'. $pattern .'/s',$message_bar_text, $matches))
756
+ {
757
+ $shortcode_arr=$matches[0];
758
+ foreach($shortcode_arr as $shrtcode)
759
+ {
760
+ if(strpos($shrtcode,'cookie_button')!==false)
761
+ {
762
+
763
+ $options['notify_message']=str_replace($shrtcode,$shrtcode.' [cookie_reject]',$message_bar_text);
764
+ $options['is_reject_on']=false;
765
+ update_option( CLI_SETTINGS_FIELD, $options );
766
+ break;
767
+ }
768
+ }
769
+ }
770
+ }else
771
+ {
772
+ $options['is_reject_on']=false;
773
+ update_option( CLI_SETTINGS_FIELD, $options );
774
+ }
775
+ }
776
+ //---------reject button missing issue------------
777
+
778
+ $bar_version='1.6.6';
779
+ $bar_heading_version = get_option('cli_heading_version');
780
+ if($bar_heading_version!=$bar_version)
781
+ {
782
+ if(isset($options['bar_heading_text']) && $options['bar_heading_text']=='This website uses cookies')
783
+ {
784
+ $options['bar_heading_text']='';
785
+ update_option( CLI_SETTINGS_FIELD, $options );
786
+ update_option('cli_heading_version', $bar_version);
787
+ }
788
+ }
789
+ }
790
  }
public/class-cookie-law-info-public.php CHANGED
@@ -4,7 +4,7 @@
4
  * The public-facing functionality of the plugin.
5
  *
6
  * @link http://cookielawinfo.com/
7
- * @since 1.6.6
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/public
@@ -25,7 +25,7 @@ class Cookie_Law_Info_Public {
25
  /**
26
  * The ID of this plugin.
27
  *
28
- * @since 1.6.6
29
  * @access private
30
  * @var string $plugin_name The ID of this plugin.
31
  */
@@ -34,7 +34,7 @@ class Cookie_Law_Info_Public {
34
  /**
35
  * The version of this plugin.
36
  *
37
- * @since 1.6.6
38
  * @access private
39
  * @var string $version The current version of this plugin.
40
  */
@@ -58,7 +58,7 @@ class Cookie_Law_Info_Public {
58
  /**
59
  * Initialize the class and set its properties.
60
  *
61
- * @since 1.6.6
62
  * @param string $plugin_name The name of the plugin.
63
  * @param string $version The version of this plugin.
64
  */
@@ -74,7 +74,7 @@ class Cookie_Law_Info_Public {
74
  /**
75
  * Register the stylesheets for the public-facing side of the site.
76
  *
77
- * @since 1.6.6
78
  */
79
  public function enqueue_styles() {
80
 
@@ -102,7 +102,7 @@ class Cookie_Law_Info_Public {
102
  /**
103
  * Register the JavaScript for the public-facing side of the site.
104
  *
105
- * @since 1.6.6
106
  */
107
  public function enqueue_scripts() {
108
 
@@ -231,7 +231,7 @@ class Cookie_Law_Info_Public {
231
  $head= trim(stripslashes($head));
232
 
233
  $notify_html = '<div id="' .$this->cookielawinfo_remove_hash( $the_options["notify_div_id"] ) . '">'.
234
- ($head!="" ? '<h3>'.$head.'</h3>' : '')
235
  .'<span>' . $str . '</span></div>';
236
 
237
  if($the_options['showagain_tab'] === true)
4
  * The public-facing functionality of the plugin.
5
  *
6
  * @link http://cookielawinfo.com/
7
+ * @since 1.6.7
8
  *
9
  * @package Cookie_Law_Info
10
  * @subpackage Cookie_Law_Info/public
25
  /**
26
  * The ID of this plugin.
27
  *
28
+ * @since 1.6.7
29
  * @access private
30
  * @var string $plugin_name The ID of this plugin.
31
  */
34
  /**
35
  * The version of this plugin.
36
  *
37
+ * @since 1.6.7
38
  * @access private
39
  * @var string $version The current version of this plugin.
40
  */
58
  /**
59
  * Initialize the class and set its properties.
60
  *
61
+ * @since 1.6.7
62
  * @param string $plugin_name The name of the plugin.
63
  * @param string $version The version of this plugin.
64
  */
74
  /**
75
  * Register the stylesheets for the public-facing side of the site.
76
  *
77
+ * @since 1.6.7
78
  */
79
  public function enqueue_styles() {
80
 
102
  /**
103
  * Register the JavaScript for the public-facing side of the site.
104
  *
105
+ * @since 1.6.7
106
  */
107
  public function enqueue_scripts() {
108
 
231
  $head= trim(stripslashes($head));
232
 
233
  $notify_html = '<div id="' .$this->cookielawinfo_remove_hash( $the_options["notify_div_id"] ) . '">'.
234
+ ($head!="" ? '<h5 class="cli_messagebar_head">'.$head.'</h5>' : '')
235
  .'<span>' . $str . '</span></div>';
236
 
237
  if($the_options['showagain_tab'] === true)
public/css/{cookie-law-info-gdpr-1.6.6.css → cookie-law-info-gdpr-1.6.7.css} RENAMED
File without changes
public/css/{cookie-law-info-public-1.6.6.css → cookie-law-info-public-1.6.7.css} RENAMED
@@ -32,11 +32,11 @@
32
  -webkit-border-radius: 4px;
33
  position: relative;
34
  cursor: pointer;
35
- margin-left: 10px;
36
  text-decoration: none;
37
  }
38
  .cli-plugin-main-link {
39
- margin-left: 10px;
40
  }
41
  .cli-plugin-button:hover {
42
  background-color: #111;
32
  -webkit-border-radius: 4px;
33
  position: relative;
34
  cursor: pointer;
35
+ margin-left: 0px;
36
  text-decoration: none;
37
  }
38
  .cli-plugin-main-link {
39
+ margin-left:0px;
40
  }
41
  .cli-plugin-button:hover {
42
  background-color: #111;
public/css/{cookie-law-info-table-1.6.6.css → cookie-law-info-table-1.6.7.css} RENAMED
File without changes
public/js/{cookie-law-info-public-1.6.6.js → cookie-law-info-public-1.6.7.js} RENAMED
@@ -387,7 +387,11 @@ var CLI=
387
  }
388
  },
389
  barAsPopUp:function()
390
- {
 
 
 
 
391
  var cli_elm=this.bar_elm;
392
  var cli_win=jQuery(window);
393
  var cli_winh=cli_win.height()-40;
387
  }
388
  },
389
  barAsPopUp:function()
390
+ {
391
+ if(typeof cookie_law_info_bar_as_popup==='function')
392
+ {
393
+ return false;
394
+ }
395
  var cli_elm=this.bar_elm;
396
  var cli_win=jQuery(window);
397
  var cli_winh=cli_win.height()-40;
uninstall.php CHANGED
@@ -20,7 +20,7 @@
20
  * https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913
21
  *
22
  * @link http://cookielawinfo.com/
23
- * @since 1.6.6
24
  *
25
  * @package Cookie_Law_Info
26
  */
20
  * https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913
21
  *
22
  * @link http://cookielawinfo.com/
23
+ * @since 1.6.7
24
  *
25
  * @package Cookie_Law_Info
26
  */