Plugin Directory


Ignore:
Timestamp:
05/02/2023 07:14:53 AM (3 years ago)
Author:
MooveAgency
Message:

Version 4.12.0 released

Location:
gdpr-cookie-compliance
Files:
97 added
5 edited

Legend:

Unmodified
Added
Removed
  • gdpr-cookie-compliance/trunk/class-moove-gdpr-actions.php

    r2903773 r2906848  
    694694        $initalization_delay    = isset( $modal_options['gdpr_initialization_delay'] ) && intval( $modal_options['gdpr_initialization_delay'] ) >= 0 ? intval( $modal_options['gdpr_initialization_delay'] ) : apply_filters( 'gdpr_init_script_delay', 2000 );
    695695
     696        $cookie_removal_static = isset( $modal_options['gdpr_cookie_removal'] ) ? intval( $modal_options['gdpr_cookie_removal'] ) : apply_filters( 'gdpr_ajax_cookie_removal', true );
     697        $cookie_removal_static = $cookie_removal_static ? 'false' : 'true';
     698
    696699        $loc_data            = array(
    697700            'ajaxurl'               => admin_url( 'admin-ajax.php' ),
     
    700703            'show_icons'            => apply_filters( 'gdpr_show_icons', 'all' ),
    701704            'is_page'               => is_page(),
    702             'ajax_cookie_removal'   => apply_filters( 'gdpr_ajax_cookie_removal', true ) ? 'true' : 'false',
     705            'ajax_cookie_removal'   => $cookie_removal_static,
    703706            'strict_init'           => isset( $modal_options['moove_gdpr_strictly_necessary_cookies_functionality'] ) && intval( $modal_options['moove_gdpr_strictly_necessary_cookies_functionality'] ) ? intval( $modal_options['moove_gdpr_strictly_necessary_cookies_functionality'] ) : 1,
    704707            'enabled_default'       => array(
     
    717720        );
    718721
    719         $ajax_script_handler = apply_filters( 'gdpr_cc_prevent_ajax_script_inject', false );
     722        $ajax_script_handler    = isset( $modal_options['script_insertion_method'] ) && intval( $modal_options['script_insertion_method'] ) >= 0 ? intval( $modal_options['script_insertion_method'] ) : apply_filters( 'gdpr_cc_prevent_ajax_script_inject', true );
     723
    720724
    721725        if ( $ajax_script_handler ) :
     
    836840        ob_start();
    837841        ?>
    838 
    839         <a href="https://wordpress.org/plugins/gdpr-cookie-compliance/" target="_blank" class='moove-gdpr-branding'><?php echo esc_attr( $powered_label ); ?>&nbsp; <span><?php esc_attr_e( 'GDPR Cookie Compliance', 'gdpr-cookie-compliance' ); ?></span></a>
     842        <a href="https://wordpress.org/plugins/gdpr-cookie-compliance/" <?php echo apply_filters('gdpr_branding_link_attributes', ''); ?> <?php echo apply_filters('gdpr_branding_link_target', 'target="_blank"'); ?> class='moove-gdpr-branding'><?php echo esc_attr( $powered_label ); ?>&nbsp; <span><?php esc_attr_e( 'GDPR Cookie Compliance', 'gdpr-cookie-compliance' ); ?></span></a>
    840843        <?php
    841844        return ob_get_clean();
  • gdpr-cookie-compliance/trunk/moove-gdpr.php

    r2903773 r2906848  
    55 *  Plugin URI: https://wordpress.org/plugins/gdpr-cookie-compliance/
    66 *  Description: Our plugin is useful in preparing your site for the following data protection and privacy regulations: GDPR, CCPA, PIPEDA, AAP, LGPD and others.
    7  *  Version: 4.11.2
     7 *  Version: 4.12.0
    88 *  Author: Moove Agency
    99 *  Domain Path: /languages
     
    1919} // Exit if accessed directly
    2020
    21 define( 'MOOVE_GDPR_VERSION', '4.11.2' );
     21define( 'MOOVE_GDPR_VERSION', '4.12.0' );
    2222if ( ! defined( 'MOOVE_SHOP_URL' ) ) :
    2323    define( 'MOOVE_SHOP_URL', 'https://shop.mooveagency.com' );
  • gdpr-cookie-compliance/trunk/readme.txt

    r2903773 r2906848  
    33Donate link: https://www.mooveagency.com/wordpress-plugins/gdpr-cookie-compliance/
    44Tags: GDPR, CCPA, DSGVO, cookie banner, cookie notice
    5 Stable tag: 4.11.2
     5Stable tag: 4.12.0
    66Requires at least: 4.5
    77Tested up to: 6.2
     
    277277
    278278== Changelog ==
     279= 4.12.0: 2 May 2023 =
     280* Static / Dynamic script insert options added - default method Static
     281* Static / Dynamic cookie removal options added - default method Static
     282* Added hook to modify powered by link attributes
     283* Added hook to modify powered by link target
     284
    279285= 4.11.2: 25 April 2023 =
    280286* Hook added to disable AJAX cookie removal
  • gdpr-cookie-compliance/trunk/views/moove/admin/settings/general-settings.php

    r2878897 r2906848  
    2929                $gfr = 0;
    3030            endif;
    31 
    3231            $gdpr_options['gdpr_force_reload'] = $gfr;
     32
     33            if ( isset( $_POST['script_insertion_method'] ) ) :
     34                $sim = intval( $_POST['script_insertion_method'] );
     35            else :
     36                $sim = 0;
     37            endif;
     38            $gdpr_options['script_insertion_method'] = $sim;
     39
     40            if ( isset( $_POST['gdpr_cookie_removal'] ) ) :
     41                $gcr = intval( $_POST['gdpr_cookie_removal'] );
     42            else :
     43                $gcr = 0;
     44            endif;
     45            $gdpr_options['gdpr_cookie_removal'] = $gcr;
    3346
    3447            $restricted_keys = array(
    3548                'moove_gdpr_modal_powered_by_disable',
    36                 'gdpr_force_reload'
     49                'gdpr_force_reload',
     50                'script_insertion_method',
     51                'gdpr_cookie_removal'
    3752            );
    38 
    3953           
    4054            foreach ( $_POST as $form_key => $form_value ) :
     
    8397
    8498$gdpr_force_reload  = isset( $gdpr_options['gdpr_force_reload'] ) && intval( $gdpr_options['gdpr_force_reload'] ) >= 0 ? intval( $gdpr_options['gdpr_force_reload'] ) : apply_filters( 'gdpr_force_reload', false );
     99$script_insertion_method    = isset( $gdpr_options['script_insertion_method'] ) && intval( $gdpr_options['script_insertion_method'] ) >= 0 ? intval( $gdpr_options['script_insertion_method'] ) : apply_filters( 'gdpr_cc_prevent_ajax_script_inject', true );
     100
     101$static_cookie_removal      = isset( $gdpr_options['gdpr_cookie_removal'] ) && intval( $gdpr_options['gdpr_cookie_removal'] ) >= 0 ? intval( $gdpr_options['gdpr_cookie_removal'] ) : apply_filters( 'gdpr_ajax_cookie_removal', true );
    85102
    86103
     
    105122                    <p class="description">
    106123                        <?php esc_html_e( 'Choose if you’d like the page to reload when user accepts cookies. If you choose not to, your analytical software will not count the current page visit as the cookies will be loaded during the next page load only.', 'gdpr-cookie-compliance' ); ?>
     124                    </p>
     125                    <!-- .description -->
     126                </td>
     127            </tr>
     128
     129            <tr>
     130                <th scope="row">
     131                    <label for="script_insertion_method"><?php esc_html_e( 'Script Insertion Method', 'gdpr-cookie-compliance' ); ?></label>
     132                </th>
     133                <td>
     134                    <!-- GDPR Rounded switch -->
     135                    <label class="gdpr-checkbox-toggle">
     136                        <input type="checkbox" name="script_insertion_method" id="script_insertion_method" <?php echo $script_insertion_method ? 'checked' : ''; ?> value="1" >
     137                        <span class="gdpr-checkbox-slider" data-enable="<?php esc_html_e( 'Static', 'gdpr-cookie-compliance' ); ?>" data-disable="<?php esc_html_e( 'Dynamic', 'gdpr-cookie-compliance' ); ?>"></span>
     138                    </label>
     139
     140                    <p class="description">
     141                        <?php esc_html_e( 'Recommended default method is Static. Switch to dynamic only if you experience issues with static method (dynamic way uses more server resources)', 'gdpr-cookie-compliance' ); ?>
     142                    </p>
     143                    <!-- .description -->
     144                </td>
     145            </tr>
     146
     147            <tr>
     148                <th scope="row">
     149                    <label for="gdpr_cookie_removal"><?php esc_html_e( 'Cookie Removal', 'gdpr-cookie-compliance' ); ?></label>
     150                </th>
     151                <td>
     152                    <!-- GDPR Rounded switch -->
     153                    <label class="gdpr-checkbox-toggle">
     154                        <input type="checkbox" name="gdpr_cookie_removal" id="gdpr_cookie_removal" <?php echo $static_cookie_removal ? 'checked' : ''; ?> value="1" >
     155                        <span class="gdpr-checkbox-slider" data-enable="<?php esc_html_e( 'Static', 'gdpr-cookie-compliance' ); ?>" data-disable="<?php esc_html_e( 'Dynamic', 'gdpr-cookie-compliance' ); ?>"></span>
     156                    </label>
     157
     158                    <p class="description">
     159                        <?php esc_html_e( 'Recommended default method is Static. Switch to dynamic for advanced cookie removal method if needed (uses more server performance)', 'gdpr-cookie-compliance' ); ?>
    107160                    </p>
    108161                    <!-- .description -->
  • gdpr-cookie-compliance/trunk/views/moove/admin/settings/help.php

    r2903773 r2906848  
    408408        </div>
    409409        <!--  .gdpr-faq-toggle -->
    410    
    411         <div class="gdpr-faq-toggle">
    412             <div class="gdpr-faq-accordion-header">
    413                 <h3><?php esc_html_e( 'Prevent AJAX script injection', 'gdpr-cookie-compliance' ); ?></h3>
    414             </div>
    415             <div class="gdpr-faq-accordion-content" >
    416                 <p><?php esc_html_e( 'By default, our plugin uses AJAX script injection to function properly, however, this may sometimes cause high server load. For that reason, you can disable the AJAX script and enable static script injection using the following hook. You will also need to purge all caches for the hook to start working.', 'gdpr-cookie-compliance' ); ?></p>
    417                 <?php ob_start(); ?>
    418                 add_action( 'gdpr_cc_prevent_ajax_script_inject', '__return_true' );
    419                 <?php $code = trim( ob_get_clean() ); ?>
    420                 <textarea id="<?php echo esc_attr( uniqid( strtotime( 'now' ) ) ); ?>"><?php apply_filters( 'gdpr_cc_keephtml', $code, true ); ?></textarea>
    421                 <div class="gdpr-code"></div><!--  .gdpr-code -->
    422             </div>
    423             <!--  .gdpr-faq-accordion-content -->
    424         </div>
    425         <!--  .gdpr-faq-toggle --> 
    426 
    427         <div class="gdpr-faq-toggle">
    428             <div class="gdpr-faq-accordion-header">
    429                 <h3><?php esc_html_e( 'Prevent AJAX cookie removal', 'gdpr-cookie-compliance' ); ?></h3>
    430             </div>
    431             <div class="gdpr-faq-accordion-content" >
    432                 <?php ob_start(); ?>
    433                 add_filter( 'gdpr_ajax_cookie_removal', '__return_false' );
    434                 <?php $code = trim( ob_get_clean() ); ?>
    435                 <textarea id="<?php echo esc_attr( uniqid( strtotime( 'now' ) ) ); ?>"><?php apply_filters( 'gdpr_cc_keephtml', $code, true ); ?></textarea>
    436                 <div class="gdpr-code"></div><!--  .gdpr-code -->
    437             </div>
    438             <!--  .gdpr-faq-accordion-content -->
    439         </div>
    440         <!--  .gdpr-faq-toggle -->     
    441 
    442 
    443 
     410
     411        <div class="gdpr-faq-toggle">
     412            <div class="gdpr-faq-accordion-header">
     413                <h3><?php esc_html_e( 'GDPR Branding link extra attributes', 'gdpr-cookie-compliance' ); ?></h3>
     414            </div>
     415            <div class="gdpr-faq-accordion-content" >
     416                <p><?php esc_html_e( 'You can add rel="noopener noreferrer" to Powered by GDPR link.', 'gdpr-cookie-compliance' ); ?></p>
     417                <?php ob_start(); ?>
     418                add_filter( 'gdpr_branding_link_attributes', 'gdpr_branding_link_attributes_noopener' );
     419                function gdpr_branding_link_attributes_noopener( $atts ) {
     420                    $atts .= 'rel="noopener noreferrer"';
     421                    return $atts;
     422                }
     423                <?php $code = trim( ob_get_clean() ); ?>
     424                <textarea id="<?php echo esc_attr( uniqid( strtotime( 'now' ) ) ); ?>"><?php apply_filters( 'gdpr_cc_keephtml', $code, true ); ?></textarea>
     425                <div class="gdpr-code"></div><!--  .gdpr-code -->
     426            </div>
     427            <!--  .gdpr-faq-accordion-content -->
     428        </div>
     429        <!--  .gdpr-faq-toggle -->
     430
     431        <div class="gdpr-faq-toggle">
     432            <div class="gdpr-faq-accordion-header">
     433                <h3><?php esc_html_e( 'GDPR Branding link target', 'gdpr-cookie-compliance' ); ?></h3>
     434            </div>
     435            <div class="gdpr-faq-accordion-content" >
     436                <p><?php esc_html_e( 'You can remove the target="_blank" from Powered by GDPR link.', 'gdpr-cookie-compliance' ); ?></p>
     437                <?php ob_start(); ?>
     438                add_filter( 'gdpr_branding_link_target', '__return_empty_string' );
     439                <?php $code = trim( ob_get_clean() ); ?>
     440                <textarea id="<?php echo esc_attr( uniqid( strtotime( 'now' ) ) ); ?>"><?php apply_filters( 'gdpr_cc_keephtml', $code, true ); ?></textarea>
     441                <div class="gdpr-code"></div><!--  .gdpr-code -->
     442            </div>
     443            <!--  .gdpr-faq-accordion-content -->
     444        </div>
     445        <!--  .gdpr-faq-toggle -->   
    444446
    445447        <div class="gdpr-faq-toggle">
Note: See TracChangeset for help on using the changeset viewer.