Plugin Directory

Changeset 3333508


Ignore:
Timestamp:
07/24/2025 10:18:09 AM (8 months ago)
Author:
ccm19
Message:

fixed compatibility issues with custom editors

Location:
ccm19-integration/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ccm19-integration/trunk/ccm19-integration.php

    r3158122 r3333508  
    44    Plugin URI: https://www.ccm19.de
    55    Description: Integrates the CCM19 Cookie Consent Solution into WordPress
    6     Version: 1.1.7
     6    Version: 1.1.9
    77    Author: Papoo Software & Media GmbH
    88    Author URI: https://papoo-media.de
  • ccm19-integration/trunk/class-ccm19-integration.php

    r2798810 r3333508  
    127127     */
    128128    public function on_wp_head() {
    129         $integration_url = $this->get_integration_url();
    130        
     129        $is_thrive_editor = (
     130            (isset($_GET['tve']) && $_GET['tve'] === 'true') ||
     131            (isset($_GET['tcbf']) && $_GET['tcbf'] === 'true')
     132        );
     133        $is_iframe = isset($_SERVER['Sec-Fetch-Dest']) && $_SERVER['Sec-Fetch-Dest'] === 'iframe';
     134        $is_admin_area = is_admin();
     135        $is_customizer = is_customize_preview();
     136        $has_valid_referrer = empty($_SERVER['HTTP_REFERER']) || strpos($_SERVER['HTTP_REFERER'], '/wp-admin/') === false;
     137
     138        $should_add_script = (
     139            !$is_admin_area &&
     140            !$is_customizer &&
     141            $has_valid_referrer &&
     142            !$is_thrive_editor &&
     143            !$is_iframe
     144        );
     145
     146        if (!$should_add_script) {return;}
     147
     148        $integration_url = $this->get_integration_url();
     149
    131150        if ( $integration_url ) {
    132151            wp_print_script_tag( [ 'src' => $integration_url, 'referrerpolicy' => 'origin' ] );
     
    265284    }
    266285
    267     //custom error log function for development only
     286    //custom error log function for development only
    268287    public function custom_logs()
    269288    {
  • ccm19-integration/trunk/languages/ccm19-integration.pot

    r3176948 r3333508  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: CCM19 Integration 1.1.7\n"
     5"Project-Id-Version: CCM19 Integration 1.1.9\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ccm19-integration\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-10-22T10:41:12+00:00\n"
     12"POT-Creation-Date: 2024-11-04T13:23:48+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    3535msgstr ""
    3636
    37 #: class-ccm19-integration.php:85
    38 #: class-ccm19-integration.php:210
     37#: class-ccm19-integration.php:83
     38#: class-ccm19-integration.php:208
    3939msgid "General settings"
    4040msgstr ""
    4141
    42 #: class-ccm19-integration.php:98
     42#: class-ccm19-integration.php:96
    4343msgid "CCM19 code snippet"
    4444msgstr ""
    4545
    46 #: class-ccm19-integration.php:145
     46#: class-ccm19-integration.php:143
    4747msgid "CCM19 Integration Options"
    4848msgstr ""
    4949
    50 #: class-ccm19-integration.php:146
     50#: class-ccm19-integration.php:144
    5151#: options-page.php:2
    5252msgid "CCM19 Cookie Consent"
    5353msgstr ""
    5454
    55 #: class-ccm19-integration.php:174
     55#: class-ccm19-integration.php:172
    5656msgid "<p>Enter your code snippet from CCM19 below to integrate the cookie consent management with your website.</p>"
    5757msgstr ""
    5858
    59 #: class-ccm19-integration.php:175
     59#: class-ccm19-integration.php:173
    6060msgid "<p>If you don't yet have a CCM19 account or instance yet, buy or lease one on <a target=\"_blank\" href=\"https://ccm19.de\">ccm19.de</a>.</p>"
    6161msgstr ""
     
    6969msgstr ""
    7070
    71 #: options-page.php:24
    72 #: options-page.php:44
     71#: options-page.php:29
     72#: options-page.php:49
    7373msgid "Open CCM19 backend"
    7474msgstr ""
  • ccm19-integration/trunk/readme.txt

    r3176948 r3333508  
    33Tags: cookie consent, cookie law, eu privacy directive, GDPR, DSGVO
    44Requires at least: 5.1
    5 Tested up to: 6.7
    6 Stable tag: 1.1.8
     5Tested up to: 6.8
     6Stable tag: 1.1.9
    77Requires PHP: 5.6
    88License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.