Changeset 2864194
- Timestamp:
- 02/13/2023 07:25:16 AM (3 years ago)
- Location:
- google-analytics-opt-out
- Files:
-
- 6 edited
- 1 copied
-
tags/2.3.5 (copied) (copied from google-analytics-opt-out/trunk)
-
tags/2.3.5/google-analytics-opt-out.php (modified) (2 diffs)
-
tags/2.3.5/inc/settings.php (modified) (13 diffs)
-
tags/2.3.5/readme.txt (modified) (3 diffs)
-
trunk/google-analytics-opt-out.php (modified) (2 diffs)
-
trunk/inc/settings.php (modified) (13 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
google-analytics-opt-out/tags/2.3.5/google-analytics-opt-out.php
r2520244 r2864194 1 1 <?php 2 2 /* 3 Plugin Name: Opt-Out for Google Analytics3 Plugin Name: Google Analytics Opt-Out 4 4 Plugin URI: https://wp-buddy.com/products/plugins/google-analytics-opt-out 5 5 Description: Provides an Opt-Out functionality for Google Analytics 6 Version: 2.3. 46 Version: 2.3.5 7 7 Author: WP-Buddy 8 8 Author URI: https://wp-buddy.com … … 11 11 Domain Path: /languages/ 12 12 13 Copyright 202 0WP-Buddy (email : info@wp-buddy.com)13 Copyright 2023 WP-Buddy (email : info@wp-buddy.com) 14 14 15 15 This program is free software; you can redistribute it and/or modify -
google-analytics-opt-out/tags/2.3.5/inc/settings.php
r2189612 r2864194 4 4 * Creating the menu item 5 5 * 6 * @ since 1.07 * @ return void6 * @return void 7 * @since 1.0 8 8 */ 9 9 function gaoop_admin_menu() { … … 22 22 * Creating the settings page HTML output 23 23 * 24 * @ since 1.025 * @ return void24 * @return void 25 * @since 1.0 26 26 */ 27 27 function gaoop_settings_page() { … … 52 52 * Enqueues the settings page scripts and styles 53 53 * 54 * @ since 1.055 * @ return void54 * @return void 55 * @since 1.0 56 56 */ 57 57 function gaoop_settings_scripts() { … … 64 64 * Registers Settings sections and fields 65 65 * 66 * @ since 1.067 * @ return void66 * @return void 67 * @since 1.0 68 68 */ 69 69 function gaoop_register_theme_options_section() { … … 72 72 73 73 add_settings_field( 'gaoop_yoast', __( 'Use Monster Insights Settings', 'google-analytics-opt-out' ), 'gaoop_options_yoast', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_yoast' ) ); 74 register_setting( 'gaoop_options_page', 'gaoop_yoast', 'intval' ); 75 76 add_settings_field( 'gaoop_property', __( 'UA- or GA-Code', 'google-analytics-opt-out' ), 'gaoop_options_property', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_property' ) ); 77 register_setting( 'gaoop_options_page', 'gaoop_property', 'sanitize_text_field' ); 74 register_setting( 'gaoop_options_page', 'gaoop_yoast', [ 75 'sanitize_callback' => 'intval' 76 ] ); 77 78 add_settings_field( 'gaoop_property', __( 'UA-, GA-Code or G-Code', 'google-analytics-opt-out' ), 'gaoop_options_property', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_property' ) ); 79 register_setting( 'gaoop_options_page', 'gaoop_property', [ 80 'sanitize_callback' => function ( $val ) { 81 return sanitize_text_field( htmlspecialchars( $val ) ); 82 } 83 ] ); 78 84 79 85 add_settings_field( 'gaoop_editor_button', __( 'Show Editor button (Classic Editor)', 'google-analytics-opt-out' ), 'gaoop_options_editor_button', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_editor_button' ) ); 80 register_setting( 'gaoop_options_page', 'gaoop_editor_button', 'intval' ); 86 register_setting( 'gaoop_options_page', 'gaoop_editor_button', [ 87 'sanitize_callback' => 'intval' 88 ] ); 81 89 82 90 add_settings_field( 'gaoop_opt_out_cookie_set_text', __( 'Opt-Out Successful', 'google-analytics-opt-out' ), 'gaoop_options_opt_out_cookie_set_text', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_opt_out_cookie_set_text' ) ); 83 register_setting( 'gaoop_options_page', 'gaoop_opt_out_cookie_set_text', 'sanitize_text_field' ); 91 register_setting( 'gaoop_options_page', 'gaoop_opt_out_cookie_set_text', [ 92 'sanitize_callback' => function ( $val ) { 93 return sanitize_text_field( htmlspecialchars( $val ) ); 94 } 95 ] ); 84 96 85 97 add_settings_field( 'gaoop_banner', __( 'Use Banner', 'google-analytics-opt-out' ), 'gaoop_options_banner', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_banner' ) ); 86 register_setting( 'gaoop_options_page', 'gaoop_banner', 'intval' ); 98 register_setting( 'gaoop_options_page', 'gaoop_banner', [ 99 'sanitize_callback' => 'intval' 100 ] ); 87 101 88 102 add_settings_field( 'gaoop_opt_out_text', __( 'Opt-Out Banner-Text', 'google-analytics-opt-out' ), 'gaoop_options_opt_out_text', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_opt_out_text' ) ); 89 register_setting( 'gaoop_options_page', 'gaoop_opt_out_text', 'wp_kses_post' ); 103 register_setting( 'gaoop_options_page', 'gaoop_opt_out_text', [ 104 'sanitize_callback' => 'wp_kses_post' 105 ] ); 90 106 91 107 add_settings_field( 'gaoop_opt_out_shortcode_integration', __( 'Integrate Shortcode', 'google-analytics-opt-out' ), 'gaoop_options_opt_out_shortcode_integration', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_opt_out_shortcode_integration' ) ); 92 register_setting( 'gaoop_options_page', 'gaoop_opt_out_shortcode_integration', 'sanitize_text_field' ); 108 register_setting( 'gaoop_options_page', 'gaoop_opt_out_shortcode_integration', [ 109 'sanitize_callback' => function ( $val ) { 110 return sanitize_text_field( htmlspecialchars( $val ) ); 111 } 112 ] ); 93 113 94 114 add_settings_field( 'gaoop_hide', __( 'Hide banner after closing', 'google-analytics-opt-out' ), 'gaoop_options_hide', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_hide' ) ); 95 register_setting( 'gaoop_options_page', 'gaoop_hide', 'intval' ); 115 register_setting( 'gaoop_options_page', 'gaoop_hide', [ 116 'sanitize_callback' => 'intval' 117 ] ); 96 118 97 119 add_settings_field( 'gaoop_custom_styles', __( 'Custom CSS', 'google-analytics-opt-out' ), 'gaoop_options_custom_styles', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_custom_styles' ) ); 98 register_setting( 'gaoop_options_page', 'gaoop_custom_styles' ); 99 120 register_setting( 'gaoop_options_page', 'gaoop_custom_styles', [ 121 'sanitize_callback' => function ( $value ) { 122 return wp_filter_nohtml_kses( $value ); 123 } 124 ] ); 100 125 101 126 } … … 107 132 * Settings field for the Yoast Checkbox 108 133 * 109 * @ since 1.0110 * @ return void134 * @return void 135 * @since 1.0 111 136 */ 112 137 function gaoop_options_yoast() { … … 139 164 * Settings field for the UA property 140 165 * 141 * @ since 1.0142 * @ return void166 * @return void 167 * @since 1.0 143 168 */ 144 169 function gaoop_options_property() { … … 161 186 * Settings field for the banner checkbox 162 187 * 188 * @return void 163 189 * @since 2.0.0 164 * @return void165 190 */ 166 191 function gaoop_options_banner() { … … 175 200 * Settings field for the banner checkbox 176 201 * 202 * @return void 177 203 * @since 2.1.0 178 * @return void179 204 */ 180 205 function gaoop_options_editor_button() { … … 191 216 * Settings field for the UA property 192 217 * 193 * @ since 1.0194 * @ return void218 * @return void 219 * @since 1.0 195 220 */ 196 221 function gaoop_options_opt_out_text() { … … 224 249 * Successful Opt-Out Text 225 250 * 226 * @ since 1.0227 * @ return void251 * @return void 252 * @since 1.0 228 253 */ 229 254 function gaoop_options_opt_out_cookie_set_text() { … … 236 261 * Settings field for the Hide checkbox 237 262 * 238 * @ since 1.0239 * @ return void263 * @return void 264 * @since 1.0 240 265 */ 241 266 function gaoop_options_hide() { … … 249 274 * Settings field for the custom CSS textarea 250 275 * 251 * @ since 1.0252 * @ return void276 * @return void 277 * @since 1.0 253 278 */ 254 279 function gaoop_options_custom_styles() { -
google-analytics-opt-out/tags/2.3.5/readme.txt
r2520244 r2864194 1 === Opt-Out for Google Analytics===1 === Google Analytics Opt-Out === 2 2 Contributors: wp-buddy, floriansimeth 3 3 Donate link: https://wp-buddy.com/products/plugins/google-analytics-opt-out/ 4 4 Tags: google analytics opt-out, monster insights, gdpr, dsgvo 5 Version: 2.3. 46 Stable tag: 2.3. 45 Version: 2.3.5 6 Stable tag: 2.3.5 7 7 Requires at least: 4.8.0 8 Tested up to: 5.58 Tested up to: 6.1.1 9 9 Requires PHP: 5.6.0 10 10 License: GPLv2 … … 12 12 13 13 14 Provides an Opt-Out functionality for Google Analytics14 Provides opt-out functionality for Google Analytics. 15 15 16 16 == Description == 17 17 18 This plugin provides an Opt-Out functionality for Google Analytics by setting a cookie that prevents analytics.js or gtag.js to collect data. The new GDPR rules requiresan opt-out.18 This plugin provides opt-out functionality for Google Analytics by setting a cookie that prevents analytics.js or gtag.js from collecting data. The new GDPR rules require an opt-out. 19 19 20 Works perfectly together with the [Google Analytics by MonsterInsights Plugin](http://wordpress.org/plugins/google-analytics-for-wordpress/ "Google Analytics by MonsterInsights Plugin"). However the plugin is not necessary to configure the opt-out feature. Just enter your UA- or GA-Code manually. That's it!20 Works perfectly with the [Google Analytics by MonsterInsights Plugin] (http://wordpress.org/plugins/google-analytics-for-wordpress/ "Google Analytics by MonsterInsights Plugin"). However, the plugin is not required to configure the opt-out feature. Just enter your UA or GA code manually. And that's it! 21 21 22 The free and the pro version have now been merged together. So you now can have the option to activate a banner, too! Enjoy!22 The free and pro versions have now been merged. So now you can also activate a banner! Have fun with it! 23 23 24 24 == Installation == … … 43 43 == Changelog == 44 44 45 = 2.3.5 = 46 47 * Fixed a security issue that could lead to a XSS attack. Thanks to patchstack for reporting this issue. 45 48 46 49 = 2.3.4 = -
google-analytics-opt-out/trunk/google-analytics-opt-out.php
r2520244 r2864194 1 1 <?php 2 2 /* 3 Plugin Name: Opt-Out for Google Analytics3 Plugin Name: Google Analytics Opt-Out 4 4 Plugin URI: https://wp-buddy.com/products/plugins/google-analytics-opt-out 5 5 Description: Provides an Opt-Out functionality for Google Analytics 6 Version: 2.3. 46 Version: 2.3.5 7 7 Author: WP-Buddy 8 8 Author URI: https://wp-buddy.com … … 11 11 Domain Path: /languages/ 12 12 13 Copyright 202 0WP-Buddy (email : info@wp-buddy.com)13 Copyright 2023 WP-Buddy (email : info@wp-buddy.com) 14 14 15 15 This program is free software; you can redistribute it and/or modify -
google-analytics-opt-out/trunk/inc/settings.php
r2189612 r2864194 4 4 * Creating the menu item 5 5 * 6 * @ since 1.07 * @ return void6 * @return void 7 * @since 1.0 8 8 */ 9 9 function gaoop_admin_menu() { … … 22 22 * Creating the settings page HTML output 23 23 * 24 * @ since 1.025 * @ return void24 * @return void 25 * @since 1.0 26 26 */ 27 27 function gaoop_settings_page() { … … 52 52 * Enqueues the settings page scripts and styles 53 53 * 54 * @ since 1.055 * @ return void54 * @return void 55 * @since 1.0 56 56 */ 57 57 function gaoop_settings_scripts() { … … 64 64 * Registers Settings sections and fields 65 65 * 66 * @ since 1.067 * @ return void66 * @return void 67 * @since 1.0 68 68 */ 69 69 function gaoop_register_theme_options_section() { … … 72 72 73 73 add_settings_field( 'gaoop_yoast', __( 'Use Monster Insights Settings', 'google-analytics-opt-out' ), 'gaoop_options_yoast', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_yoast' ) ); 74 register_setting( 'gaoop_options_page', 'gaoop_yoast', 'intval' ); 75 76 add_settings_field( 'gaoop_property', __( 'UA- or GA-Code', 'google-analytics-opt-out' ), 'gaoop_options_property', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_property' ) ); 77 register_setting( 'gaoop_options_page', 'gaoop_property', 'sanitize_text_field' ); 74 register_setting( 'gaoop_options_page', 'gaoop_yoast', [ 75 'sanitize_callback' => 'intval' 76 ] ); 77 78 add_settings_field( 'gaoop_property', __( 'UA-, GA-Code or G-Code', 'google-analytics-opt-out' ), 'gaoop_options_property', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_property' ) ); 79 register_setting( 'gaoop_options_page', 'gaoop_property', [ 80 'sanitize_callback' => function ( $val ) { 81 return sanitize_text_field( htmlspecialchars( $val ) ); 82 } 83 ] ); 78 84 79 85 add_settings_field( 'gaoop_editor_button', __( 'Show Editor button (Classic Editor)', 'google-analytics-opt-out' ), 'gaoop_options_editor_button', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_editor_button' ) ); 80 register_setting( 'gaoop_options_page', 'gaoop_editor_button', 'intval' ); 86 register_setting( 'gaoop_options_page', 'gaoop_editor_button', [ 87 'sanitize_callback' => 'intval' 88 ] ); 81 89 82 90 add_settings_field( 'gaoop_opt_out_cookie_set_text', __( 'Opt-Out Successful', 'google-analytics-opt-out' ), 'gaoop_options_opt_out_cookie_set_text', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_opt_out_cookie_set_text' ) ); 83 register_setting( 'gaoop_options_page', 'gaoop_opt_out_cookie_set_text', 'sanitize_text_field' ); 91 register_setting( 'gaoop_options_page', 'gaoop_opt_out_cookie_set_text', [ 92 'sanitize_callback' => function ( $val ) { 93 return sanitize_text_field( htmlspecialchars( $val ) ); 94 } 95 ] ); 84 96 85 97 add_settings_field( 'gaoop_banner', __( 'Use Banner', 'google-analytics-opt-out' ), 'gaoop_options_banner', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_banner' ) ); 86 register_setting( 'gaoop_options_page', 'gaoop_banner', 'intval' ); 98 register_setting( 'gaoop_options_page', 'gaoop_banner', [ 99 'sanitize_callback' => 'intval' 100 ] ); 87 101 88 102 add_settings_field( 'gaoop_opt_out_text', __( 'Opt-Out Banner-Text', 'google-analytics-opt-out' ), 'gaoop_options_opt_out_text', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_opt_out_text' ) ); 89 register_setting( 'gaoop_options_page', 'gaoop_opt_out_text', 'wp_kses_post' ); 103 register_setting( 'gaoop_options_page', 'gaoop_opt_out_text', [ 104 'sanitize_callback' => 'wp_kses_post' 105 ] ); 90 106 91 107 add_settings_field( 'gaoop_opt_out_shortcode_integration', __( 'Integrate Shortcode', 'google-analytics-opt-out' ), 'gaoop_options_opt_out_shortcode_integration', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_opt_out_shortcode_integration' ) ); 92 register_setting( 'gaoop_options_page', 'gaoop_opt_out_shortcode_integration', 'sanitize_text_field' ); 108 register_setting( 'gaoop_options_page', 'gaoop_opt_out_shortcode_integration', [ 109 'sanitize_callback' => function ( $val ) { 110 return sanitize_text_field( htmlspecialchars( $val ) ); 111 } 112 ] ); 93 113 94 114 add_settings_field( 'gaoop_hide', __( 'Hide banner after closing', 'google-analytics-opt-out' ), 'gaoop_options_hide', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_hide' ) ); 95 register_setting( 'gaoop_options_page', 'gaoop_hide', 'intval' ); 115 register_setting( 'gaoop_options_page', 'gaoop_hide', [ 116 'sanitize_callback' => 'intval' 117 ] ); 96 118 97 119 add_settings_field( 'gaoop_custom_styles', __( 'Custom CSS', 'google-analytics-opt-out' ), 'gaoop_options_custom_styles', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_custom_styles' ) ); 98 register_setting( 'gaoop_options_page', 'gaoop_custom_styles' ); 99 120 register_setting( 'gaoop_options_page', 'gaoop_custom_styles', [ 121 'sanitize_callback' => function ( $value ) { 122 return wp_filter_nohtml_kses( $value ); 123 } 124 ] ); 100 125 101 126 } … … 107 132 * Settings field for the Yoast Checkbox 108 133 * 109 * @ since 1.0110 * @ return void134 * @return void 135 * @since 1.0 111 136 */ 112 137 function gaoop_options_yoast() { … … 139 164 * Settings field for the UA property 140 165 * 141 * @ since 1.0142 * @ return void166 * @return void 167 * @since 1.0 143 168 */ 144 169 function gaoop_options_property() { … … 161 186 * Settings field for the banner checkbox 162 187 * 188 * @return void 163 189 * @since 2.0.0 164 * @return void165 190 */ 166 191 function gaoop_options_banner() { … … 175 200 * Settings field for the banner checkbox 176 201 * 202 * @return void 177 203 * @since 2.1.0 178 * @return void179 204 */ 180 205 function gaoop_options_editor_button() { … … 191 216 * Settings field for the UA property 192 217 * 193 * @ since 1.0194 * @ return void218 * @return void 219 * @since 1.0 195 220 */ 196 221 function gaoop_options_opt_out_text() { … … 224 249 * Successful Opt-Out Text 225 250 * 226 * @ since 1.0227 * @ return void251 * @return void 252 * @since 1.0 228 253 */ 229 254 function gaoop_options_opt_out_cookie_set_text() { … … 236 261 * Settings field for the Hide checkbox 237 262 * 238 * @ since 1.0239 * @ return void263 * @return void 264 * @since 1.0 240 265 */ 241 266 function gaoop_options_hide() { … … 249 274 * Settings field for the custom CSS textarea 250 275 * 251 * @ since 1.0252 * @ return void276 * @return void 277 * @since 1.0 253 278 */ 254 279 function gaoop_options_custom_styles() { -
google-analytics-opt-out/trunk/readme.txt
r2520244 r2864194 1 === Opt-Out for Google Analytics===1 === Google Analytics Opt-Out === 2 2 Contributors: wp-buddy, floriansimeth 3 3 Donate link: https://wp-buddy.com/products/plugins/google-analytics-opt-out/ 4 4 Tags: google analytics opt-out, monster insights, gdpr, dsgvo 5 Version: 2.3. 46 Stable tag: 2.3. 45 Version: 2.3.5 6 Stable tag: 2.3.5 7 7 Requires at least: 4.8.0 8 Tested up to: 5.58 Tested up to: 6.1.1 9 9 Requires PHP: 5.6.0 10 10 License: GPLv2 … … 12 12 13 13 14 Provides an Opt-Out functionality for Google Analytics14 Provides opt-out functionality for Google Analytics. 15 15 16 16 == Description == 17 17 18 This plugin provides an Opt-Out functionality for Google Analytics by setting a cookie that prevents analytics.js or gtag.js to collect data. The new GDPR rules requiresan opt-out.18 This plugin provides opt-out functionality for Google Analytics by setting a cookie that prevents analytics.js or gtag.js from collecting data. The new GDPR rules require an opt-out. 19 19 20 Works perfectly together with the [Google Analytics by MonsterInsights Plugin](http://wordpress.org/plugins/google-analytics-for-wordpress/ "Google Analytics by MonsterInsights Plugin"). However the plugin is not necessary to configure the opt-out feature. Just enter your UA- or GA-Code manually. That's it!20 Works perfectly with the [Google Analytics by MonsterInsights Plugin] (http://wordpress.org/plugins/google-analytics-for-wordpress/ "Google Analytics by MonsterInsights Plugin"). However, the plugin is not required to configure the opt-out feature. Just enter your UA or GA code manually. And that's it! 21 21 22 The free and the pro version have now been merged together. So you now can have the option to activate a banner, too! Enjoy!22 The free and pro versions have now been merged. So now you can also activate a banner! Have fun with it! 23 23 24 24 == Installation == … … 43 43 == Changelog == 44 44 45 = 2.3.5 = 46 47 * Fixed a security issue that could lead to a XSS attack. Thanks to patchstack for reporting this issue. 45 48 46 49 = 2.3.4 =
Note: See TracChangeset
for help on using the changeset viewer.