GDPR Cookie Compliance - Version 2.1.6

Version Description

  • CodeMirror error handling
Download this release

Release Info

Developer MooveAgency
Plugin Icon 128x128 GDPR Cookie Compliance
Version 2.1.6
Comparing to
See all releases

Code changes from version 2.1.5 to 2.1.6

moove-gdpr.php CHANGED
@@ -6,7 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
6
  * Plugin Name: GDPR Cookie Compliance
7
  * Plugin URI: https://wordpress.org/plugins/gdpr-cookie-compliance/
8
  * Description: GDPR is an EU wide legislation that specifies how user data should be handled. This plugin has settings that can assist you with GDPR cookie compliance requirements.
9
- * Version: 2.1.5
10
  * Author: Moove Agency
11
  * Domain Path: /languages
12
  * Author URI: https://www.mooveagency.com
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly
14
  * Text Domain: gdpr-cookie-compliance
15
  */
16
 
17
- define( 'MOOVE_GDPR_VERSION', '2.1.5' );
18
 
19
  register_activation_hook( __FILE__ , 'moove_gdpr_activate' );
20
  register_deactivation_hook( __FILE__ , 'moove_gdpr_deactivate' );
6
  * Plugin Name: GDPR Cookie Compliance
7
  * Plugin URI: https://wordpress.org/plugins/gdpr-cookie-compliance/
8
  * Description: GDPR is an EU wide legislation that specifies how user data should be handled. This plugin has settings that can assist you with GDPR cookie compliance requirements.
9
+ * Version: 2.1.6
10
  * Author: Moove Agency
11
  * Domain Path: /languages
12
  * Author URI: https://www.mooveagency.com
14
  * Text Domain: gdpr-cookie-compliance
15
  */
16
 
17
+ define( 'MOOVE_GDPR_VERSION', '2.1.6' );
18
 
19
  register_activation_hook( __FILE__ , 'moove_gdpr_activate' );
20
  register_deactivation_hook( __FILE__ , 'moove_gdpr_deactivate' );
readme.txt CHANGED
@@ -181,6 +181,9 @@ THIS PLUGIN DOES NOT MAKE YOUR WEBSITE COMPLIANT. YOU ARE RESPONSIBLE FOR ENSURI
181
  32. GDPR Cookie Compliance - Admin - Language Specific Scripts [Premium]
182
 
183
  == Changelog ==
 
 
 
184
  = 2.1.5 =
185
  * CodeMirror sections improved
186
 
181
  32. GDPR Cookie Compliance - Admin - Language Specific Scripts [Premium]
182
 
183
  == Changelog ==
184
+ = 2.1.6 =
185
+ * CodeMirror error handling
186
+
187
  = 2.1.5 =
188
  * CodeMirror sections improved
189
 
views/moove/admin/settings/advanced_cookies.php CHANGED
@@ -227,10 +227,10 @@
227
  <script type="text/javascript">
