Plugin Directory

Changeset 2864194


Ignore:
Timestamp:
02/13/2023 07:25:16 AM (3 years ago)
Author:
wp-buddy
Message:

Update to 2.3.5

Location:
google-analytics-opt-out
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • google-analytics-opt-out/tags/2.3.5/google-analytics-opt-out.php

    r2520244 r2864194  
    11<?php
    22/*
    3 Plugin Name: Opt-Out for Google Analytics
     3Plugin Name: Google Analytics Opt-Out
    44Plugin URI: https://wp-buddy.com/products/plugins/google-analytics-opt-out
    55Description: Provides an Opt-Out functionality for Google Analytics
    6 Version: 2.3.4
     6Version: 2.3.5
    77Author: WP-Buddy
    88Author URI: https://wp-buddy.com
     
    1111Domain Path: /languages/
    1212
    13 Copyright 2020 WP-Buddy  (email : info@wp-buddy.com)
     13Copyright 2023 WP-Buddy  (email : info@wp-buddy.com)
    1414
    1515This program is free software; you can redistribute it and/or modify
  • google-analytics-opt-out/tags/2.3.5/inc/settings.php

    r2189612 r2864194  
    44 * Creating the menu item
    55 *
    6  * @since 1.0
    7  * @return void
     6 * @return void
     7 * @since 1.0
    88 */
    99function gaoop_admin_menu() {
     
    2222 * Creating the settings page HTML output
    2323 *
    24  * @since 1.0
    25  * @return void
     24 * @return void
     25 * @since 1.0
    2626 */
    2727function gaoop_settings_page() {
     
    5252 * Enqueues the settings page scripts and styles
    5353 *
    54  * @since 1.0
    55  * @return void
     54 * @return void
     55 * @since 1.0
    5656 */
    5757function gaoop_settings_scripts() {
     
    6464 * Registers Settings sections and fields
    6565 *
    66  * @since 1.0
    67  * @return void
     66 * @return void
     67 * @since 1.0
    6868 */
    6969function gaoop_register_theme_options_section() {
     
    7272
    7373    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    ] );
    7884
    7985    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    ] );
    8189
    8290    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    ] );
    8496
    8597    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    ] );
    87101
    88102    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    ] );
    90106
    91107    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    ] );
    93113
    94114    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    ] );
    96118
    97119    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    ] );
    100125
    101126}
     
    107132 * Settings field for the Yoast Checkbox
    108133 *
    109  * @since 1.0
    110  * @return void
     134 * @return void
     135 * @since 1.0
    111136 */
    112137function gaoop_options_yoast() {
     
    139164 * Settings field for the UA property
    140165 *
    141  * @since 1.0
    142  * @return void
     166 * @return void
     167 * @since 1.0
    143168 */
    144169function gaoop_options_property() {
     
    161186 * Settings field for the banner checkbox
    162187 *
     188 * @return void
    163189 * @since 2.0.0
    164  * @return void
    165190 */
    166191function gaoop_options_banner() {
     
    175200 * Settings field for the banner checkbox
    176201 *
     202 * @return void
    177203 * @since 2.1.0
    178  * @return void
    179204 */
    180205function gaoop_options_editor_button() {
     
    191216 * Settings field for the UA property
    192217 *
    193  * @since 1.0
    194  * @return void
     218 * @return void
     219 * @since 1.0
    195220 */
    196221function gaoop_options_opt_out_text() {
     
    224249 * Successful Opt-Out Text
    225250 *
    226  * @since 1.0
    227  * @return void
     251 * @return void
     252 * @since 1.0
    228253 */
    229254function gaoop_options_opt_out_cookie_set_text() {
     
    236261 * Settings field for the Hide checkbox
    237262 *
    238  * @since 1.0
    239  * @return void
     263 * @return void
     264 * @since 1.0
    240265 */
    241266function gaoop_options_hide() {
     
    249274 * Settings field for the custom CSS textarea
    250275 *
    251  * @since 1.0
    252  * @return void
     276 * @return void
     277 * @since 1.0
    253278 */
    254279function 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 ===
    22Contributors: wp-buddy, floriansimeth
    33Donate link: https://wp-buddy.com/products/plugins/google-analytics-opt-out/
    44Tags: google analytics opt-out, monster insights, gdpr, dsgvo
    5 Version: 2.3.4
    6 Stable tag: 2.3.4
     5Version: 2.3.5
     6Stable tag: 2.3.5
    77Requires at least: 4.8.0
    8 Tested up to: 5.5
     8Tested up to: 6.1.1
    99Requires PHP: 5.6.0
    1010License: GPLv2
     
    1212
    1313
    14 Provides an Opt-Out functionality for Google Analytics
     14Provides opt-out functionality for Google Analytics.
    1515
    1616== Description ==
    1717
    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 requires an opt-out.
     18This 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.
    1919
    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!
     20Works 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!
    2121
    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!
     22The free and pro versions have now been merged. So now you can also activate a banner! Have fun with it!
    2323
    2424== Installation ==
     
    4343== Changelog ==
    4444
     45= 2.3.5 =
     46
     47* Fixed a security issue that could lead to a XSS attack. Thanks to patchstack for reporting this issue.
    4548
    4649= 2.3.4 =
  • google-analytics-opt-out/trunk/google-analytics-opt-out.php

    r2520244 r2864194  
    11<?php
    22/*
    3 Plugin Name: Opt-Out for Google Analytics
     3Plugin Name: Google Analytics Opt-Out
    44Plugin URI: https://wp-buddy.com/products/plugins/google-analytics-opt-out
    55Description: Provides an Opt-Out functionality for Google Analytics
    6 Version: 2.3.4
     6Version: 2.3.5
    77Author: WP-Buddy
    88Author URI: https://wp-buddy.com
     
    1111Domain Path: /languages/
    1212
    13 Copyright 2020 WP-Buddy  (email : info@wp-buddy.com)
     13Copyright 2023 WP-Buddy  (email : info@wp-buddy.com)
    1414
    1515This program is free software; you can redistribute it and/or modify
  • google-analytics-opt-out/trunk/inc/settings.php

    r2189612 r2864194  
    44 * Creating the menu item
    55 *
    6  * @since 1.0
    7  * @return void
     6 * @return void
     7 * @since 1.0
    88 */
    99function gaoop_admin_menu() {
     
    2222 * Creating the settings page HTML output
    2323 *
    24  * @since 1.0
    25  * @return void
     24 * @return void
     25 * @since 1.0
    2626 */
    2727function gaoop_settings_page() {
     
    5252 * Enqueues the settings page scripts and styles
    5353 *
    54  * @since 1.0
    55  * @return void
     54 * @return void
     55 * @since 1.0
    5656 */
    5757function gaoop_settings_scripts() {
     
    6464 * Registers Settings sections and fields
    6565 *
    66  * @since 1.0
    67  * @return void
     66 * @return void
     67 * @since 1.0
    6868 */
    6969function gaoop_register_theme_options_section() {
     
    7272
    7373    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    ] );
    7884
    7985    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    ] );
    8189
    8290    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    ] );
    8496
    8597    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    ] );
    87101
    88102    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    ] );
    90106
    91107    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    ] );
    93113
    94114    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    ] );
    96118
    97119    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    ] );
    100125
    101126}
     
    107132 * Settings field for the Yoast Checkbox
    108133 *
    109  * @since 1.0
    110  * @return void
     134 * @return void
     135 * @since 1.0
    111136 */
    112137function gaoop_options_yoast() {
     
    139164 * Settings field for the UA property
    140165 *
    141  * @since 1.0
    142  * @return void
     166 * @return void
     167 * @since 1.0
    143168 */
    144169function gaoop_options_property() {
     
    161186 * Settings field for the banner checkbox
    162187 *
     188 * @return void
    163189 * @since 2.0.0
    164  * @return void
    165190 */
    166191function gaoop_options_banner() {
     
    175200 * Settings field for the banner checkbox
    176201 *
     202 * @return void
    177203 * @since 2.1.0
    178  * @return void
    179204 */
    180205function gaoop_options_editor_button() {
     
    191216 * Settings field for the UA property
    192217 *
    193  * @since 1.0
    194  * @return void
     218 * @return void
     219 * @since 1.0
    195220 */
    196221function gaoop_options_opt_out_text() {
     
    224249 * Successful Opt-Out Text
    225250 *
    226  * @since 1.0
    227  * @return void
     251 * @return void
     252 * @since 1.0
    228253 */
    229254function gaoop_options_opt_out_cookie_set_text() {
     
    236261 * Settings field for the Hide checkbox
    237262 *
    238  * @since 1.0
    239  * @return void
     263 * @return void
     264 * @since 1.0
    240265 */
    241266function gaoop_options_hide() {
     
    249274 * Settings field for the custom CSS textarea
    250275 *
    251  * @since 1.0
    252  * @return void
     276 * @return void
     277 * @since 1.0
    253278 */
    254279function gaoop_options_custom_styles() {
  • google-analytics-opt-out/trunk/readme.txt

    r2520244 r2864194  
    1 === Opt-Out for Google Analytics ===
     1=== Google Analytics Opt-Out ===
    22Contributors: wp-buddy, floriansimeth
    33Donate link: https://wp-buddy.com/products/plugins/google-analytics-opt-out/
    44Tags: google analytics opt-out, monster insights, gdpr, dsgvo
    5 Version: 2.3.4
    6 Stable tag: 2.3.4
     5Version: 2.3.5
     6Stable tag: 2.3.5
    77Requires at least: 4.8.0
    8 Tested up to: 5.5
     8Tested up to: 6.1.1
    99Requires PHP: 5.6.0
    1010License: GPLv2
     
    1212
    1313
    14 Provides an Opt-Out functionality for Google Analytics
     14Provides opt-out functionality for Google Analytics.
    1515
    1616== Description ==
    1717
    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 requires an opt-out.
     18This 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.
    1919
    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!
     20Works 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!
    2121
    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!
     22The free and pro versions have now been merged. So now you can also activate a banner! Have fun with it!
    2323
    2424== Installation ==
     
    4343== Changelog ==
    4444
     45= 2.3.5 =
     46
     47* Fixed a security issue that could lead to a XSS attack. Thanks to patchstack for reporting this issue.
    4548
    4649= 2.3.4 =
Note: See TracChangeset for help on using the changeset viewer.