228
  window.onload = function() {
229
  jQuery('.gdpr-tab-section-cnt textarea.code').each(function(){
230
- if (typeof CodeMirror !== "undefined") {
231
  var element = jQuery(this).closest('tr').find('.gdpr-code')[0];
232
  var id = jQuery(this).attr('id');
233
- console.log(element);
234
  jQuery(this).css({
235
  'opacity' : '0',
236
  'height' : '0',
227
  <script type="text/javascript">
228
  window.onload = function() {
229
  jQuery('.gdpr-tab-section-cnt textarea.code').each(function(){
230
+ if (typeof CodeMirror === "function") {
231
  var element = jQuery(this).closest('tr').find('.gdpr-code')[0];
232
  var id = jQuery(this).attr('id');
233
+
234
  jQuery(this).css({
235
  'opacity' : '0',
236
  'height' : '0',
views/moove/admin/settings/third_party_cookies.php CHANGED
@@ -71,186 +71,186 @@
71
  <h2><?php echo $nav_label; ?></h2>
72
  <hr />
73
  <form action="?page=moove-gdpr&amp;tab=third_party_cookies" method="post" id="moove_gdpr_tab_third_party_cookies">
74
- <?php wp_nonce_field( 'moove_gdpr_nonce_field', 'moove_gdpr_nonce' ); ?>
75
- <table class="form-table <?php echo $empty_scripts ? 'moove-gdpr-form-error' : ''; ?>">
76
- <tbody>
77
- <tr>
78
- <th scope="row">
79
- <label for="moove_gdpr_third_party_cookies_enable"><?php _e('Turn','gdpr-cookie-compliance'); ?></label>
80
- </th>
81
- <td>
82
- <!-- GDPR Rounded switch -->
83
- <label class="gdpr-checkbox-toggle">
84
- <input type="checkbox" name="moove_gdpr_third_party_cookies_enable" id="moove_gdpr_third_party_cookies_enable" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) ? 'checked' : '' ) ) : ''; ?> >
85
- <span class="gdpr-checkbox-slider" data-enable="<?php _e('On','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Off','gdpr-cookie-compliance'); ?>"></span>
86
- </label>
87
- </td>
88
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
- <tr>
91
- <th scope="row">
92
- <label for="moove_gdpr_third_party_cookies_enable_first_visit"><?php _e('Default status','gdpr-cookie-compliance'); ?></label>
93
- <p class="description"><?php _e('by default cookies should be','gdpr-cookie-compliance'); ?>:</p>
94
- <!-- .description -->
95
- </th>
96
- <td style="vertical-align: top; padding-top: 20px">
97
- <!-- GDPR Rounded switch -->
98
- <label class="gdpr-checkbox-toggle">
99
- <input type="checkbox" name="moove_gdpr_third_party_cookies_enable_first_visit" id="moove_gdpr_third_party_cookies_enable_first_visit" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? 'checked' : '' ) ) : ''; ?> >
100
- <span class="gdpr-checkbox-slider" data-enable="<?php _e('Enabled','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Disabled','gdpr-cookie-compliance'); ?>"></span>
101
- </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  </td>
103
  </tr>
 
 
 
 
104
 
105
- <tr>
106
- <th scope="row">
107
- <label for="moove_gdpr_performance_cookies_tab_title"><?php _e('Tab Title','gdpr-cookie-compliance'); ?></label>
108
- </th>
109
- <td>
110
- <input name="moove_gdpr_performance_cookies_tab_title<?php echo $wpml_lang; ?>" type="text" id="moove_gdpr_performance_cookies_tab_title" value="<?php echo $nav_label; ?>" class="regular-text">
 
 
 
 
 
 
111
  </td>
112
  </tr>
 
 
 
 
113
 
114
- <tr>
115
- <th scope="row" colspan="2" style="padding-bottom: 0;">
116
- <label for="moove_gdpr_performance_cookies_tab_content"><?php _e('Tab Content','gdpr-cookie-compliance'); ?></label>
117
- </th>
118
- </tr>
119
- <tr class="moove_gdpr_table_form_holder">
120
- <th colspan="2" scope="row">
121
- <?php
122
- $content = isset( $gdpr_options['moove_gdpr_performance_cookies_tab_content'.$wpml_lang] ) && $gdpr_options['moove_gdpr_performance_cookies_tab_content'.$wpml_lang] ? wp_unslash( $gdpr_options['moove_gdpr_performance_cookies_tab_content'.$wpml_lang] ) : false;
123
- if ( ! $content ) :
124
- $content = $gdpr_default_content->moove_gdpr_get_third_party_content();
125
- endif;
126
- ?>
127
- <?php
128
- $settings = array (
129
- 'media_buttons' => false,
130
- 'editor_height' => 150,
131
- );
132
- wp_editor( $content, 'moove_gdpr_performance_cookies_tab_content', $settings );
133
  ?>
134
- </th>
 
 
 
 
135
  </tr>
136
- </tbody>
137
- </table>
138
-
139
- <div class="gdpr-script-tab-content">
140
- <hr />
141
- <h3><?php _e('Paste your codes and snippets below. They will be added to all pages if user enables these cookies.','gdpr-cookie-compliance'); ?></h3>
142
- <div class="alert script-error" style="display: none;"><?php _e('Please fill out at least one of these fields:','gdpr-cookie-compliance'); ?></div>
143
-
144
- <div class="gdpr-tab-code-section-nav">
145
- <ul>
146
- <li>
147
- <a href="#third_party_head" class="gdpr-active"><?php _e('Head Section','gdpr-cookie-compliance'); ?></a>
148
- </li>
149
- <li>
150
- <a href="#third_party_body"><?php _e('Body Section','gdpr-cookie-compliance'); ?></a>
151
- </li>
152
- <li>
153
- <a href="#third_party_footer"><?php _e('Footer Section','gdpr-cookie-compliance'); ?></a>
154
- </li>
155
- <?php do_action('gdpr_tab_code_section_nav_extension', 'third_party'); ?>
156
- </ul>
157
- </div>
158
- <!-- .gdpr-tab-code-section-nav -->
159
- <div class="gdpr-script-tabs-main-cnt">
160
-
161
- <div class="gdpr-tab-code-section gdpr-active" id="third_party_head">
162
- <h4 for="moove_gdpr_third_party_header_scripts"><?php _e('Add scripts that you would like to be inserted to the HEAD section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
163
- <table>
164
- <tbody>
165
- <tr class="moove_gdpr_third_party_header_scripts">
166
- <td scope="row" colspan="2" style="padding: 20px 0;">
167
- <?php $content = isset( $gdpr_options['moove_gdpr_third_party_header_scripts'] ) && $gdpr_options['moove_gdpr_third_party_header_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_header_scripts'] ) : '';
168
- ?>
169
- <textarea name="moove_gdpr_third_party_header_scripts" id="moove_gdpr_third_party_header_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
170
- <div class="gdpr-code"></div>
171
- <!-- .gdpr-code -->
172
- <p class="description" id="moove_gdpr_third_party_header_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
173
- </td>
174
- </tr>
175
- </tbody>
176
- </table>
177
- </div>
178
- <!-- .gdpr-tab-code-section -->
179
 
180
- <div class="gdpr-tab-code-section" id="third_party_body">
181
- <h4 for="moove_gdpr_third_party_header_scripts"><?php _e('Add scripts that you would like to be inserted to the BODY section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
182
- <table>
183
- <tbody>
184
- <tr class="moove_gdpr_third_party_body_scripts">
185
- <td scope="row" colspan="2" style="padding: 20px 0;">
186
- <?php $content = isset( $gdpr_options['moove_gdpr_third_party_body_scripts'] ) && $gdpr_options['moove_gdpr_third_party_body_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_body_scripts'] ) : '';
187
- ?>
188
- <textarea name="moove_gdpr_third_party_body_scripts" id="moove_gdpr_third_party_body_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
189
- <div class="gdpr-code"></div>
190
- <!-- .gdpr-code -->
191
- <p class="description" id="moove_gdpr_third_party_body_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
192
- </td>
193
- </tr>
194
- </tbody>
195
- </table>
196
- </div>
197
- <!-- .gdpr-tab-code-section -->
198
-
199
- <div class="gdpr-tab-code-section" id="third_party_footer">
200
- <h4 for="moove_gdpr_third_party_header_scripts"><?php _e('Add scripts that you would like to be inserted to the FOOTER section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
201
- <table>
202
- <tbody>
203
- <tr class="moove_gdpr_third_party_footer_scripts">
204
- <td scope="row" colspan="2" style="padding: 20px 0;">
205
- <?php $content = isset( $gdpr_options['moove_gdpr_third_party_footer_scripts'] ) && $gdpr_options['moove_gdpr_third_party_footer_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_footer_scripts'] ) : '';
206
- ?>
207
- <textarea name="moove_gdpr_third_party_footer_scripts" id="moove_gdpr_third_party_footer_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
208
- <div class="gdpr-code"></div>
209
- <!-- .gdpr-code -->
210
- <p class="description" id="moove_gdpr_third_party_footer_scripts-description"><?php _e('For example, you can use it for Google Analytics script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
211
- </td>
212
- </tr>
213
- </tbody>
214
- </table>
215
- </div>
216
- <!-- .gdpr-tab-code-section -->
217
-
218
- <?php do_action('gdpr_tab_code_section_content_extension', 'third_party'); ?>
219
- </div>
220
- <!-- .gdpr-script-tabs-main-cnt -->
221
  </div>
222
- <!-- .gdpr-script-tab-content -->
223
- <br />
224
- <hr />
225
- <br />
226
- <button type="submit" class="button button-primary"><?php _e('Save changes','gdpr-cookie-compliance'); ?></button>
227
-
228
- <script type="text/javascript" src="<?php echo moove_gdpr_get_plugin_directory_url(); ?>/dist/scripts/codemirror.js"></script>
229
- <script type="text/javascript">
230
- window.onload = function() {
231
- jQuery('.gdpr-tab-section-cnt textarea.code').each(function(){
232
- if (typeof CodeMirror !== "undefined") {
233
- var element = jQuery(this).closest('tr').find('.gdpr-code')[0];
234
- var id = jQuery(this).attr('id');
235
- console.log(element);
236
- jQuery(this).css({
237
- 'opacity' : '0',
238
- 'height' : '0',
239
- });
240
- var editor = CodeMirror( element, {
241
- mode: "text/html",
242
- lineWrapping: true,
243
- lineNumbers: true,
244
- value: document.getElementById(id).value
245
- });
246
- editor.on('change',function(cMirror){
247
- // get value right from instance
248
- document.getElementById(id).innerHTML = cMirror.getValue();
249
- });
250
- } else {
251
- jQuery('.gdpr-code').hide();
252
- }
253
- });
254
- };
255
- </script>
 
 
256
  </form>
71
  <h2><?php echo $nav_label; ?></h2>
72
  <hr />
73
  <form action="?page=moove-gdpr&amp;tab=third_party_cookies" method="post" id="moove_gdpr_tab_third_party_cookies">
74
+ <?php wp_nonce_field( 'moove_gdpr_nonce_field', 'moove_gdpr_nonce' ); ?>
75
+ <table class="form-table <?php echo $empty_scripts ? 'moove-gdpr-form-error' : ''; ?>">
76
+ <tbody>
77
+ <tr>
78
+ <th scope="row">
79
+ <label for="moove_gdpr_third_party_cookies_enable"><?php _e('Turn','gdpr-cookie-compliance'); ?></label>
80
+ </th>
81
+ <td>
82
+ <!-- GDPR Rounded switch -->
83
+ <label class="gdpr-checkbox-toggle">
84
+ <input type="checkbox" name="moove_gdpr_third_party_cookies_enable" id="moove_gdpr_third_party_cookies_enable" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) ? ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_third_party_cookies_enable'] ) ? 'checked' : '' ) ) : ''; ?> >
85
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('On','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Off','gdpr-cookie-compliance'); ?>"></span>
86
+ </label>
87
+ </td>
88
+ </tr>
89
+
90
+ <tr>
91
+ <th scope="row">
92
+ <label for="moove_gdpr_third_party_cookies_enable_first_visit"><?php _e('Default status','gdpr-cookie-compliance'); ?></label>
93
+ <p class="description"><?php _e('by default cookies should be','gdpr-cookie-compliance'); ?>:</p>
94
+ <!-- .description -->
95
+ </th>
96
+ <td style="vertical-align: top; padding-top: 20px">
97
+ <!-- GDPR Rounded switch -->
98
+ <label class="gdpr-checkbox-toggle">
99
+ <input type="checkbox" name="moove_gdpr_third_party_cookies_enable_first_visit" id="moove_gdpr_third_party_cookies_enable_first_visit" <?php echo isset( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? ( intval( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) === 1 ? 'checked' : ( ! isset( $gdpr_options['moove_gdpr_third_party_cookies_enable_first_visit'] ) ? 'checked' : '' ) ) : ''; ?> >
100
+ <span class="gdpr-checkbox-slider" data-enable="<?php _e('Enabled','gdpr-cookie-compliance'); ?>" data-disable="<?php _e('Disabled','gdpr-cookie-compliance'); ?>"></span>
101
+ </label>
102
+ </td>
103
+ </tr>
104
 
105
+ <tr>
106
+ <th scope="row">
107
+ <label for="moove_gdpr_performance_cookies_tab_title"><?php _e('Tab Title','gdpr-cookie-compliance'); ?></label>
108
+ </th>
109
+ <td>
110
+ <input name="moove_gdpr_performance_cookies_tab_title<?php echo $wpml_lang; ?>" type="text" id="moove_gdpr_performance_cookies_tab_title" value="<?php echo $nav_label; ?>" class="regular-text">
111
+ </td>
112
+ </tr>
113
+
114
+ <tr>
115
+ <th scope="row" colspan="2" style="padding-bottom: 0;">
116
+ <label for="moove_gdpr_performance_cookies_tab_content"><?php _e('Tab Content','gdpr-cookie-compliance'); ?></label>
117
+ </th>
118
+ </tr>
119
+ <tr class="moove_gdpr_table_form_holder">
120
+ <th colspan="2" scope="row">
121
+ <?php
122
+ $content = isset( $gdpr_options['moove_gdpr_performance_cookies_tab_content'.$wpml_lang] ) && $gdpr_options['moove_gdpr_performance_cookies_tab_content'.$wpml_lang] ? wp_unslash( $gdpr_options['moove_gdpr_performance_cookies_tab_content'.$wpml_lang] ) : false;
123
+ if ( ! $content ) :
124
+ $content = $gdpr_default_content->moove_gdpr_get_third_party_content();
125
+ endif;
126
+ ?>
127
+ <?php
128
+ $settings = array (
129
+ 'media_buttons' => false,
130
+ 'editor_height' => 150,
131
+ );
132
+ wp_editor( $content, 'moove_gdpr_performance_cookies_tab_content', $settings );
133
+ ?>
134
+ </th>
135
+ </tr>
136
+ </tbody>
137
+ </table>
138
+
139
+ <div class="gdpr-script-tab-content">
140
+ <hr />
141
+ <h3><?php _e('Paste your codes and snippets below. They will be added to all pages if user enables these cookies.','gdpr-cookie-compliance'); ?></h3>
142
+ <div class="alert script-error" style="display: none;"><?php _e('Please fill out at least one of these fields:','gdpr-cookie-compliance'); ?></div>
143
+
144
+ <div class="gdpr-tab-code-section-nav">
145
+ <ul>
146
+ <li>
147
+ <a href="#third_party_head" class="gdpr-active"><?php _e('Head Section','gdpr-cookie-compliance'); ?></a>
148
+ </li>
149
+ <li>
150
+ <a href="#third_party_body"><?php _e('Body Section','gdpr-cookie-compliance'); ?></a>
151
+ </li>
152
+ <li>
153
+ <a href="#third_party_footer"><?php _e('Footer Section','gdpr-cookie-compliance'); ?></a>
154
+ </li>
155
+ <?php do_action('gdpr_tab_code_section_nav_extension', 'third_party'); ?>
156
+ </ul>
157
+ </div>
158
+ <!-- .gdpr-tab-code-section-nav -->
159
+ <div class="gdpr-script-tabs-main-cnt">
160
+
161
+ <div class="gdpr-tab-code-section gdpr-active" id="third_party_head">
162
+ <h4 for="moove_gdpr_third_party_header_scripts"><?php _e('Add scripts that you would like to be inserted to the HEAD section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
163
+ <table>
164
+ <tbody>
165
+ <tr class="moove_gdpr_third_party_header_scripts">
166
+ <td scope="row" colspan="2" style="padding: 20px 0;">
167
+ <?php $content = isset( $gdpr_options['moove_gdpr_third_party_header_scripts'] ) && $gdpr_options['moove_gdpr_third_party_header_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_header_scripts'] ) : '';
168
+ ?>
169
+ <textarea name="moove_gdpr_third_party_header_scripts" id="moove_gdpr_third_party_header_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
170
+ <div class="gdpr-code"></div>
171
+ <!-- .gdpr-code -->
172
+ <p class="description" id="moove_gdpr_third_party_header_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
173
  </td>
174
  </tr>
175
+ </tbody>
176
+ </table>
177
+ </div>
178
+ <!-- .gdpr-tab-code-section -->
179
 
180
+ <div class="gdpr-tab-code-section" id="third_party_body">
181
+ <h4 for="moove_gdpr_third_party_header_scripts"><?php _e('Add scripts that you would like to be inserted to the BODY section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
182
+ <table>
183
+ <tbody>
184
+ <tr class="moove_gdpr_third_party_body_scripts">
185
+ <td scope="row" colspan="2" style="padding: 20px 0;">
186
+ <?php $content = isset( $gdpr_options['moove_gdpr_third_party_body_scripts'] ) && $gdpr_options['moove_gdpr_third_party_body_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_body_scripts'] ) : '';
187
+ ?>
188
+ <textarea name="moove_gdpr_third_party_body_scripts" id="moove_gdpr_third_party_body_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
189
+ <div class="gdpr-code"></div>
190
+ <!-- .gdpr-code -->
191
+ <p class="description" id="moove_gdpr_third_party_body_scripts-description"><?php _e('For example, you can use it for Google Tag Manager script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
192
  </td>
193
  </tr>
194
+ </tbody>
195
+ </table>
196
+ </div>
197
+ <!-- .gdpr-tab-code-section -->
198
 
199
+ <div class="gdpr-tab-code-section" id="third_party_footer">
200
+ <h4 for="moove_gdpr_third_party_header_scripts"><?php _e('Add scripts that you would like to be inserted to the FOOTER section of your pages when user accepts these cookies','gdpr-cookie-compliance'); ?></h4>
201
+ <table>
202
+ <tbody>
203
+ <tr class="moove_gdpr_third_party_footer_scripts">
204
+ <td scope="row" colspan="2" style="padding: 20px 0;">
205
+ <?php $content = isset( $gdpr_options['moove_gdpr_third_party_footer_scripts'] ) && $gdpr_options['moove_gdpr_third_party_footer_scripts'] ? maybe_unserialize( $gdpr_options['moove_gdpr_third_party_footer_scripts'] ) : '';
 
 
 
 
 
 
 
 
 
 
 
 
206
  ?>
207
+ <textarea name="moove_gdpr_third_party_footer_scripts" id="moove_gdpr_third_party_footer_scripts" class="large-text code" rows="13"><?php echo $content; ?></textarea>
208
+ <div class="gdpr-code"></div>
209
+ <!-- .gdpr-code -->
210
+ <p class="description" id="moove_gdpr_third_party_footer_scripts-description"><?php _e('For example, you can use it for Google Analytics script or any other 3rd party code snippets.','gdpr-cookie-compliance'); ?></p>
211
+ </td>
212
  </tr>
213
+ </tbody>
214
+ </table>
215
+ </div>
216
+ <!-- .gdpr-tab-code-section -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
 
218
+ <?php do_action('gdpr_tab_code_section_content_extension', 'third_party'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  </div>
220
+ <!-- .gdpr-script-tabs-main-cnt -->
221
+ </div>
222
+ <!-- .gdpr-script-tab-content -->
223
+ <br />
224
+ <hr />
225
+ <br />
226
+ <button type="submit" class="button button-primary"><?php _e('Save changes','gdpr-cookie-compliance'); ?></button>
227
+
228
+ <script type="text/javascript" src="<?php echo moove_gdpr_get_plugin_directory_url(); ?>/dist/scripts/codemirror.js"></script>
229
+ <script type="text/javascript">
230
+ window.onload = function() {
231
+ jQuery('.gdpr-tab-section-cnt textarea.code').each(function(){
232
+ if (typeof CodeMirror === "function") {
233
+ var element = jQuery(this).closest('tr').find('.gdpr-code')[0];
234
+ var id = jQuery(this).attr('id');
235
+
236
+ jQuery(this).css({
237
+ 'opacity' : '0',
238
+ 'height' : '0',
239
+ });
240
+ var editor = CodeMirror( element, {
241
+ mode: "text/html",
242
+ lineWrapping: true,
243
+ lineNumbers: true,
244
+ value: document.getElementById(id).value
245
+ });
246
+ editor.on('change',function(cMirror){
247
+ // get value right from instance
248
+ document.getElementById(id).innerHTML = cMirror.getValue();
249
+ });
250
+ } else {
251
+ jQuery('.gdpr-code').hide();
252
+ }
253
+ });
254
+ };
255
+ </script>
256
  </form>