Plugin Directory

Changeset 2355432


Ignore:
Timestamp:
08/09/2020 03:10:43 AM (6 years ago)
Author:
rbaronqc
Message:

Quantcast Choice TCFv1 (1.2.2) to TCFv2 (2.0.0) update

Location:
quantcast-choice
Files:
10 added
29 edited
1 copied

Legend:

Unmodified
Added
Removed
  • quantcast-choice/tags/2.0.0/README.txt

    r2053668 r2355432  
    11=== Quantcast Choice ===
    2 Version: 1.2.2
     2Version: 2.0.0
    33Contributors: rbaronqc
    4 Tags: GDPR, GDPR Consent, Quantcast, Quantcast Choice, QC Choice
     4Tags: GDPR, GDPR Consent, CCPA, ePrivacy, ePrivacy Directive, Quantcast, Quantcast Choice, QC Choice, CMP, Consent Management, Consent Management Platform, TCF v2, TCF v2.0
    55Requires at least: 4.0
    6 Tested up to: 4.9.4
    7 Stable tag: 1.2.2
     6Tested up to: 5.4.2
     7Stable tag: 2.0.0
    88
    9 The Quantcast Choice plugin implements the [Quantcast Choice GDPR Consent Tool - Consumer Demo](https://quantcast.mgr.consensu.org/index.html).
     9The Quantcast Choice plugin implements the [Quantcast Choice TCF v2.0 Consent Tool](https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordrpess&utm_medium=wp-org&utm_campaign=info&utm_term=tool&utm_content=choice) offering support for GDPR (including Non-IAB vendors), CCPA and ePrivacy Directive and automatically passing consent signals to the Data Layer.
     10
     11== TCF v2.0 Update ==
     12
     13August, 9, 2020 Plugin Update
     14Now supporting *TCF v2.0*, *CCPA*, *full theme customisation*, *Non-IAB vendor support*, *vendor customisation*, *and more*.
    1015
    1116== Description ==
    1217
    13 The Quantcast Choice plugin implements the [Quantcast Choice GDPR Consent Tool - Consumer Demo](https://quantcast.mgr.consensu.org/index.html).
     18Quantcast Choice is a fully customisable Consent Management Platform (CMP). The Quantcast Choice plugin implements the [Quantcast Choice TCF v2.0 Consent Tool](https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordrpess&utm_medium=wp-org&utm_campaign=info&utm_term=tool&utm_content=choice) on WordPress websites.  Quantcast Choice supports GDPR (including Non-IAB vendors), CCPA and ePrivacy Directive regulation compliance.
    1419
    15 IAB Europe announced a technical standard to support the digital advertising ecosystem in meeting the General Data Protection Regulation (GDPR) consumer consent requirements. This provides an implementation of that framework.
     20The Quantcast Choice Plugin can also automatically push IAB and Non-IAB vendor consent signals to the data layer for consumption by Google Tag Manager and other tools.
     21
     22  From you dashboard on quantcast.com you can set:
     231. Geo location targeting
     241. Add Non-IAB vendors
     251. Customise IAB vendor settings
     261. Enable and configure CCPA support
     271. Customise the CMP display style
     281. Customise the CMP messaging and links
     291. Customise the consent scope
     301. Customise the consent configuration.
     311. And more....
    1632
    1733== Installation ==
     
    1935This section describes how to install the plugin and get it working.
    2036
     371. Create your (free quantcast.com account)[https://www.quantcast.com/signin/register?qcRefer=/protect/sites/newUser?utm_source=wordpress&utm_medium=wp-org&utm_campaign=info&utm_term=desc-create-account&utm_content=choice]
     381. Get your (Quantcast Universal Tag ID)[https://help.quantcast.com/hc/en-us/articles/360051794614-Quantcast-Choice-TCFv2-GTM-Implementation-Guide-Finding-your-UTID?utm_source=wordpress&utm_medium=wp-org&utm_campaign=info&utm_term=get-utid&utm_content=choice]
    21391. Upload `quantcast-choice` to the `/wp-content/plugins/` directory
    22401. Activate the plugin through the 'Plugins' menu in WordPress
    23 1. Navigate to the Quantcast Choice admin page and configure your settings.
     411. Navigate to the Quantcast Choice admin page and follow the setup instructions.
    2442
    2543== Frequently Asked Questions ==
     
    3149For more information and resources about GDPR, visit the [IAB Europe’s GDPR informational website](https://www.iabeurope.eu/?s=gdpr).
    3250
    33 = When does the GDPR come in effect? =
    34 
    35 The GDPR will be enforceable beginning on May 25, 2018.
    36 
    3751= To whom does the GDPR apply? =
    3852
    3953The GDPR applies to any business, whether or not it is based in the EU, that processes the personal data of EU citizens. The GDPR applies to these businesses even if the goods or services that they offer are free.
    4054
    41 = How does Quantcast Choice, or a Consent Management Provider (CMP) solution work? =
    42 
    43 Quantcast, or any other IAB approved Consent Management Provider (CMP), provides publishers and advertisers with a mechanism to obtain consent, and then control which third-party vendors can request consent to track users of their websites and apps. [Read this white paper outlining the function of a CMP and the Quantcast Consent implementation](https://www.quantcast.com/resources/how-to-obtain-consumer-consent-under-gdpr/).
    44 
    4555== Screenshots ==
    4656
    47 1. Quantcast Choice - what a consumer would see.
    48 2. Quantcast Choice - purpose level consent screen.
    49 3. Quantcast Choice - vendor level consent screen.
     571. Choice UI - Initial screen
     582. Choice UI - More options screen
     593. Choice UI - IAB vendors
     604. Choice UI - Non-IAB vendors
     615. Choice UI - IAB vendor details
     626. Dashboard UI - Theme customisation 1
     637. Dashboard UI - Theme customisation 2
     648. Dashboard UI - Theme customisation 3
     659. Dashboard UI - IAB vendors
     6610. Dashboard UI - Non-IAB vendor list
     6711. Dashboard UI - Add Non-IAB vendor
     68
    5069
    5170== Changelog ==
     
    6887= 1.2.2 =
    6988* Adding Google Personalization option.
     89
     90= 2.0.0 =
     91* Complete *upgrade to TCV v2.0* that requires a *free* [quantcast.com account](https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=website&utm_campaign=tcfv2&utm_content=changelog)
     92* Complete IAB and Non-IAB vendor management from your quantcast.com dashboard.
     93* CCPA support
     94* Automatic consent value push to the Data Layer for signal consumption by Google Tag Manager
  • quantcast-choice/tags/2.0.0/admin/class-qc-choice-admin-pages.php

    r2053666 r2355432  
    5050
    5151    /**
     52     * Quantcast Universal Tag ID.
     53     *
     54     * @since    2.0.0
     55     * @access   private
     56     * @var      string    $qc_choice_cmp_utid    Quantcast Universal Tag ID.
     57     */
     58    private $qc_choice_cmp_utid;
     59
     60    /**
     61     * Enable automatic Data Layer push.
     62     *
     63     * @since    2.0.0
     64     * @access   private
     65     * @var      string    $qc_choice_cmp_datalayer_push    Enable automatic push of consent signals to the data layer.
     66     */
     67    private $qc_choice_cmp_datalayer_push;
     68
     69    /**
     70     * Enable the CMP to be shown to users.
     71     *
     72     * @since    2.0.0
     73     * @access   private
     74     * @var      string    $qc_choice_cmp_enable    Enable Quantcast Choice TCF v2.
     75     */
     76    private $qc_choice_cmp_enable;
     77
     78    /**
     79     * Enable CCPA automatically in the footer
     80     *
     81     * @since    2.0.0
     82     * @access   private
     83     * @var      string    $qc_choice_cmp_ccpa_wp_footer    Quantcast Universal Tag ID.
     84     */
     85    private $qc_choice_cmp_ccpa_wp_footer;
     86
     87    /**
    5288     * Initialize the class and set its properties.
    5389     *
     
    64100            ? $this->qc_choice_language
    65101            : $this->qc_choice_language_default;
     102
     103        $this->qc_choice_cmp_utid = esc_attr( get_option( 'qc_choice_cmp_utid' ) );
     104        $this->qc_choice_cmp_datalayer_push = esc_attr( get_option( 'qc_choice_cmp_datalayer_push' ) );
     105        $this->qc_choice_cmp_enable = esc_attr( get_option( 'qc_choice_cmp_enable' ) );
     106        $this->qc_choice_cmp_ccpa_wp_footer = esc_attr( get_option( 'qc_choice_cmp_ccpa_wp_footer' ) );
    66107
    67108        add_action( 'admin_init', array( $this, 'qc_choice_options_page_init' ) );
     
    230271     */
    231272    public function qc_choice_options() { ?>
    232 
    233273        <div class="wrap wrap-qc-choice-options">
    234             <div class="admin-header">
    235                 <div class="left"><h1><?php _e( 'Quantcast Choice Options', 'qc-choice' ); ?></h1></div>
    236                 <div class="right">
    237                     <div class='logo'>
    238                         <div>
    239                             <a target="_blank" href="<?php _e( 'https://www.quantcast.com', 'qc-choice' ); ?>" target="_blank">
    240                                 <img src="<?php echo plugins_url( 'quantcast-choice/admin/img/quantcast-logo.png' ); ?>" />
    241                             </a>
    242                         </div>
    243                         <div>
    244                             <a target="_blank" href="<?php _e( 'https://www.quantcast.com/gdpr', 'qc-choice' ); ?>" target="_blank"><?php _e( 'More About GDPR', 'qc-choice' ); ?></a>
    245                         </div>
    246                         <div>
    247                             <a target="_blank" href="<?php _e( 'https://www.quantcast.com/gdpr/consent-management-solution/', 'qc-choice' ); ?>" target="_blank"><?php _e( 'More about Quantcast Choice', 'qc-choice' ); ?></a>
    248                         </div>
    249                         <div>
    250                             <a target="_blank" href="<?php _e( 'https://www.quantcast.com/terms/quantcast-choice-terms-of-service/', 'qc-choice' ); ?>" target="_blank"><?php _e( 'Quantcast Choice Terms of Service', 'qc-choice' ); ?></a>
    251                         </div>
    252                     </div>
    253                 </div>
    254                 <div class="clear"></div>
     274
     275            <div class="plugin-title-wrapper">
     276                <h1><?php _e('Quantcast Choice - TCF v2.0', 'qc-choice'); ?></h1>
    255277            </div>
    256278
     
    261283                    $active_tab = $_GET[ 'tab' ];
    262284                } else {
    263                     $active_tab = 'general_configuration';
     285                    $active_tab = 'overview_screen';
    264286                }
    265287            ?>
    266288
    267             <h2 class="nav-tab-wrapper">
    268                 <?php if ( 'general_configuration' === $active_tab ) { ?>
    269                     <a href="?page=qc-choice-options&tab=general_configuration" class="nav-tab active"><?php _e( 'General Settings', 'qc-choice' ); ?></a>
     289            <div class="nav-tab-wrapper">
     290                <?php if ( 'overview_screen' === $active_tab ) { ?>
     291                    <a href="?page=qc-choice-options&tab=overview_screen" class="nav-tab active"><?php _e( 'Overview', 'qc-choice' ); ?></a>
    270292                <?php } else { ?>
    271                     <a href="?page=qc-choice-options&tab=general_configuration" class="nav-tab"><?php _e( 'General Settings', 'qc-choice' ); ?></a>
     293                    <a href="?page=qc-choice-options&tab=overview_screen" class="nav-tab"><?php _e( 'Overview', 'qc-choice' ); ?></a>
    272294                <?php }?>
    273295
    274                 <?php if ( 'initial_screen' === $active_tab ) { ?>
    275                     <a href="?page=qc-choice-options&tab=initial_screen" class="nav-tab active"><?php _e( 'Initial Screen', 'qc-choice' ); ?></a>
     296                <?php if ( 'tcfv2_screen' === $active_tab ) { ?>
     297                    <a href="?page=qc-choice-options&tab=tcfv2_screen" class="nav-tab active"><?php _e( 'TCF v2.0 Settings', 'qc-choice' ); ?></a>
    276298                <?php } else { ?>
    277                     <a href="?page=qc-choice-options&tab=initial_screen" class="nav-tab"><?php _e( 'Initial Screen', 'qc-choice' ); ?></a>
     299                    <a href="?page=qc-choice-options&tab=tcfv2_screen" class="nav-tab"><?php _e( 'TCF v2.0 Settings', 'qc-choice' ); ?></a>
    278300                <?php }?>
    279301
    280                 <?php if ( 'purpose_screen' === $active_tab ) { ?>
    281                     <a href="?page=qc-choice-options&tab=purpose_screen" class="nav-tab active"><?php _e( 'Purpose Screen', 'qc-choice' ); ?></a>
    282                 <?php } else { ?>
    283                     <a href="?page=qc-choice-options&tab=purpose_screen" class="nav-tab"><?php _e( 'Purpose Screen', 'qc-choice' ); ?></a>
    284                 <?php }?>
    285 
    286                 <?php if ( 'vendor_screen' === $active_tab ) { ?>
    287                     <a href="?page=qc-choice-options&tab=vendor_screen" class="nav-tab active"><?php _e( 'Vendor Screen', 'qc-choice' ); ?></a>
    288                 <?php } else { ?>
    289                     <a href="?page=qc-choice-options&tab=vendor_screen" class="nav-tab"><?php _e( 'Vendor Screen', 'qc-choice' ); ?></a>
    290                 <?php }?>
    291 
    292                 <?php if ( 'buttons' === $active_tab ) { ?>
    293                     <a href="?page=qc-choice-options&tab=buttons" class="nav-tab active"><?php _e( 'Buttons', 'qc-choice' ); ?></a>
    294                 <?php } else { ?>
    295                     <a href="?page=qc-choice-options&tab=buttons" class="nav-tab"><?php _e( 'Buttons', 'qc-choice' ); ?></a>
    296                 <?php }?>
    297             </h2>
     302                <?php
     303                // Only show the TCF v1 options if the UTID is not set.
     304                ?>
     305                <?php if( empty( $this->qc_choice_cmp_utid ) ) { ?>
     306                    <?php if ( 'general_configuration' === $active_tab ) { ?>
     307                        <a href="?page=qc-choice-options&tab=general_configuration" class="nav-tab active"><?php _e( 'General Settings', 'qc-choice' ); ?></a>
     308                    <?php } else { ?>
     309                        <a href="?page=qc-choice-options&tab=general_configuration" class="nav-tab"><?php _e( 'General Settings', 'qc-choice' ); ?></a>
     310                    <?php }?>
     311
     312                    <?php if ( 'initial_screen' === $active_tab ) { ?>
     313                        <a href="?page=qc-choice-options&tab=initial_screen" class="nav-tab active"><?php _e( 'Initial Screen', 'qc-choice' ); ?></a>
     314                    <?php } else { ?>
     315                        <a href="?page=qc-choice-options&tab=initial_screen" class="nav-tab"><?php _e( 'Initial Screen', 'qc-choice' ); ?></a>
     316                    <?php }?>
     317
     318                    <?php if ( 'purpose_screen' === $active_tab ) { ?>
     319                        <a href="?page=qc-choice-options&tab=purpose_screen" class="nav-tab active"><?php _e( 'Purpose Screen', 'qc-choice' ); ?></a>
     320                    <?php } else { ?>
     321                        <a href="?page=qc-choice-options&tab=purpose_screen" class="nav-tab"><?php _e( 'Purpose Screen', 'qc-choice' ); ?></a>
     322                    <?php }?>
     323
     324                    <?php if ( 'vendor_screen' === $active_tab ) { ?>
     325                        <a href="?page=qc-choice-options&tab=vendor_screen" class="nav-tab active"><?php _e( 'Vendor Screen', 'qc-choice' ); ?></a>
     326                    <?php } else { ?>
     327                        <a href="?page=qc-choice-options&tab=vendor_screen" class="nav-tab"><?php _e( 'Vendor Screen', 'qc-choice' ); ?></a>
     328                    <?php }?>
     329
     330                    <?php if ( 'buttons' === $active_tab ) { ?>
     331                        <a href="?page=qc-choice-options&tab=buttons" class="nav-tab active"><?php _e( 'Buttons', 'qc-choice' ); ?></a>
     332                    <?php } else { ?>
     333                        <a href="?page=qc-choice-options&tab=buttons" class="nav-tab"><?php _e( 'Buttons', 'qc-choice' ); ?></a>
     334                    <?php }?>
     335                <?php } ?>
     336            </div>
    298337
    299338            <form method="post" action="options.php">
    300339
    301                 <?php if( $active_tab === 'general_configuration' ) { ?>
     340                <?php if( $active_tab === 'overview_screen' ) { ?>
     341
     342                    <div class="tab-content">
     343                        <div class="tab-content-inside">
     344                            <div class='wordmark'>
     345                                <div>
     346                                    <a target="_blank" href="<?php _e( 'https://www.quantcast.com/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=logo&utm_content=choice', 'qc-choice' ); ?>" target="_blank">
     347                                        <img src="<?php echo plugins_url( 'quantcast-choice/admin/img/quantcast-choice-wordmark.png' ); ?>" />
     348                                    </a>
     349                                </div>
     350                            </div>
     351
     352                            <?php $hl_style = (empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) ? 'style="color:red;"' : ''; ?>
     353
     354                            <?php if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) { ?>
     355                                <h1 class="update-headline">
     356                                    <?php _e( '**Important - REQUIRED TCF v2.0 Update before August 16, 2020.', 'qc-choice' ); ?>
     357                                </h1>
     358                                <h4 class="update-subheadline">
     359                                    <?php _e( 'Follow the setup steps or video guide below, it only takes a few minutes.', 'qc-choice' ); ?>
     360                                </h4>
     361                            <?php } ?>
     362
     363                            <div class="instructions-wrapper">
     364                                <div class="instructions-box instructions-box-left">
     365                                    <div class="instructions-box-inside">
     366                                        <h4 <?php echo $hl_style ?>><?php _e('Choice TCF v2.0 Setup Intructions (Required)', 'qc-choice'); ?></h4>
     367                                        <ol>
     368                                            <li>
     369                                                <?php printf(
     370                                                    __(
     371                                                        'Create your <strong>Free</strong> <a %1$s href="%2$s">quantcast.com account</a>.',
     372                                                        'qc-choice'
     373                                                    ),
     374                                                    'target="_blank"',
     375                                                    esc_url('https://www.quantcast.com/signin/register?qcRefer=/protect/sites/newUser&utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=overview-create-account&utm_content=choice')
     376                                                );
     377                                                ?>
     378                                            </li>
     379                                            <li>
     380                                                <?php printf(
     381                                                    __(
     382                                                        'Add your website url, under "<a %1$s href="%2$s">Privacy</a>" in your the quantcast.com account dashboard.".',
     383                                                        'qc-choice'
     384                                                    ),
     385                                                    'target="_blank"',
     386                                                    esc_url('https://www.quantcast.com/protect/sites?utm_source=wordrpess&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=add-site&utm_content=chocie')
     387                                                );
     388                                                ?>
     389                                            </li>
     390                                            <li>
     391                                                <?php _e('Configure your CMP settings (name, logo, consent settings).', 'qc-choice'); ?>
     392                                            </li>
     393                                            <li>
     394                                                <?php printf(
     395                                                    __(
     396                                                        'Add your <strong>Universal Tag ID (UTID)</strong> & <strong>Enable Choice TCF v2.0</strong> on the <a %1$s href="%2$s">TCF v2.0 Settings</a> tab.',
     397                                                        'qc-choice'
     398                                                    ),
     399                                                    'target="_self"',
     400                                                    esc_url('/wp-admin/admin.php?page=qc-choice-options&tab=tcfv2_screen')
     401                                                );
     402                                                ?>
     403                                            </li>
     404                                        </ol>
     405                                        <br>
     406                                        <div class="text-right pointer-headline show-lg"><?php _e( 'Choice TCF v2.0 setup demo video -->', 'qc-choice' ); ?></div>
     407
     408                                        <h4><?php _e( 'Advanced setup (optional)', 'qc-choice' ); ?></h4>
     409                                        <ol>
     410                                            <li><?php _e( 'Add <strong>Non-IAB vendors</strong>.', 'qc-choice' ); ?></li>
     411                                            <li><?php _e( 'Enable <strong>CCPA support</strong>.', 'qc-choice' ); ?></li>
     412                                            <li><?php _e( '<strong>Customise the CMP display</strong> with a theme.', 'qc-choice' ); ?></li>
     413                                            <li><?php _e( '<strong>Enable Data Layer consent data push</strong>, automatically passing consent signals to Google Tag Manager for consumption by customer triggers and trigger groups.', 'qc-choice' ); ?></li>
     414                                        </ol>
     415
     416                                        <br>
     417                                        <h4><?php _e( 'Additional Setup & Configuration Help', 'qc-choice' ); ?></h4>
     418                                        <div>
     419
     420                                            <p>
     421                                                <?php printf(
     422                                                    __(
     423                                                        'Check out the <a %1$s href="%2$s">help center guides</a> for the list of configuration options and setup guides for Quantcast Choice TCF v2.0.',
     424                                                        'qc-choice'
     425                                                    ),
     426                                                    'target="_blank"',
     427                                                    esc_url('https://help.quantcast.com/hc/en-us/sections/360008320914-Configuration-Options-for-TCF-v2?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=cmp-configuration-help&utm_content=choice')
     428                                                );
     429                                                ?>
     430                                            </p>
     431                                        </div>
     432                                    </div>
     433                                </div>
     434                                <div class="instructions-box instructions-box-right">
     435                                    <div class="instructions-box-inside">
     436                                        <h4><?php _e( 'Choice TCF v2.0 setup demo video', 'qc-choice' ); ?></h4>
     437                                        <div class='embed-container'><iframe src='https://player.vimeo.com/video/445983282' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>
     438                                    </div>
     439                                </div>
     440                            </div>
     441
     442                            <br>
     443                            <hr>
     444                            <br><br>
     445                            <h3><?php _e('Additional Information'); ?></h3>
     446                            <div class="instructions-wrapper">
     447                                <div class="instructions-box instructions-box-left">
     448                                    <div class="instructions-box-inside">
     449                                        <div class="more-info-box">
     450                                            <div>
     451                                                <ul>
     452                                                    <li>
     453                                                        <strong>Purpose Notification</strong>
     454                                                        <p>Provides notices of the purpose and vendors for processing personal data.</p>
     455                                                    </li>
     456
     457                                                    <li>
     458                                                        <strong>Privacy Preferences</strong>
     459                                                        <p>Provides users options to allow or disallows processing on a granular basis under both the consent and legitimate interest legal basis.</p>
     460                                                    </li>
     461
     462                                                    <li>
     463                                                        <strong>Signal Storing & Sharing</strong>
     464                                                        <p>Signals vendor and purpose permissions for processing personal data.</p>
     465                                                    </li>
     466
     467                                                    <li>
     468                                                        <strong>Audit Log</strong>
     469                                                        <p>Site owners can access the audit log and use it to prove that consent was given.</p>
     470                                                    </li>
     471                                                </ul>
     472                                            </div>
     473                                            <div class="text-center">
     474                                                <a target="_blank" class="button" href="https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=learn-more&utm_content=choice">Learn more</a>
     475                                            </div>
     476                                        </div>
     477                                    </div>
     478                                </div>
     479                                <div class="instructions-box instructions-box-right">
     480                                    <div class="instructions-box-inside">
     481                                        <h4>More Resources</h4>
     482                                        <nav>
     483                                            <ul>
     484                                                <li>
     485                                                    <a target="_blank" href="<?php _e( esc_url('https://help.quantcast.com/hc/en-us/categories/360002940873-Quantcast-Choice?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=help&utm_content=choice'), 'qc-choice' ); ?>" target="_blank"><?php _e( 'Quantcast Choice Help Guides', 'qc-choice' ); ?></a>
     486                                                </li>
     487                                                <li>
     488                                                    <a target="_blank" href="<?php _e( esc_url('https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=learn-more&utm_content=choice'), 'qc-choice' ); ?>" target="_blank"><?php _e( 'More about Quantcast Choice', 'qc-choice' ); ?></a>
     489                                                </li>
     490                                                <li>
     491                                                    <a target="_blank" href="<?php _e( esc_url('https://www.quantcast.com/terms/quantcast-choice-terms-of-service/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=terms&utm_content=choice'), 'qc-choice' ); ?>" target="_blank"><?php _e( 'Quantcast Choice Terms of Service', 'qc-choice' ); ?></a>
     492                                                </li>
     493                                            </ul>
     494                                        </nav>
     495                                    </div>
     496                                </div>
     497                            </div>
     498                        </div>
     499                    </div>
     500
     501                <?php } elseif( $active_tab === 'tcfv2_screen' ) { ?>
     502
     503                    <?php settings_fields( 'choice-cmp-config' ); ?>
     504                    <?php do_settings_sections( 'choice-cmp-config' ); ?>
     505
     506                    <!-- Start - UI Configuration Section -->
     507                    <div class="tab-content">
     508                        <div class="tab-content-inside">
     509                            <table class="form-table" role="presentation">
     510                                <tbody>
     511                                    <tr valign="top">
     512                                        <th scope="row">
     513                                            <?php _e( 'Universal Tag ID (UTID)', 'qc-choice' ); ?>
     514                                        </th>
     515                                        <td>
     516                                            <?php if( empty($this->qc_choice_cmp_utid ) ) { ?>
     517                                                <div class="desc"><em style="color:red">A UTID value must be set in order to enable Choice TCF v2.0 for website visitors.</em></div>
     518                                            <?php } ?>
     519                                            <input name="qc_choice_cmp_utid" type="text" value="<?php echo $this->qc_choice_cmp_utid; ?>">
     520                                            <div class="desc">
     521                                                <div>
     522                                                    <?php printf(
     523                                                        __(
     524                                                            'If you already have a quantcast.com account you can find your UTID by following <a %1$s href="%2$s">this help center guide</a>.',
     525                                                            'qc-choice'
     526                                                        ),
     527                                                        'target="_blank"',
     528                                                        esc_url('https://help.quantcast.com/hc/en-us/articles/360051794614-Quantcast-Choice-TCFv2-GTM-Implementation-Guide-Finding-your-UTID?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=cmp-config-utid&utm_content=choice')
     529                                                    );
     530                                                    ?>
     531                                                </div>
     532                                                <div>
     533                                                    <?php printf(
     534                                                        __(
     535                                                            'If you do <strong>NOT</strong> have a quantcast.com account you can create one for <strong>FREE</strong> at quantcast.com. <a %1$s href="%2$s">Create quantcast.com account</a>. Detailed instructions and a video can be found on the <a %3$s href="%4$s">overview tab</a>.',
     536                                                            'qc-choice'
     537                                                        ),
     538                                                        'target="_blank"',
     539                                                        esc_url('https://www.quantcast.com/signin/register?qcRefer=/protect/sites/newUser&utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=settings-create-account&utm_content=choice'),
     540                                                        'target="_self"',
     541                                                        esc_url('/wp-admin/admin.php?page=qc-choice-options&tab=overview_screen')
     542                                                    );
     543                                                    ?>
     544                                                </div>
     545                                            </div>
     546
     547                                        </td>
     548                                    </tr>
     549
     550                                    <tr valign="top">
     551                                        <th scope="row">
     552                                            <?php _e( 'Enable Choice TCF v2.0', 'qc-choice' ); ?>
     553                                        </th>
     554                                        <td>
     555                                            <select name="qc_choice_cmp_enable">
     556                                                <option value="" <?php selected( $this->qc_choice_cmp_enable, '' ); ?>><?php _e( 'No', 'qc-choice' ); ?></option>
     557                                                <option value="all" <?php selected( $this->qc_choice_cmp_enable, 'all' ); ?>><?php _e( 'Yes', 'qc-choice' ); ?></option>
     558                                            </select>
     559                                            <?php if( empty($this->qc_choice_cmp_enable ) ) { ?>
     560                                                <div class="desc"><em style="color:red">Choice TCF v2.0 is current <strong>NOT</strong> enabled for website visitors.</em></div>
     561                                            <?php } ?>
     562                                        </td>
     563                                    </tr>
     564
     565                                    <tr valign="top">
     566                                        <th scope="row">
     567                                            <?php _e( 'Push IAB & Non-IAB consent data to the Data Layer', 'qc-choice' ); ?>
     568                                        </th>
     569                                        <td>
     570                                            <select name="qc_choice_cmp_datalayer_push">
     571                                                <option value="" <?php selected( $this->qc_choice_cmp_datalayer_push, '' ); ?>><?php _e( 'No', 'qc-choice' ); ?></option>
     572                                                <option value="true" <?php selected( $this->qc_choice_cmp_datalayer_push, 'true' ); ?>><?php _e( 'Yes', 'qc-choice' ); ?></option>
     573                                            </select>
     574                                            <div class="desc">
     575                                                <?php printf(
     576                                                    __(
     577                                                        'Learn more about using consent data passed to Google Tag Manager using Trigger events and Trigger groups to allow/block Non-IAB vendors. <a %1$s href="%2$s">View the guide</a>',
     578                                                        'qc-choice'
     579                                                    ),
     580                                                    'target="_blank"',
     581                                                    esc_url('https://help.quantcast.com/hc/en-us/articles/360051794134-Quantcast-Choice-TCFv2-Google-Tag-Manager-GTM-Implementation-Guide#h_01EEVBK4AENH0F5YPKHXH70PXX?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=datalayer-triggers&utm_content=choice')
     582                                                );
     583                                                ?>
     584                                            </div>
     585                                        </td>
     586                                    </tr>
     587
     588                                    <tr valign="top">
     589                                        <th scope="row">
     590                                            <?php _e( 'Automatically add footer CCPA message', 'qc-choice' ); ?>
     591                                            <div class="desc"><?php _e('You must also enable CCPA via the quantcast.com dashboard where you can also configure the popup style, text and links.', 'qc-choice'); ?></div>
     592                                        </th>
     593                                        <td>
     594                                            <select name="qc_choice_cmp_ccpa_wp_footer">
     595                                                <option value="" <?php selected( $this->qc_choice_cmp_ccpa_wp_footer, '' ); ?>><?php _e( 'Disable', 'qc-choice' ); ?></option>
     596                                                <option value="auto" <?php selected( $this->qc_choice_cmp_ccpa_wp_footer, 'auto' ); ?>><?php _e( 'Automatically add CCPA to footer', 'qc-choice' ); ?></option>
     597                                                <option value="manual" <?php selected( $this->qc_choice_cmp_ccpa_wp_footer, 'manual' ); ?>><?php _e( 'Manually place footer div', 'qc-choice' ); ?></option>
     598                                            </select>
     599                                            <div>
     600                                                <p class="desc">
     601                                                    <?php _e("You can select 'Manually place footer div' and add '<strong>&#x3C;div id=&#x22;choice-footer-msg&#x22;&#x3E;&#x3C;/div&#x3E;</strong>' your website template footer for manual CCPA message placement (The CCPA message & Do Not Sell My Data button will be added to the empty div automatically once Choice loads).", 'qc-choice'); ?>
     602                                                </p>
     603                                            </div>
     604                                        </td>
     605                                    </tr>
     606
     607                                    <?php if( ! empty($this->qc_choice_cmp_utid ) ) { ?>
     608                                        <tr valign="top">
     609                                        <th scope="row">
     610                                            <?php _e( 'CMP Configuration & Settings', 'qc-choice' ); ?>
     611                                        </th>
     612                                        <td>
     613                                            <div>
     614                                                <h4>
     615                                                    <?php printf(
     616                                                        __(
     617                                                            'Configuration options avaliable at <a %1$s href="%2$s">quantcast.com/protect/sites</a>.',
     618                                                            'qc-choice'
     619                                                        ),
     620                                                        'target="_blank"',
     621                                                        esc_url('https://www.quantcast.com/protect/sites?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=cmp-configuration&utm_content=choice')
     622                                                    );
     623                                                    ?>
     624                                                </h4>
     625                                            </div>
     626                                            <ol>
     627                                                <li><?php _e('<strong>Geo location</strong> targeting.', 'qc-choice'); ?></li>
     628                                                <li><?php _e('Add <strong>Non-IAB vendors</strong>.', 'qc-choice'); ?></li>
     629                                                <li><?php _e('Enable <strong>CCPA support</strong>.', 'qc-choice'); ?></li>
     630                                                <li><?php _e('<strong>Customise the CMP display</strong> with a theme.', 'qc-choice'); ?></li>
     631                                                <li><?php _e('Customise the <strong>CMP display position</strong>, text, links & other content and more.', 'qc-choice'); ?></li>
     632                                                <li><?php _e('Customise <strong>consent scope</strong>.', 'qc-choice'); ?></li>
     633                                                <li><?php _e('Customise <strong>consent configuration</strong>.', 'qc-choice'); ?></li>
     634                                                <li><?php _e('<strong>And more....</strong>', 'qc-choice'); ?></li>
     635                                            </ol>
     636                                            <div>
     637                                                <p><?php _e('Log into your quantcast.com account to customise your CMP.', 'qc-choice'); ?></p><br>
     638                                                <a class="btn button" target="_blank" href="<?php echo esc_url('https://www.quantcast.com/protect/sites?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=cmp-configuration&utm_content=choice'); ?>">
     639                                                    <?php _e('Go to your quantcast.com CMP dashboard', 'qc-choice'); ?>
     640                                                </a>
     641                                            </div>
     642                                        </td>
     643                                    </tr>
     644                                <?php } ?>
     645
     646                                </tbody>
     647                            </table>
     648                        </div>
     649                    </div>
     650                    <!-- END - UI Configuration Section -->
     651
     652                <?php } elseif( $active_tab === 'general_configuration' ) { ?>
    302653
    303654                    <?php settings_fields( 'qc-choice-general-config' ); ?>
     
    305656
    306657                    <!-- Start - UI Configuration Section -->
    307                     <table class="form-table options-form-table">
    308 
    309                         <tr valign="top">
    310                             <th scope="row" colspan="2">
    311                                 <h2><?php _e( 'General Settings', 'qc-choice' ); ?></h2>
    312                                 <hr>
    313                             </th>
    314                         </tr>
    315 
    316                         <?php $qc_choice_language = $this->get_option_qc_choice( 'qc_choice_language', $this->qc_choice_language ); ?>
    317                         <tr class="table-top-row" valign="top">
    318                             <th scope="row">
    319                                 <?php _e( 'UI Default Language', 'qc-choice' ); ?>
    320                                 <div class="desc"><?php _e( 'Select your language for default localized values.', 'qc-choice' ); ?></div>
    321                             </th>
    322                             <td class="col-2">
    323                                 <select name="qc_choice_language">
    324                                     <option value="en" <?php selected( $qc_choice_language, 'en' ); ?>><?php _e( 'English', 'qc-choice' ); ?></option>
    325                                     <option value="fr" <?php selected( $qc_choice_language, 'fr' ); ?>><?php _e( 'French', 'qc-choice' ); ?></option>
    326                                     <option value="de" <?php selected( $qc_choice_language, 'de' ); ?>><?php _e( 'German', 'qc-choice' ); ?></option>
    327                                     <option value="it" <?php selected( $qc_choice_language, 'it' ); ?>><?php _e( 'Italian', 'qc-choice' ); ?></option>
    328                                     <option value="es" <?php selected( $qc_choice_language, 'es' ); ?>><?php _e( 'Spanish', 'qc-choice' ); ?></option>
    329                                 </select>
    330                             </td>
    331                         </tr>
    332 
    333                         <?php $qc_choice_auto_localize = $this->get_option_qc_choice( 'qc_choice_auto_localize', $this->qc_choice_language ); ?>
    334                         <tr class="table-top-row" valign="top">
    335                             <th scope="row">
    336                                 <?php _e( 'Auto UI Language Localization', 'qc-choice' ); ?>
    337                                 <div class="desc"><?php _e( 'Attempt to detect the users site/browser language and localize content for supported languages, with a fallback to the "UI Default Language".', 'qc-choice' ); ?></div>
    338                             </th>
    339                             <td class="col-2">
    340                                 <select name="qc_choice_auto_localize">
    341                                     <option value="auto-localize-language" <?php selected( $qc_choice_auto_localize, "auto-localize-language" ); ?>><?php _e( 'Auto-Localize Language', 'qc-choice' ); ?></option>
    342                                     <option value="always-use-default-language" <?php selected( $qc_choice_auto_localize, "always-use-default-language" ); ?>><?php _e( 'Always Use the Default Language', 'qc-choice' ); ?></option>
    343                                 </select>
    344                             </td>
    345                         </tr>
    346 
    347                         <?php $qc_choice_display_ui = $this->get_option_qc_choice( 'qc_choice_display_ui', $this->qc_choice_language ); ?>
    348                         <tr class="table-top-row" valign="top">
    349                             <th scope="row">
    350                                 <?php _e( 'Display UI', 'qc-choice' ); ?>
    351                                 <div class="desc"><?php _e( 'Determines when and to whom the ui will be displayed.', 'qc-choice' ); ?></div>
    352                             </th>
    353                             <td class="col-2">
    354                                 <select name="qc_choice_display_ui">
    355                                     <option value="never" <?php selected( $qc_choice_display_ui, 'never' ); ?>><?php _e( 'Never', 'qc-choice' ); ?></option>
    356                                     <option value="always" <?php selected( $qc_choice_display_ui, 'always' ); ?>><?php _e( 'Always', 'qc-choice' ); ?></option>
    357                                     <option value="inEU" <?php selected( $qc_choice_display_ui, 'inEU' ); ?>><?php _e( 'EU Only', 'qc-choice' ); ?></option>
    358                                 </select>
    359                                 <div class="desc">
    360                                     <ul>
    361                                         <li><?php _e( 'EU Only - UI will be displayed to users in the EU when consent is required.', 'qc-choice' ); ?></li>
    362                                         <li><?php _e( 'Always - UI will be displayed to everyone when consent is required.', 'qc-choice' ); ?></li>
    363                                         <li><?php _e( 'Never - UI will never be shown.', 'qc-choice' ); ?></li>
    364                                     </ul>
    365                                 </div>
    366                             </td>
    367                         </tr>
    368 
    369                         <?php $qc_choice_display_layout = $this->get_option_qc_choice( 'qc_choice_display_layout', $this->qc_choice_language ); ?>
    370                         <tr class="table-top-row" valign="top">
    371                             <th scope="row">
    372                                 <?php _e( 'Display Layout', 'qc-choice' ); ?>
    373                                 <div class="desc"><?php _e( 'Determines the QC Choice display layout.', 'qc-choice' ); ?></div>
    374                             </th>
    375                             <td class="col-2">
    376                                 <select name="qc_choice_display_layout">
    377                                     <option value="popup" <?php selected( $qc_choice_display_layout, 'popup' ); ?>><?php _e( 'Popup Modal', 'qc-choice' ); ?></option>
    378                                     <option value="banner" <?php selected( $qc_choice_display_layout, 'banner' ); ?>><?php _e( 'Bottom Banner', 'qc-choice' ); ?></option>
    379                                 </select>
    380                             </td>
    381                         </tr>
    382 
    383                         <tr valign="top">
    384                             <th scope="row">
    385                                 <?php _e( 'Minimum Days Between UI Displays', 'qc-choice' ); ?>
    386                                 <div class="desc">
    387                                     <?php _e( 'Determines how often the CMP will check for an updated vendor list and get updated consent using the ui if there is an updated list.', 'qc-choice' ); ?>
    388                                 </div>
    389                             </th>
    390                             <td class="col-2">
    391                                 <input name="qc_choice_min_days_between_ui_displays" type="number" min="1" max="365" value="<?php echo $this->get_option_qc_choice( 'qc_choice_min_days_between_ui_displays', $this->qc_choice_language ); ?>">
    392                             </td>
    393                         </tr>
    394 
    395                         <tr valign="top">
    396                             <th scope="row">
    397                                 <?php _e( 'Non-Consent Display Frequency', 'qc-choice' ); ?>
    398                                 <div class="desc">
    399                                     <?php _e( 'The re-prompt frequency, in days, for users who have not given any positive consents; i.e. users who rejected all purposes and vendors.', 'qc-choice' ); ?>
    400                                 </div>
    401                             </th>
    402                             <td class="col-2">
    403                                 <input name="qc_choice_non_consent_display_frequency" type="number" min="1" max="365" value="<?php echo $this->get_option_qc_choice( 'qc_choice_non_consent_display_frequency', $this->qc_choice_language ); ?>">
    404                             </td>
    405                         </tr>
    406 
    407                         <?php $qc_choice_google_personalisation = $this->get_option_qc_choice( 'qc_choice_google_personalisation', $this->qc_choice_language ); ?>
    408                         <tr class="table-top-row" valign="top">
    409                             <th scope="row">
    410                                 <?php _e( 'Google Personalisation', 'qc-choice' ); ?>
    411                                 <div class="desc"><?php _e( 'Allow Google and their technology partners to collect data and use cookies for ad personalisation and measurement.', 'qc-choice' ); ?></div>
    412                             </th>
    413                             <td class="col-2">
    414                                 <select name="qc_choice_google_personalisation">
    415                                     <option value="true" <?php selected( $qc_choice_google_personalisation, "true" ); ?>><?php _e( 'Enable Google Personalisation', 'qc-choice' ); ?></option>
    416                                     <option value="false" <?php selected( $qc_choice_google_personalisation, "false" ); ?>><?php _e( 'Disable Google Personalisation', 'qc-choice' ); ?></option>
    417                                 </select>
    418                             </td>
    419                         </tr>
    420 
    421                         <tr valign="top">
    422                             <th scope="row">
    423                                 <?php _e( 'Post Consent Page URL', 'qc-choice' ); ?>
    424                                 <div class="desc">
    425                                     <?php _e( 'Determines if the cmp will redirect a user to different page when consent is not given for ALL global vendors and purposes. If any yes consents are given, the cmp will not redirect the user to the specified url.', 'qc-choice' ); ?>
    426                                 </div>
    427                             </th>
    428                             <td class="col-2">
    429                                 <input name="qc_choice_post_consent_page" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_post_consent_page', $this->qc_choice_language ); ?>">
    430                                 <div class="desc">
    431                                     <strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <?php _e( 'https://www.example.com/no-consnet', 'qc-choice' ); ?>
    432                                 </div>
    433                             </td>
    434                         </tr>
    435 
    436                         <tr valign="top">
    437                             <th class="col-1" scope="row">
    438                                 <?php _e( 'Publisher Name', 'qc-choice' ); ?>
    439                                 <div class="desc"><?php _e( 'The name of the company using the CMP, to be displayed in the UI.', 'qc-choice' ); ?></div>
    440                             </th>
    441                             <td class="col-2">
    442                                 <input name="qc_choice_publisher_name" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_publisher_name', $this->qc_choice_language ); ?>">
    443                             </td>
    444                         </tr>
    445 
    446                         <tr valign="top">
    447                             <th scope="row">
    448                                 <?php _e( 'Publisher Logo', 'qc-choice' ); ?>
    449                                 <div class="desc"><?php _e( 'A link to the logo of the company using the CMP, to be displayed in the UI.', 'qc-choice' ); ?></div>
    450                             </th>
    451                             <td class="col-2">
    452                                 <input name="qc_choice_publisher_logo" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_publisher_logo', $this->qc_choice_language ); ?>">
    453                                 <div class="desc">
    454                                     <strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <?php _e( 'https://www.example.com/logo.png', 'qc-choice' ); ?>
    455                                 </div>
    456                             </td>
    457                         </tr>
    458 
    459                     </table>
     658                    <div class="tab-content">
     659                        <div class="tab-content-inside">
     660
     661                            <?php $this->qc_choice_deprecated_header(); ?>
     662
     663                            <!-- Start - UI Configuration Section -->
     664                            <table class="form-table options-form-table form-table-disabled">
     665
     666                                <tr valign="top">
     667                                    <th scope="row" colspan="2">
     668                                        <h2><?php _e( 'General Settings', 'qc-choice' ); ?></h2>
     669                                        <hr>
     670                                    </th>
     671                                </tr>
     672
     673                                <?php $qc_choice_language = $this->get_option_qc_choice( 'qc_choice_language', $this->qc_choice_language ); ?>
     674                                <tr class="table-top-row" valign="top">
     675                                    <th scope="row">
     676                                        <?php _e( 'UI Default Language', 'qc-choice' ); ?>
     677                                        <div class="desc"><?php _e( 'Select your language for default localized values.', 'qc-choice' ); ?></div>
     678                                    </th>
     679                                    <td class="col-2">
     680                                        <select disabled name="qc_choice_language">
     681                                            <option value="en" <?php selected( $qc_choice_language, 'en' ); ?>><?php _e( 'English', 'qc-choice' ); ?></option>
     682                                            <option value="fr" <?php selected( $qc_choice_language, 'fr' ); ?>><?php _e( 'French', 'qc-choice' ); ?></option>
     683                                            <option value="de" <?php selected( $qc_choice_language, 'de' ); ?>><?php _e( 'German', 'qc-choice' ); ?></option>
     684                                            <option value="it" <?php selected( $qc_choice_language, 'it' ); ?>><?php _e( 'Italian', 'qc-choice' ); ?></option>
     685                                            <option value="es" <?php selected( $qc_choice_language, 'es' ); ?>><?php _e( 'Spanish', 'qc-choice' ); ?></option>
     686                                        </select>
     687                                    </td>
     688                                </tr>
     689
     690                                <?php $qc_choice_auto_localize = $this->get_option_qc_choice( 'qc_choice_auto_localize', $this->qc_choice_language ); ?>
     691                                <tr class="table-top-row" valign="top">
     692                                    <th scope="row">
     693                                        <?php _e( 'Auto UI Language Localization', 'qc-choice' ); ?>
     694                                        <div class="desc"><?php _e( 'Attempt to detect the users site/browser language and localize content for supported languages, with a fallback to the "UI Default Language".', 'qc-choice' ); ?></div>
     695                                    </th>
     696                                    <td class="col-2">
     697                                        <select disabled name="qc_choice_auto_localize">
     698                                            <option value="auto-localize-language" <?php selected( $qc_choice_auto_localize, "auto-localize-language" ); ?>><?php _e( 'Auto-Localize Language', 'qc-choice' ); ?></option>
     699                                            <option value="always-use-default-language" <?php selected( $qc_choice_auto_localize, "always-use-default-language" ); ?>><?php _e( 'Always Use the Default Language', 'qc-choice' ); ?></option>
     700                                        </select>
     701                                    </td>
     702                                </tr>
     703
     704                                <?php $qc_choice_display_ui = $this->get_option_qc_choice( 'qc_choice_display_ui', $this->qc_choice_language ); ?>
     705                                <tr class="table-top-row" valign="top">
     706                                    <th scope="row">
     707                                        <?php _e( 'Display UI', 'qc-choice' ); ?>
     708                                        <div class="desc"><?php _e( 'Determines when and to whom the ui will be displayed.', 'qc-choice' ); ?></div>
     709                                    </th>
     710                                    <td class="col-2">
     711                                        <select disabled name="qc_choice_display_ui">
     712                                            <option value="never" <?php selected( $qc_choice_display_ui, 'never' ); ?>><?php _e( 'Never', 'qc-choice' ); ?></option>
     713                                            <option value="always" <?php selected( $qc_choice_display_ui, 'always' ); ?>><?php _e( 'Always', 'qc-choice' ); ?></option>
     714                                            <option value="inEU" <?php selected( $qc_choice_display_ui, 'inEU' ); ?>><?php _e( 'EU Only', 'qc-choice' ); ?></option>
     715                                        </select>
     716                                        <div class="desc">
     717                                            <ul>
     718                                                <li><?php _e( 'EU Only - UI will be displayed to users in the EU when consent is required.', 'qc-choice' ); ?></li>
     719                                                <li><?php _e( 'Always - UI will be displayed to everyone when consent is required.', 'qc-choice' ); ?></li>
     720                                                <li><?php _e( 'Never - UI will never be shown.', 'qc-choice' ); ?></li>
     721                                            </ul>
     722                                        </div>
     723                                    </td>
     724                                </tr>
     725
     726                                <?php $qc_choice_display_layout = $this->get_option_qc_choice( 'qc_choice_display_layout', $this->qc_choice_language ); ?>
     727                                <tr class="table-top-row" valign="top">
     728                                    <th scope="row">
     729                                        <?php _e( 'Display Layout', 'qc-choice' ); ?>
     730                                        <div class="desc"><?php _e( 'Determines the QC Choice display layout.', 'qc-choice' ); ?></div>
     731                                    </th>
     732                                    <td class="col-2">
     733                                        <select disabled name="qc_choice_display_layout">
     734                                            <option value="popup" <?php selected( $qc_choice_display_layout, 'popup' ); ?>><?php _e( 'Popup Modal', 'qc-choice' ); ?></option>
     735                                            <option value="banner" <?php selected( $qc_choice_display_layout, 'banner' ); ?>><?php _e( 'Bottom Banner', 'qc-choice' ); ?></option>
     736                                        </select>
     737                                    </td>
     738                                </tr>
     739
     740                                <tr valign="top">
     741                                    <th scope="row">
     742                                        <?php _e( 'Minimum Days Between UI Displays', 'qc-choice' ); ?>
     743                                        <div class="desc">
     744                                            <?php _e( 'Determines how often the CMP will check for an updated vendor list and get updated consent using the ui if there is an updated list.', 'qc-choice' ); ?>
     745                                        </div>
     746                                    </th>
     747                                    <td class="col-2">
     748                                        <input disabled name="qc_choice_min_days_between_ui_displays" type="number" min="1" max="365" value="<?php echo $this->get_option_qc_choice( 'qc_choice_min_days_between_ui_displays', $this->qc_choice_language ); ?>">
     749                                    </td>
     750                                </tr>
     751
     752                                <tr valign="top">
     753                                    <th scope="row">
     754                                        <?php _e( 'Non-Consent Display Frequency', 'qc-choice' ); ?>
     755                                        <div class="desc">
     756                                            <?php _e( 'The re-prompt frequency, in days, for users who have not given any positive consents; i.e. users who rejected all purposes and vendors.', 'qc-choice' ); ?>
     757                                        </div>
     758                                    </th>
     759                                    <td class="col-2">
     760                                        <input disabled name="qc_choice_non_consent_display_frequency" type="number" min="1" max="365" value="<?php echo $this->get_option_qc_choice( 'qc_choice_non_consent_display_frequency', $this->qc_choice_language ); ?>">
     761                                    </td>
     762                                </tr>
     763
     764                                <?php $qc_choice_google_personalisation = $this->get_option_qc_choice( 'qc_choice_google_personalisation', $this->qc_choice_language ); ?>
     765                                <tr class="table-top-row" valign="top">
     766                                    <th scope="row">
     767                                        <?php _e( 'Google Personalisation', 'qc-choice' ); ?>
     768                                        <div class="desc"><?php _e( 'Allow Google and their technology partners to collect data and use cookies for ad personalisation and measurement.', 'qc-choice' ); ?></div>
     769                                    </th>
     770                                    <td class="col-2">
     771                                        <select disabled name="qc_choice_google_personalisation">
     772                                            <option value="true" <?php selected( $qc_choice_google_personalisation, "true" ); ?>><?php _e( 'Enable Google Personalisation', 'qc-choice' ); ?></option>
     773                                            <option value="false" <?php selected( $qc_choice_google_personalisation, "false" ); ?>><?php _e( 'Disable Google Personalisation', 'qc-choice' ); ?></option>
     774                                        </select>
     775                                    </td>
     776                                </tr>
     777
     778                                <tr valign="top">
     779                                    <th scope="row">
     780                                        <?php _e( 'Post Consent Page URL', 'qc-choice' ); ?>
     781                                        <div class="desc">
     782                                            <?php _e( 'Determines if the cmp will redirect a user to different page when consent is not given for ALL global vendors and purposes. If any yes consents are given, the cmp will not redirect the user to the specified url.', 'qc-choice' ); ?>
     783                                        </div>
     784                                    </th>
     785                                    <td class="col-2">
     786                                        <input disabled name="qc_choice_post_consent_page" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_post_consent_page', $this->qc_choice_language ); ?>">
     787                                        <div class="desc">
     788                                            <strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <?php _e( 'https://www.example.com/no-consnet', 'qc-choice' ); ?>
     789                                        </div>
     790                                    </td>
     791                                </tr>
     792
     793                                <tr valign="top">
     794                                    <th class="col-1" scope="row">
     795                                        <?php _e( 'Publisher Name', 'qc-choice' ); ?>
     796                                        <div class="desc"><?php _e( 'The name of the company using the CMP, to be displayed in the UI.', 'qc-choice' ); ?></div>
     797                                    </th>
     798                                    <td class="col-2">
     799                                        <input disabled name="qc_choice_publisher_name" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_publisher_name', $this->qc_choice_language ); ?>">
     800                                    </td>
     801                                </tr>
     802
     803                                <tr valign="top">
     804                                    <th scope="row">
     805                                        <?php _e( 'Publisher Logo', 'qc-choice' ); ?>
     806                                        <div class="desc"><?php _e( 'A link to the logo of the company using the CMP, to be displayed in the UI.', 'qc-choice' ); ?></div>
     807                                    </th>
     808                                    <td class="col-2">
     809                                        <input disabled name="qc_choice_publisher_logo" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_publisher_logo', $this->qc_choice_language ); ?>">
     810                                        <div class="desc">
     811                                            <strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <?php _e( 'https://www.example.com/logo.png', 'qc-choice' ); ?>
     812                                        </div>
     813                                    </td>
     814                                </tr>
     815
     816                            </table>
     817                        </div>
     818                    </div>
    460819                    <!-- END - UI Configuration Section -->
    461820
     
    465824                    <?php do_settings_sections( 'qc-choice-initial-screen' ); ?>
    466825
    467                     <!-- START - Initial Screen Settings -->
    468                     <table class="form-table options-form-table">
    469 
    470                         <tr valign="top">
    471                             <th scope="row" colspan="2">
    472                                 <h2><?php _e( 'Initial Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
    473                                 <hr>
    474                             </th>
    475                         </tr>
    476 
    477                         <tr class="table-top-row" valign="top">
    478                             <th class="col-1" scope="row">
    479                                 <?php _e( 'Initial Screen Title Text', 'qc-choice' ); ?>
    480                                 <div class="desc">
    481                                     <?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    482                                 </div>
    483                             </th>
    484                             <td class="col-2">
    485                                 <input name="qc_choice_initial_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_title_text', $this->qc_choice_language ); ?>">
    486                             </td>
    487                         </tr>
    488 
    489                         <tr valign="top">
    490                             <th class="col-1" scope="row">
    491                                 <?php _e( 'Body Text', 'qc-choice' ); ?>
    492                                 <div class="desc">
    493                                     <?php _e( "The main body text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    494                                 </div>
    495                             </th>
    496                             <td class="col-2">
    497                                 <?php $qc_choice_initial_screen_body_text_choices = $this->qc_choice_values->get_default_array_values( 'qc_choice_initial_screen_body_text', $this->qc_choice_language ); ?>
    498                                 <?php
    499                                 $qc_choice_initial_screen_body_text = $this->get_option_qc_choice( 'qc_choice_initial_screen_body_text', $this->qc_choice_language );
    500                                 if( is_array( $qc_choice_initial_screen_body_text ) ) {
    501                                     $qc_choice_initial_screen_body_text = 1;
    502                                 }
    503                                 ?>
    504                                 <select class="select-lg" name="qc_choice_initial_screen_body_text[<?php echo $this->qc_choice_language; ?>]">
    505                                     <?php if( is_array( $qc_choice_initial_screen_body_text_choices ) ) {
    506                                         foreach ($qc_choice_initial_screen_body_text_choices as $key => $value) { ?>
    507                                             <option value="<?php echo $key; ?>" <?php selected( $key, $qc_choice_initial_screen_body_text ); ?>><?php echo $value; ?></option>
    508                                         <?php }
    509                                     } ?>
    510                                 </select>
    511                             </td>
    512                         </tr>
    513 
    514                         <tr valign="top">
    515                             <th class="col-1" scope="row">
    516                                 <?php _e( 'Reject Button Text', 'qc-choice' ); ?>
    517                                 <div class="desc">
    518                                     <?php _e( "The reject consent button text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    519                                 </div>
    520                             </th>
    521                             <td class="col-2">
    522                                 <input name="qc_choice_initial_screen_reject_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_reject_button_text', $this->qc_choice_language ); ?>">
    523                             </td>
    524                         </tr>
    525 
    526                         <?php $qc_choice_initial_screen_no_option = $this->get_option_qc_choice( 'qc_choice_initial_screen_no_option', $this->qc_choice_language ); ?>
    527                         <tr valign="top">
    528                             <th class="col-1" scope="row">
    529                                 <?php _e( 'No Option', 'qc-choice' ); ?>
    530                                 <div class="desc">
    531                                     <?php _e( "Determines if the the reject consent button will be displayed on the initial global consent page.", 'qc-choice' ); ?>
    532                                 </div>
    533                             </th>
    534                             <td class="col-2">
    535                                 <select name="qc_choice_initial_screen_no_option">
    536                                     <option value="false" <?php selected( $qc_choice_initial_screen_no_option, 'false' ); ?>><?php _e( 'Do not display the Reject All Consent button on the initial screen.', 'qc-choice' ); ?></option>
    537                                     <option value="true" <?php selected( $qc_choice_initial_screen_no_option, 'true' ); ?>><?php _e( 'Display the Reject All Consent button on the initial screen.', 'qc-choice' ); ?></option>
    538                                 </select>
    539                             </td>
    540                         </tr>
    541 
    542                         <tr valign="top">
    543                             <th class="col-1" scope="row">
    544                                 <?php _e( 'Accept Button Text', 'qc-choice' ); ?>
    545                                 <div class="desc">
    546                                     <?php _e( "The accept consent button text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    547                                 </div>
    548                             </th>
    549                             <td class="col-2">
    550                                 <input name="qc_choice_initial_screen_accept_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_accept_button_text', $this->qc_choice_language ); ?>">
    551                             </td>
    552                         </tr>
    553 
    554                         <tr valign="top">
    555                             <th class="col-1" scope="row">
    556                                 <?php _e( 'Purpose Link Text', 'qc-choice' ); ?>
    557                                 <div class="desc">
    558                                     <?php _e( "The purpose link text on the initial global consent screen to be displayed in the ui. When clicked, the ui updates to display the purpose consent screen.", 'qc-choice' ); ?>
    559                                 </div>
    560                             </th>
    561                             <td class="col-2">
    562                                 <input name="qc_choice_initial_screen_purpose_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_purpose_link_text', $this->qc_choice_language ); ?>">
    563                             </td>
    564                         </tr>
    565 
    566                         <tr valign="top">
    567                             <th class="col-1" scope="row">
    568                                 <?php _e( 'Custom Link 1 Text', 'qc-choice' ); ?>
    569                                 <div class="desc">
    570                                     <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
    571                                 </div>
    572                             </th>
    573                             <td class="col-2">
    574                                 <input name="qc_choice_initial_screen_custom_link_1_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_1_text', $this->qc_choice_language ); ?>">
    575                             </td>
    576                         </tr>
    577 
    578                         <tr valign="top">
    579                             <th class="col-1" scope="row">
    580                                 <?php _e( 'Custom Link 1 URL ', 'qc-choice' ); ?>
    581                                 <div class="desc">
    582                                     <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
    583                                 </div>
    584                             </th>
    585                             <td class="col-2">
    586                                 <input name="qc_choice_initial_screen_custom_link_1_url[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_1_url', $this->qc_choice_language ); ?>">
    587                             </td>
    588                         </tr>
    589 
    590                         <tr valign="top">
    591                             <th class="col-1" scope="row">
    592                                 <?php _e( 'Custom Link 2 Text', 'qc-choice' ); ?>
    593                                 <div class="desc">
    594                                     <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
    595                                 </div>
    596                             </th>
    597                             <td class="col-2">
    598                                 <input name="qc_choice_initial_screen_custom_link_2_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_2_text', $this->qc_choice_language ); ?>">
    599                             </td>
    600                         </tr>
    601 
    602                         <tr valign="top">
    603                             <th class="col-1" scope="row">
    604                                 <?php _e( 'Custom Link 2 URL ', 'qc-choice' ); ?>
    605                                 <div class="desc">
    606                                     <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
    607                                 </div>
    608                             </th>
    609                             <td class="col-2">
    610                                 <input name="qc_choice_initial_screen_custom_link_2_url[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_2_url', $this->qc_choice_language ); ?>">
    611                             </td>
    612                         </tr>
    613 
    614                     </table>
    615                     <!-- END - Initial Screen Settings -->
     826                    <!-- Start - UI Configuration Section -->
     827                    <div class="tab-content">
     828                        <div class="tab-content-inside">
     829
     830                            <?php $this->qc_choice_deprecated_header(); ?>
     831
     832                            <!-- START - Initial Screen Settings -->
     833                            <table class="form-table options-form-table form-table-disabled">
     834
     835                                <tr valign="top">
     836                                    <th scope="row" colspan="2">
     837                                        <h2><?php _e( 'Initial Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
     838                                        <hr>
     839                                    </th>
     840                                </tr>
     841
     842                                <tr class="table-top-row" valign="top">
     843                                    <th class="col-1" scope="row">
     844                                        <?php _e( 'Initial Screen Title Text', 'qc-choice' ); ?>
     845                                        <div class="desc">
     846                                            <?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     847                                        </div>
     848                                    </th>
     849                                    <td class="col-2">
     850                                        <input disabled name="qc_choice_initial_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_title_text', $this->qc_choice_language ); ?>">
     851                                    </td>
     852                                </tr>
     853
     854                                <tr valign="top">
     855                                    <th class="col-1" scope="row">
     856                                        <?php _e( 'Body Text', 'qc-choice' ); ?>
     857                                        <div class="desc">
     858                                            <?php _e( "The main body text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     859                                        </div>
     860                                    </th>
     861                                    <td class="col-2">
     862                                        <?php $qc_choice_initial_screen_body_text_choices = $this->qc_choice_values->get_default_array_values( 'qc_choice_initial_screen_body_text', $this->qc_choice_language ); ?>
     863                                        <?php
     864                                        $qc_choice_initial_screen_body_text = $this->get_option_qc_choice( 'qc_choice_initial_screen_body_text', $this->qc_choice_language );
     865                                        if( is_array( $qc_choice_initial_screen_body_text ) ) {
     866                                            $qc_choice_initial_screen_body_text = 1;
     867                                        }
     868                                        ?>
     869                                        <select disabled class="select-lg" name="qc_choice_initial_screen_body_text[<?php echo $this->qc_choice_language; ?>]">
     870                                            <?php if( is_array( $qc_choice_initial_screen_body_text_choices ) ) {
     871                                                foreach ($qc_choice_initial_screen_body_text_choices as $key => $value) { ?>
     872                                                    <option value="<?php echo $key; ?>" <?php selected( $key, $qc_choice_initial_screen_body_text ); ?>><?php echo $value; ?></option>
     873                                                <?php }
     874                                            } ?>
     875                                        </select>
     876                                    </td>
     877                                </tr>
     878
     879                                <tr valign="top">
     880                                    <th class="col-1" scope="row">
     881                                        <?php _e( 'Reject Button Text', 'qc-choice' ); ?>
     882                                        <div class="desc">
     883                                            <?php _e( "The reject consent button text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     884                                        </div>
     885                                    </th>
     886                                    <td class="col-2">
     887                                        <input disabled name="qc_choice_initial_screen_reject_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_reject_button_text', $this->qc_choice_language ); ?>">
     888                                    </td>
     889                                </tr>
     890
     891                                <?php $qc_choice_initial_screen_no_option = $this->get_option_qc_choice( 'qc_choice_initial_screen_no_option', $this->qc_choice_language ); ?>
     892                                <tr valign="top">
     893                                    <th class="col-1" scope="row">
     894                                        <?php _e( 'No Option', 'qc-choice' ); ?>
     895                                        <div class="desc">
     896                                            <?php _e( "Determines if the the reject consent button will be displayed on the initial global consent page.", 'qc-choice' ); ?>
     897                                        </div>
     898                                    </th>
     899                                    <td class="col-2">
     900                                        <select disabled name="qc_choice_initial_screen_no_option">
     901                                            <option value="false" <?php selected( $qc_choice_initial_screen_no_option, 'false' ); ?>><?php _e( 'Do not display the Reject All Consent button on the initial screen.', 'qc-choice' ); ?></option>
     902                                            <option value="true" <?php selected( $qc_choice_initial_screen_no_option, 'true' ); ?>><?php _e( 'Display the Reject All Consent button on the initial screen.', 'qc-choice' ); ?></option>
     903                                        </select>
     904                                    </td>
     905                                </tr>
     906
     907                                <tr valign="top">
     908                                    <th class="col-1" scope="row">
     909                                        <?php _e( 'Accept Button Text', 'qc-choice' ); ?>
     910                                        <div class="desc">
     911                                            <?php _e( "The accept consent button text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     912                                        </div>
     913                                    </th>
     914                                    <td class="col-2">
     915                                        <input disabled name="qc_choice_initial_screen_accept_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_accept_button_text', $this->qc_choice_language ); ?>">
     916                                    </td>
     917                                </tr>
     918
     919                                <tr valign="top">
     920                                    <th class="col-1" scope="row">
     921                                        <?php _e( 'Purpose Link Text', 'qc-choice' ); ?>
     922                                        <div class="desc">
     923                                            <?php _e( "The purpose link text on the initial global consent screen to be displayed in the ui. When clicked, the ui updates to display the purpose consent screen.", 'qc-choice' ); ?>
     924                                        </div>
     925                                    </th>
     926                                    <td class="col-2">
     927                                        <input disabled name="qc_choice_initial_screen_purpose_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_purpose_link_text', $this->qc_choice_language ); ?>">
     928                                    </td>
     929                                </tr>
     930
     931                                <tr valign="top">
     932                                    <th class="col-1" scope="row">
     933                                        <?php _e( 'Custom Link 1 Text', 'qc-choice' ); ?>
     934                                        <div class="desc">
     935                                            <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
     936                                        </div>
     937                                    </th>
     938                                    <td class="col-2">
     939                                        <input disabled name="qc_choice_initial_screen_custom_link_1_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_1_text', $this->qc_choice_language ); ?>">
     940                                    </td>
     941                                </tr>
     942
     943                                <tr valign="top">
     944                                    <th class="col-1" scope="row">
     945                                        <?php _e( 'Custom Link 1 URL ', 'qc-choice' ); ?>
     946                                        <div class="desc">
     947                                            <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
     948                                        </div>
     949                                    </th>
     950                                    <td class="col-2">
     951                                        <input disabled name="qc_choice_initial_screen_custom_link_1_url[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_1_url', $this->qc_choice_language ); ?>">
     952                                    </td>
     953                                </tr>
     954
     955                                <tr valign="top">
     956                                    <th class="col-1" scope="row">
     957                                        <?php _e( 'Custom Link 2 Text', 'qc-choice' ); ?>
     958                                        <div class="desc">
     959                                            <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
     960                                        </div>
     961                                    </th>
     962                                    <td class="col-2">
     963                                        <input disabled name="qc_choice_initial_screen_custom_link_2_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_2_text', $this->qc_choice_language ); ?>">
     964                                    </td>
     965                                </tr>
     966
     967                                <tr valign="top">
     968                                    <th class="col-1" scope="row">
     969                                        <?php _e( 'Custom Link 2 URL ', 'qc-choice' ); ?>
     970                                        <div class="desc">
     971                                            <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
     972                                        </div>
     973                                    </th>
     974                                    <td class="col-2">
     975                                        <input disabled name="qc_choice_initial_screen_custom_link_2_url[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_2_url', $this->qc_choice_language ); ?>">
     976                                    </td>
     977                                </tr>
     978
     979                            </table>
     980                            <!-- END - Initial Screen Settings -->
     981                        </div>
     982                    </div>
    616983
    617984                <?php } elseif ($active_tab === 'purpose_screen') { ?>
     
    620987                    <?php do_settings_sections( 'qc-choice-purpose-screen' ); ?>
    621988
    622                     <!-- START - Purpose Screen Settings -->
    623                     <table class="form-table options-form-table">
    624 
    625                         <tr valign="top">
    626                             <th scope="row" colspan="2">
    627                                 <h2><?php _e( 'Purpose Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
    628                                 <hr>
    629                             </th>
    630                         </tr>
    631 
    632                         <tr class="table-top-row" valign="top">
    633                             <th class="col-1" scope="row">
    634                                 <?php _e( 'Header Title Text', 'qc-choice' ); ?>
    635                                 <div class="desc">
    636                                     <?php _e( "The title text in the purposes header on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
    637                                 </div>
    638                             </th>
    639                             <td class="col-2">
    640                                 <input name="qc_choice_purpose_screen_header_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_header_title_text', $this->qc_choice_language ); ?>">
    641                             </td>
    642                         </tr>
    643 
    644                         <tr valign="top">
    645                             <th class="col-1" scope="row">
    646                                 <?php _e( 'Title Text', 'qc-choice' ); ?>
    647                                 <div class="desc">
    648                                     <?php _e( "The title text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
    649                                 </div>
    650                             </th>
    651                             <td class="col-2">
    652                                 <input name="qc_choice_purpose_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_title_text', $this->qc_choice_language ); ?>">
    653                             </td>
    654                         </tr>
    655 
    656                         <tr valign="top">
    657                             <th class="col-1" scope="row">
    658                                 <?php _e( 'Body Text', 'qc-choice' ); ?>
    659                                 <div class="desc">
    660                                     <?php _e( "The main body text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
    661                                 </div>
    662                             </th>
    663                             <td class="col-2">
    664                                  <textarea name="qc_choice_purpose_screen_body_text[<?php echo $this->qc_choice_language; ?>]"><?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_body_text', $this->qc_choice_language ); ?></textarea>
    665                             </td>
    666                         </tr>
    667 
    668                         <tr valign="top">
    669                             <th class="col-1" scope="row">
    670                                 <?php _e( 'Enable All Button Text', 'qc-choice' ); ?>
    671                                 <div class="desc">
    672                                     <?php _e( "The accept all purpose consents button text on the purposes consent page to be displayed in the ui. When clicked, all of the purpose consent toggles are set to on.", 'qc-choice' ); ?>
    673                                 </div>
    674                             </th>
    675                             <td class="col-2">
    676                                 <input name="qc_choice_purpose_screen_enable_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_enable_all_button_text', $this->qc_choice_language ); ?>">
    677                             </td>
    678                         </tr>
    679 
    680                         <tr valign="top">
    681                             <th class="col-1" scope="row">
    682                                 <?php _e( 'Vendor Link Text', 'qc-choice' ); ?>
    683                                 <div class="desc">
    684                                     <?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    685                                 </div>
    686                             </th>
    687                             <td class="col-2">
    688                                 <input name="qc_choice_purpose_screen_vendor_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_vendor_link_text', $this->qc_choice_language ); ?>">
    689                             </td>
    690                         </tr>
    691 
    692                         <tr valign="top">
    693                             <th class="col-1" scope="row">
    694                                 <?php _e( 'Cancel Button Text', 'qc-choice' ); ?>
    695                                 <div class="desc"><?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?></div>
    696                             </th>
    697                             <td class="col-2">
    698                                 <input name="qc_choice_purpose_screen_cancel_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_cancel_button_text', $this->qc_choice_language ); ?>">
    699                             </td>
    700                         </tr>
    701 
    702                         <tr valign="top">
    703                             <th class="col-1" scope="row">
    704                                 <?php _e( 'Save and Exit Button Text', 'qc-choice' ); ?>
    705                                 <div class="desc"><?php _e( "The save consent and exit the ui button text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?></div>
    706                             </th>
    707                             <td class="col-2">
    708                                 <input name="qc_choice_purpose_screen_save_and_exit_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_save_and_exit_button_text', $this->qc_choice_language ); ?>">
    709                             </td>
    710                         </tr>
    711 
    712                         <?php $qc_choice_purpose = get_option( 'qc_choice_purpose' ); ?>
    713 
    714                         <?php
    715                         $accessing_a_device = isset( $qc_choice_purpose["accessing_a_device"] ) && ! empty( $qc_choice_purpose["accessing_a_device"] )
    716                             ? esc_attr( $qc_choice_purpose["accessing_a_device"] )
    717                             : $this->qc_choice_values->get_default_value('purpose_accessing_a_device');
    718                         ?>
    719                         <tr valign="top">
    720                             <th class="col-1" scope="row">
    721                                 <?php _e( 'Accessing a Device', 'qc-choice' ); ?>
    722                             </th>
    723                             <td class="col-2">
    724                                 <label>
    725                                     <input name="qc_choice_purpose[accessing_a_device]" type="checkbox" value="1" <?php checked( $accessing_a_device, '1' ); ?>>
    726                                     <?php _e( "Allow storing or accessing information on a user's device.", 'qc-choice' ); ?>
    727                                 </label>
    728                             </td>
    729                         </tr>
    730 
    731                         <?php
    732                         $advertising_personalisation = isset( $qc_choice_purpose["advertising_personalisation"] ) && ! empty( $qc_choice_purpose["advertising_personalisation"] )
    733                             ? esc_attr( $qc_choice_purpose["advertising_personalisation"] )
    734                             : $this->qc_choice_values->get_default_value('purpose_advertising_personalisation');
    735                         ?>
    736                         <tr valign="top">
    737                             <th class="col-1" scope="row">
    738                                 <?php _e( 'Advertising Personalisation', 'qc-choice' ); ?>
    739                             </th>
    740                             <td class="col-2">
    741                                 <label>
    742                                     <input name="qc_choice_purpose[advertising_personalisation]" type="checkbox" value="2" <?php checked( $advertising_personalisation, '2' ); ?>>
    743                                     <?php _e( "Allow processing of a user's data to provide and inform personalised advertising (including delivery, measurement, and reporting) based on a user's preferences or interests known or inferred from data collected across multiple sites, apps, or devices; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
    744                                 </label>
    745                             </td>
    746                         </tr>
    747 
    748                         <?php
    749                         $analytics = isset( $qc_choice_purpose["analytics"] ) && ! empty( $qc_choice_purpose["analytics"] )
    750                             ? esc_attr( $qc_choice_purpose["analytics"] )
    751                             : $this->qc_choice_values->get_default_value('purpose_analytics');
    752                         ?>
    753                         <tr valign="top">
    754                             <th class="col-1" scope="row">
    755                                 <?php _e( 'Analytics', 'qc-choice' ); ?>
    756                             </th>
    757                             <td class="col-2">
    758                                 <label>
    759                                     <input name="qc_choice_purpose[analytics]" type="checkbox" value="3" <?php checked( $analytics, '3' ); ?>>
    760                                     <?php _e( "Allow processing of a user's data to deliver content or advertisements and measure the delivery of such content or advertisements, extract insights and generate reports to understand service usage; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
    761                                 </label>
    762                             </td>
    763                         </tr>
    764 
    765                         <?php
    766                         $content_personalisation = isset( $qc_choice_purpose["content_personalisation"] ) && ! empty( $qc_choice_purpose["content_personalisation"] )
    767                             ? esc_attr( $qc_choice_purpose["content_personalisation"] )
    768                             : $this->qc_choice_values->get_default_value('purpose_content_personalisation');
    769                         ?>
    770                         <tr valign="top">
    771                             <th class="col-1" scope="row">
    772                                 <?php _e( 'Content Personalisation', 'qc-choice' ); ?>
    773                             </th>
    774                             <td class="col-2">
    775                                 <label>
    776                                     <input name="qc_choice_purpose[content_personalisation]" type="checkbox" value="4" <?php checked( $content_personalisation, '4' ); ?>>
    777                                     <?php _e( "Allow processing of a user's data to provide and inform personalised content (including delivery, measurement, and reporting) based on a user's preferences or interests known or inferred from data collected across multiple sites, apps, or devices; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
    778                                 </label>
    779                             </td>
    780                         </tr>
    781 
    782                         <?php
    783                         $measurement = isset( $qc_choice_purpose["measurement"] ) && ! empty( $qc_choice_purpose["measurement"] )
    784                             ? esc_attr( $qc_choice_purpose["measurement"] )
    785                             : $this->qc_choice_values->get_default_value('purpose_measurement');
    786                         ?>
    787                         <tr valign="top">
    788                             <th class="col-1" scope="row">
    789                                 <?php _e( 'Measurement', 'qc-choice' ); ?>
    790                             </th>
    791                             <td class="col-2">
    792                                 <label>
    793                                     <input name="qc_choice_purpose[measurement]" type="checkbox" value="5" <?php checked( $measurement, '5' ); ?>>
    794                                     <?php _e( "Allow processing of a user's data for measurement purposes.", 'qc-choice' ); ?>
    795                                 </label>
    796                             </td>
    797                         </tr>
    798 
    799                     </table>
    800                     <!-- END - Purpose Screen Settings -->
     989                    <!-- Start - UI Configuration Section -->
     990                    <div class="tab-content">
     991                        <div class="tab-content-inside">
     992
     993                            <?php $this->qc_choice_deprecated_header(); ?>
     994
     995                            <!-- START - Purpose Screen Settings -->
     996                            <table class="form-table options-form-table form-table-disabled">
     997
     998                                <tr valign="top">
     999                                    <th scope="row" colspan="2">
     1000                                        <h2><?php _e( 'Purpose Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
     1001                                        <hr>
     1002                                    </th>
     1003                                </tr>
     1004
     1005                                <tr class="table-top-row" valign="top">
     1006                                    <th class="col-1" scope="row">
     1007                                        <?php _e( 'Header Title Text', 'qc-choice' ); ?>
     1008                                        <div class="desc">
     1009                                            <?php _e( "The title text in the purposes header on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1010                                        </div>
     1011                                    </th>
     1012                                    <td class="col-2">
     1013                                        <input disabled name="qc_choice_purpose_screen_header_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_header_title_text', $this->qc_choice_language ); ?>">
     1014                                    </td>
     1015                                </tr>
     1016
     1017                                <tr valign="top">
     1018                                    <th class="col-1" scope="row">
     1019                                        <?php _e( 'Title Text', 'qc-choice' ); ?>
     1020                                        <div class="desc">
     1021                                            <?php _e( "The title text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1022                                        </div>
     1023                                    </th>
     1024                                    <td class="col-2">
     1025                                        <input disabled name="qc_choice_purpose_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_title_text', $this->qc_choice_language ); ?>">
     1026                                    </td>
     1027                                </tr>
     1028
     1029                                <tr valign="top">
     1030                                    <th class="col-1" scope="row">
     1031                                        <?php _e( 'Body Text', 'qc-choice' ); ?>
     1032                                        <div class="desc">
     1033                                            <?php _e( "The main body text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1034                                        </div>
     1035                                    </th>
     1036                                    <td class="col-2">
     1037                                         <textarea disabled name="qc_choice_purpose_screen_body_text[<?php echo $this->qc_choice_language; ?>]"><?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_body_text', $this->qc_choice_language ); ?></textarea>
     1038                                    </td>
     1039                                </tr>
     1040
     1041                                <tr valign="top">
     1042                                    <th class="col-1" scope="row">
     1043                                        <?php _e( 'Enable All Button Text', 'qc-choice' ); ?>
     1044                                        <div class="desc">
     1045                                            <?php _e( "The accept all purpose consents button text on the purposes consent page to be displayed in the ui. When clicked, all of the purpose consent toggles are set to on.", 'qc-choice' ); ?>
     1046                                        </div>
     1047                                    </th>
     1048                                    <td class="col-2">
     1049                                        <input disabled name="qc_choice_purpose_screen_enable_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_enable_all_button_text', $this->qc_choice_language ); ?>">
     1050                                    </td>
     1051                                </tr>
     1052
     1053                                <tr valign="top">
     1054                                    <th class="col-1" scope="row">
     1055                                        <?php _e( 'Vendor Link Text', 'qc-choice' ); ?>
     1056                                        <div class="desc">
     1057                                            <?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     1058                                        </div>
     1059                                    </th>
     1060                                    <td class="col-2">
     1061                                        <input disabled name="qc_choice_purpose_screen_vendor_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_vendor_link_text', $this->qc_choice_language ); ?>">
     1062                                    </td>
     1063                                </tr>
     1064
     1065                                <tr valign="top">
     1066                                    <th class="col-1" scope="row">
     1067                                        <?php _e( 'Cancel Button Text', 'qc-choice' ); ?>
     1068                                        <div class="desc"><?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?></div>
     1069                                    </th>
     1070                                    <td class="col-2">
     1071                                        <input disabled name="qc_choice_purpose_screen_cancel_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_cancel_button_text', $this->qc_choice_language ); ?>">
     1072                                    </td>
     1073                                </tr>
     1074
     1075                                <tr valign="top">
     1076                                    <th class="col-1" scope="row">
     1077                                        <?php _e( 'Save and Exit Button Text', 'qc-choice' ); ?>
     1078                                        <div class="desc"><?php _e( "The save consent and exit the ui button text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?></div>
     1079                                    </th>
     1080                                    <td class="col-2">
     1081                                        <input disabled name="qc_choice_purpose_screen_save_and_exit_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_save_and_exit_button_text', $this->qc_choice_language ); ?>">
     1082                                    </td>
     1083                                </tr>
     1084
     1085                                <?php $qc_choice_purpose = get_option( 'qc_choice_purpose' ); ?>
     1086
     1087                                <?php
     1088                                $accessing_a_device = isset( $qc_choice_purpose["accessing_a_device"] ) && ! empty( $qc_choice_purpose["accessing_a_device"] )
     1089                                    ? esc_attr( $qc_choice_purpose["accessing_a_device"] )
     1090                                    : $this->qc_choice_values->get_default_value('purpose_accessing_a_device');
     1091                                ?>
     1092                                <tr valign="top">
     1093                                    <th class="col-1" scope="row">
     1094                                        <?php _e( 'Accessing a Device', 'qc-choice' ); ?>
     1095                                    </th>
     1096                                    <td class="col-2">
     1097                                        <label>
     1098                                            <input disabled name="qc_choice_purpose[accessing_a_device]" type="checkbox" value="1" <?php checked( $accessing_a_device, '1' ); ?>>
     1099                                            <?php _e( "Allow storing or accessing information on a user's device.", 'qc-choice' ); ?>
     1100                                        </label>
     1101                                    </td>
     1102                                </tr>
     1103
     1104                                <?php
     1105                                $advertising_personalisation = isset( $qc_choice_purpose["advertising_personalisation"] ) && ! empty( $qc_choice_purpose["advertising_personalisation"] )
     1106                                    ? esc_attr( $qc_choice_purpose["advertising_personalisation"] )
     1107                                    : $this->qc_choice_values->get_default_value('purpose_advertising_personalisation');
     1108                                ?>
     1109                                <tr valign="top">
     1110                                    <th class="col-1" scope="row">
     1111                                        <?php _e( 'Advertising Personalisation', 'qc-choice' ); ?>
     1112                                    </th>
     1113                                    <td class="col-2">
     1114                                        <label>
     1115                                            <input disabled name="qc_choice_purpose[advertising_personalisation]" type="checkbox" value="2" <?php checked( $advertising_personalisation, '2' ); ?>>
     1116                                            <?php _e( "Allow processing of a user's data to provide and inform personalised advertising (including delivery, measurement, and reporting) based on a user's preferences or interests known or inferred from data collected across multiple sites, apps, or devices; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
     1117                                        </label>
     1118                                    </td>
     1119                                </tr>
     1120
     1121                                <?php
     1122                                $analytics = isset( $qc_choice_purpose["analytics"] ) && ! empty( $qc_choice_purpose["analytics"] )
     1123                                    ? esc_attr( $qc_choice_purpose["analytics"] )
     1124                                    : $this->qc_choice_values->get_default_value('purpose_analytics');
     1125                                ?>
     1126                                <tr valign="top">
     1127                                    <th class="col-1" scope="row">
     1128                                        <?php _e( 'Analytics', 'qc-choice' ); ?>
     1129                                    </th>
     1130                                    <td class="col-2">
     1131                                        <label>
     1132                                            <input disabled name="qc_choice_purpose[analytics]" type="checkbox" value="3" <?php checked( $analytics, '3' ); ?>>
     1133                                            <?php _e( "Allow processing of a user's data to deliver content or advertisements and measure the delivery of such content or advertisements, extract insights and generate reports to understand service usage; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
     1134                                        </label>
     1135                                    </td>
     1136                                </tr>
     1137
     1138                                <?php
     1139                                $content_personalisation = isset( $qc_choice_purpose["content_personalisation"] ) && ! empty( $qc_choice_purpose["content_personalisation"] )
     1140                                    ? esc_attr( $qc_choice_purpose["content_personalisation"] )
     1141                                    : $this->qc_choice_values->get_default_value('purpose_content_personalisation');
     1142                                ?>
     1143                                <tr valign="top">
     1144                                    <th class="col-1" scope="row">
     1145                                        <?php _e( 'Content Personalisation', 'qc-choice' ); ?>
     1146                                    </th>
     1147                                    <td class="col-2">
     1148                                        <label>
     1149                                            <input disabled name="qc_choice_purpose[content_personalisation]" type="checkbox" value="4" <?php checked( $content_personalisation, '4' ); ?>>
     1150                                            <?php _e( "Allow processing of a user's data to provide and inform personalised content (including delivery, measurement, and reporting) based on a user's preferences or interests known or inferred from data collected across multiple sites, apps, or devices; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
     1151                                        </label>
     1152                                    </td>
     1153                                </tr>
     1154
     1155                                <?php
     1156                                $measurement = isset( $qc_choice_purpose["measurement"] ) && ! empty( $qc_choice_purpose["measurement"] )
     1157                                    ? esc_attr( $qc_choice_purpose["measurement"] )
     1158                                    : $this->qc_choice_values->get_default_value('purpose_measurement');
     1159                                ?>
     1160                                <tr valign="top">
     1161                                    <th class="col-1" scope="row">
     1162                                        <?php _e( 'Measurement', 'qc-choice' ); ?>
     1163                                    </th>
     1164                                    <td class="col-2">
     1165                                        <label>
     1166                                            <input disabled name="qc_choice_purpose[measurement]" type="checkbox" value="5" <?php checked( $measurement, '5' ); ?>>
     1167                                            <?php _e( "Allow processing of a user's data for measurement purposes.", 'qc-choice' ); ?>
     1168                                        </label>
     1169                                    </td>
     1170                                </tr>
     1171
     1172                            </table>
     1173                            <!-- END - Purpose Screen Settings -->
     1174                        </div>
     1175                    </div>
     1176
    8011177
    8021178                <?php } elseif ($active_tab === 'vendor_screen') { ?>
     
    8051181                    <?php do_settings_sections( 'qc-choice-vendor-screen' ); ?>
    8061182
    807                     <!-- START - Vendor Screen Settings -->
    808                     <table class="form-table options-form-table">
    809 
    810                         <tr valign="top">
    811                             <th scope="row" colspan="2">
    812                                 <h2><?php _e( 'Vendor Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
    813                                 <hr>
    814                             </th>
    815                         </tr>
    816 
    817                         <tr class="table-top-row" valign="top">
    818                             <th class="col-1" scope="row">
    819                                 <?php _e( 'Title Text', 'qc-choice' ); ?>
    820                                 <div class="desc">
    821                                     <?php _e( "The title text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
    822                                 </div>
    823                             </th>
    824                             <td class="col-2">
    825                                 <input name="qc_choice_vendor_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_title_text', $this->qc_choice_language ); ?>">
    826                             </td>
    827                         </tr>
    828 
    829                         <tr valign="top">
    830                             <th scope="row">
    831                                 <?php _e( 'Body Text', 'qc-choice' ); ?>
    832                                 <div class="desc">
    833                                     <?php _e( "The main body text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
    834                                 </div>
    835                             </th>
    836                             <td>
    837                                  <textarea name="qc_choice_vendor_screen_body_text[<?php echo $this->qc_choice_language; ?>]"><?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_body_text', $this->qc_choice_language ); ?></textarea>
    838                             </td>
    839                         </tr>
    840 
    841                         <tr valign="top">
    842                             <th scope="row">
    843                                 <?php _e( 'Accept All Button Text', 'qc-choice' ); ?>
    844                                 <div class="desc">
    845                                     <?php _e( "The accept all vendor consents button text on the vendors consent page to be displayed in the ui. When clicked, all of the vendors consent toggles are set to on.", 'qc-choice' ); ?>
    846                                 </div>
    847                             </th>
    848                             <td>
    849                                 <input name="qc_choice_vendor_screen_accept_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_accept_all_button_text', $this->qc_choice_language ); ?>">
    850                             </td>
    851                         </tr>
    852 
    853                         <tr valign="top">
    854                             <th scope="row">
    855                                 <?php _e( 'Reject All Button Text', 'qc-choice' ); ?>
    856                                 <div class="desc">
    857                                     <?php _e( "The reject all vendor consents button text on the vendors consent page to be displayed in the ui. When clicked, all of the vendors consent toggles are set to off.", 'qc-choice' ); ?>
    858                                 </div>
    859                             </th>
    860                             <td>
    861                                 <input name="qc_choice_vendor_screen_reject_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_reject_all_button_text', $this->qc_choice_language ); ?>">
    862                             </td>
    863                         </tr>
    864 
    865                         <tr valign="top">
    866                             <th scope="row">
    867                                 <?php _e( 'Purposes Link Text', 'qc-choice' ); ?>
    868                                 <div class="desc">
    869                                     <?php _e( "The purpose link text on the vendors consent page to be displayed in the ui. When clicked, the ui updates to display the purpose consent page.", 'qc-choice' ); ?>
    870                                 </div>
    871                             </th>
    872                             <td>
    873                                 <input name="qc_choice_vendor_screen_purposes_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_purposes_link_text', $this->qc_choice_language ); ?>">
    874                             </td>
    875                         </tr>
    876 
    877                         <tr valign="top">
    878                             <th scope="row">
    879                                 <?php _e( 'Cancel Button Text', 'qc-choice' ); ?>
    880                                 <div class="desc">
    881                                     <?php _e( "The cancel link text on the vendors consent page to be displayed in the ui. When clicked, the ui updates to display the initial global consent page.", 'qc-choice' ); ?>
    882                                 </div>
    883                             </th>
    884                             <td>
    885                                 <input name="qc_choice_vendor_screen_cancel_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_cancel_button_text', $this->qc_choice_language ); ?>">
    886                             </td>
    887                         </tr>
    888 
    889                         <tr valign="top">
    890                             <th scope="row">
    891                                 <?php _e( 'Save and Exit Button Text', 'qc-choice' ); ?>
    892                                 <div class="desc">
    893                                     <?php _e( "The save consent and exit the ui button text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
    894                                 </div>
    895                             </th>
    896                             <td>
    897                                 <input name="qc_choice_vendor_screen_save_and_exit_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_save_and_exit_button_text', $this->qc_choice_language ); ?>">
    898                             </td>
    899                         </tr>
    900 
    901                         <tr valign="top">
    902                             <th scope="row" colspan="2">
    903                                 <h3><?php _e( 'Vendors', 'qc-choice' ); ?></h3>
    904                             </th>
    905                         </tr>
    906 
    907                         <tr valign="top">
    908                             <th scope="row">
    909                                 <?php _e( 'Vendor List', 'qc-choice' ); ?>
    910                                 <div class="desc"><?php _e( 'Select the vendors to be included.', 'qc-choice' ); ?></div>
    911 
    912                                 <?php
    913                                 $qc_choice_vendors = get_option( 'qc_choice_vendors' );
    914                                 $qc_vendors = '';
    915 
    916                                 $cnt = 1;
    917                                 if( is_array( $qc_choice_vendors ) ) {
    918                                     $qc_vendors = "";
    919                                     $array_cnt = count($qc_choice_vendors);
    920 
    921                                     foreach ($qc_choice_vendors as $value) {
    922                                         $qc_vendors .= $value;
    923 
    924                                         if($array_cnt > $cnt ) {
    925                                             $qc_vendors .= ",";
     1183                    <!-- Start - UI Configuration Section -->
     1184                    <div class="tab-content">
     1185                        <div class="tab-content-inside">
     1186
     1187                            <?php $this->qc_choice_deprecated_header(); ?>
     1188
     1189                            <!-- START - Vendor Screen Settings -->
     1190                            <table class="form-table options-form-table form-table-disabled">
     1191
     1192                                <tr valign="top">
     1193                                    <th scope="row" colspan="2">
     1194                                        <h2><?php _e( 'Vendor Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
     1195                                        <hr>
     1196                                    </th>
     1197                                </tr>
     1198
     1199                                <tr class="table-top-row" valign="top">
     1200                                    <th class="col-1" scope="row">
     1201                                        <?php _e( 'Title Text', 'qc-choice' ); ?>
     1202                                        <div class="desc">
     1203                                            <?php _e( "The title text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1204                                        </div>
     1205                                    </th>
     1206                                    <td class="col-2">
     1207                                        <input disabled name="qc_choice_vendor_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_title_text', $this->qc_choice_language ); ?>">
     1208                                    </td>
     1209                                </tr>
     1210
     1211                                <tr valign="top">
     1212                                    <th scope="row">
     1213                                        <?php _e( 'Body Text', 'qc-choice' ); ?>
     1214                                        <div class="desc">
     1215                                            <?php _e( "The main body text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1216                                        </div>
     1217                                    </th>
     1218                                    <td>
     1219                                         <textarea disabled name="qc_choice_vendor_screen_body_text[<?php echo $this->qc_choice_language; ?>]"><?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_body_text', $this->qc_choice_language ); ?></textarea>
     1220                                    </td>
     1221                                </tr>
     1222
     1223                                <tr valign="top">
     1224                                    <th scope="row">
     1225                                        <?php _e( 'Accept All Button Text', 'qc-choice' ); ?>
     1226                                        <div class="desc">
     1227                                            <?php _e( "The accept all vendor consents button text on the vendors consent page to be displayed in the ui. When clicked, all of the vendors consent toggles are set to on.", 'qc-choice' ); ?>
     1228                                        </div>
     1229                                    </th>
     1230                                    <td>
     1231                                        <input disabled name="qc_choice_vendor_screen_accept_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_accept_all_button_text', $this->qc_choice_language ); ?>">
     1232                                    </td>
     1233                                </tr>
     1234
     1235                                <tr valign="top">
     1236                                    <th scope="row">
     1237                                        <?php _e( 'Reject All Button Text', 'qc-choice' ); ?>
     1238                                        <div class="desc">
     1239                                            <?php _e( "The reject all vendor consents button text on the vendors consent page to be displayed in the ui. When clicked, all of the vendors consent toggles are set to off.", 'qc-choice' ); ?>
     1240                                        </div>
     1241                                    </th>
     1242                                    <td>
     1243                                        <input disabled name="qc_choice_vendor_screen_reject_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_reject_all_button_text', $this->qc_choice_language ); ?>">
     1244                                    </td>
     1245                                </tr>
     1246
     1247                                <tr valign="top">
     1248                                    <th scope="row">
     1249                                        <?php _e( 'Purposes Link Text', 'qc-choice' ); ?>
     1250                                        <div class="desc">
     1251                                            <?php _e( "The purpose link text on the vendors consent page to be displayed in the ui. When clicked, the ui updates to display the purpose consent page.", 'qc-choice' ); ?>
     1252                                        </div>
     1253                                    </th>
     1254                                    <td>
     1255                                        <input disabled name="qc_choice_vendor_screen_purposes_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_purposes_link_text', $this->qc_choice_language ); ?>">
     1256                                    </td>
     1257                                </tr>
     1258
     1259                                <tr valign="top">
     1260                                    <th scope="row">
     1261                                        <?php _e( 'Cancel Button Text', 'qc-choice' ); ?>
     1262                                        <div class="desc">
     1263                                            <?php _e( "The cancel link text on the vendors consent page to be displayed in the ui. When clicked, the ui updates to display the initial global consent page.", 'qc-choice' ); ?>
     1264                                        </div>
     1265                                    </th>
     1266                                    <td>
     1267                                        <input disabled name="qc_choice_vendor_screen_cancel_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_cancel_button_text', $this->qc_choice_language ); ?>">
     1268                                    </td>
     1269                                </tr>
     1270
     1271                                <tr valign="top">
     1272                                    <th scope="row">
     1273                                        <?php _e( 'Save and Exit Button Text', 'qc-choice' ); ?>
     1274                                        <div class="desc">
     1275                                            <?php _e( "The save consent and exit the ui button text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1276                                        </div>
     1277                                    </th>
     1278                                    <td>
     1279                                        <input disabled name="qc_choice_vendor_screen_save_and_exit_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_save_and_exit_button_text', $this->qc_choice_language ); ?>">
     1280                                    </td>
     1281                                </tr>
     1282
     1283                                <tr valign="top">
     1284                                    <th scope="row" colspan="2">
     1285                                        <h3><?php _e( 'Vendors', 'qc-choice' ); ?></h3>
     1286                                    </th>
     1287                                </tr>
     1288
     1289                                <tr valign="top">
     1290                                    <th scope="row">
     1291                                        <?php _e( 'Vendor List', 'qc-choice' ); ?>
     1292                                        <div class="desc"><?php _e( 'Select the vendors to be included.', 'qc-choice' ); ?></div>
     1293
     1294                                        <?php
     1295                                        $qc_choice_vendors = get_option( 'qc_choice_vendors' );
     1296                                        $qc_vendors = '';
     1297
     1298                                        $cnt = 1;
     1299                                        if( is_array( $qc_choice_vendors ) ) {
     1300                                            $qc_vendors = "";
     1301                                            $array_cnt = count($qc_choice_vendors);
     1302
     1303                                            foreach ($qc_choice_vendors as $value) {
     1304                                                $qc_vendors .= $value;
     1305
     1306                                                if($array_cnt > $cnt ) {
     1307                                                    $qc_vendors .= ",";
     1308                                                }
     1309
     1310                                                $cnt++;
     1311                                            }
    9261312                                        }
    927 
    928                                         $cnt++;
    929                                     }
    930                                 }
    931                                  ?>
    932                             </th>
    933                             <td>
    934                                 <div id="vendor_list" data-checked-vendors="<?php echo $qc_vendors; ?>">
    935                                     <div id="vendor_list_loader" class="qc-loader">
    936                                         <div class="double-bounce1"></div>
    937                                         <div class="double-bounce2"></div>
    938                                     </div>
    939                                 </div>
    940                             </td>
    941                         </tr>
    942 
    943                     </table>
    944                     <!-- END - Vendor Screen Settigns -->
     1313                                         ?>
     1314                                    </th>
     1315                                    <td>
     1316                                        <div id="vendor_list" data-checked-vendors="<?php echo $qc_vendors; ?>">
     1317                                            <div id="vendor_list_loader" class="qc-loader">
     1318                                                <div class="double-bounce1"></div>
     1319                                                <div class="double-bounce2"></div>
     1320                                            </div>
     1321                                        </div>
     1322                                    </td>
     1323                                </tr>
     1324
     1325                            </table>
     1326                            <!-- END - Vendor Screen Settigns -->
     1327                        </div>
     1328                    </div>
    9451329
    9461330                <?php } elseif ($active_tab === 'about_gdpr') { ?>
    9471331
    948                     <!-- START - About GDPR Tab -->
    949                     <table class="form-table options-form-table">
    950                         <tr>
    951                             <th><h3><?php _e( 'About GDPR', 'qc-choice' ); ?></h3></th>
    952                         </tr>
    953                     </table>
    954                     <!-- END - About GDPR Tab -->
     1332                    <!-- Start - UI Configuration Section -->
     1333                    <div class="tab-content">
     1334                        <div class="tab-content-inside">
     1335
     1336                            <?php $this->qc_choice_deprecated_header(); ?>
     1337
     1338                            <!-- START - About GDPR Tab -->
     1339                            <table class="form-table options-form-table form-table-disabled">
     1340                                <tr>
     1341                                    <th><h3><?php _e( 'About GDPR', 'qc-choice' ); ?></h3></th>
     1342                                </tr>
     1343                            </table>
     1344                            <!-- END - About GDPR Tab -->
     1345                        </div>
     1346                    </div>
    9551347
    9561348                <?php } elseif ($active_tab === 'buttons') { ?>
    9571349
    958                     <!-- START - About GDPR Tab -->
    959                     <table class="form-table options-form-table">
    960                         <tr>
    961                             <th><h3><?php _e( 'Displaying the UI', 'qc-choice' ); ?></h3></th>
    962                         </tr>
    963                         <tr>
    964                             <th><?php _e( 'Adding Change Consent to menu items.', 'qc-choice' ); ?></th>
    965                             <td><?php _e( 'Add a custom link to any', 'qc-choice') ?> <a target="_blank" href="./nav-menus.php"><?php _e( 'menu', 'qc-choice') ?></a> <?php _e( 'and set the url value to "#displayConsentUI" to open the UI when clicked', 'qc-choice') ?></td>
    966                         </tr>
    967                         <tr>
    968                             <th><?php _e( 'Adding Change Consnet to dom elements.', 'qc-choice' ); ?></th>
    969                             <td>
    970                                 <div><?php _e( 'Add "onclick="window.__cmp(\'displayConsentUi\');" to any dom element to open the UI when clicked.', 'qc-choice') ?></div>
    971                                 <div><strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <code> &lt;a onclick="window.__cmp('displayConsentUi');"&gt;<?php _e( 'Change Consent', 'qc-choice' ); ?>&lt;/a&gt;</code></div>
    972                             </td>
    973                         </tr>
    974                     </table>
    975                     <!-- END - About GDPR Tab -->
     1350                    <!-- Start - UI Configuration Section -->
     1351                    <div class="tab-content">
     1352                        <div class="tab-content-inside">
     1353
     1354                            <?php $this->qc_choice_deprecated_header(); ?>
     1355
     1356                            <!-- START - About GDPR Tab -->
     1357                            <table class="form-table options-form-table form-table-disabled">
     1358                                <tr>
     1359                                    <th><h3><?php _e( 'Displaying the UI', 'qc-choice' ); ?></h3></th>
     1360                                </tr>
     1361                                <tr>
     1362                                    <th><?php _e( 'Adding Change Consent to menu items.', 'qc-choice' ); ?></th>
     1363                                    <td><?php _e( 'Add a custom link to any', 'qc-choice') ?> <a target="_blank" href="./nav-menus.php"><?php _e( 'menu', 'qc-choice') ?></a> <?php _e( 'and set the url value to "#displayConsentUI" to open the UI when clicked', 'qc-choice') ?></td>
     1364                                </tr>
     1365                                <tr>
     1366                                    <th><?php _e( 'Adding Change Consnet to dom elements.', 'qc-choice' ); ?></th>
     1367                                    <td>
     1368                                        <div><?php _e( 'Add "onclick="window.__cmp(\'displayConsentUi\');" to any dom element to open the UI when clicked.', 'qc-choice') ?></div>
     1369                                        <div><strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <code> &lt;a onclick="window.__cmp('displayConsentUi');"&gt;<?php _e( 'Change Consent', 'qc-choice' ); ?>&lt;/a&gt;</code></div>
     1370                                    </td>
     1371                                </tr>
     1372                            </table>
     1373                            <!-- END - About GDPR Tab -->
     1374                        </div>
     1375                    </div>
    9761376
    9771377                <?php } ?>
    9781378
    979                 <?php if ( $active_tab !== 'about_gdpr' && $active_tab !== 'buttons' ) { ?>
     1379                <?php if ( $active_tab !== 'about_gdpr' && $active_tab !== 'buttons' && $active_tab !== 'overview_screen' && $active_tab !== 'general_configuration' && $active_tab !== 'initial_screen' && $active_tab !== 'purpose_screen' && $active_tab !== 'vendor_screen' ) { ?>
    9801380
    9811381                    <table class="form-table options-form-table">
     
    10121412
    10131413    /**
     1414     * QC Choice TCFv1 Deprecation Message
     1415     *
     1416     * @since    2.0.0
     1417     */
     1418    public function qc_choice_deprecated_header() {
     1419        if( empty( $this->qc_choice_cmp_utid ) ) {
     1420            echo '<div class="text-center">';
     1421                echo '<h1 class="update-headline">';
     1422                    _e( '**Important - TCF v1.0 is being deprecated August 15, 2020**', 'qc-choice' );
     1423                echo '</h1>';
     1424                echo '<div>';
     1425                    _e( 'Follow the instructions on the <a href="https://plugins.trac.wordpress.org/wp-admin/admin.php?page=qc-choice-options&tab=overview_screen">overview tab</a> to update to TCF v2.0' );
     1426                echo '</div>';
     1427            echo    '</div>';
     1428        }
     1429    }
     1430
     1431    /**
    10141432     * Register QC Choice admin option fields
    10151433     *
     
    10181436    public function qc_choice_options_page_init() {
    10191437
     1438        // TCF v2.0 settings
     1439        register_setting(
     1440            'choice-cmp-config', // Option group
     1441            'qc_choice_cmp_utid', // Option name
     1442            array(
     1443                'type' => 'string',
     1444                'sanitize_callback' => array( $this, 'sanitize_text' )
     1445            )
     1446        );
     1447        register_setting(
     1448            'choice-cmp-config', // Option group
     1449            'qc_choice_cmp_datalayer_push', // Option name
     1450            array(
     1451                'type' => 'string',
     1452                'sanitize_callback' => array( $this, 'sanitize_text' )
     1453            )
     1454        );
     1455        register_setting(
     1456            'choice-cmp-config', // Option group
     1457            'qc_choice_cmp_enable', // Option name
     1458            array(
     1459                'type' => 'string',
     1460                'sanitize_callback' => array( $this, 'sanitize_text' )
     1461            )
     1462        );
     1463        register_setting(
     1464            'choice-cmp-config', // Option group
     1465            'qc_choice_cmp_ccpa_wp_footer', // Option name
     1466            array(
     1467                'type' => 'string',
     1468                'sanitize_callback' => array( $this, 'sanitize_text' )
     1469            )
     1470        );
     1471
     1472        // TCF v1.0 settings
    10201473        // START - Register General Config Fields
    10211474        register_setting(
     
    10271480            )
    10281481        );
     1482
    10291483        register_setting(
    10301484            'qc-choice-general-config', // Option group
     
    13391793            )
    13401794        );
    1341        
     1795
    13421796        register_setting(
    13431797            'qc-choice-vendor-screen', // Option group
     
    14891943
    14901944    }
    1491    
     1945
    14921946    /**
    14931947     * Sanitize the sanitize_qc_choice_initial_screen_title_text text array.
     
    18042258        // Get the value from the option table.
    18052259        $val = get_option( $field_name );
    1806        
     2260
    18072261        // If the value is an array of values, assume language_code is the array.
    18082262        if( is_array( $val ) ) {
  • quantcast-choice/tags/2.0.0/admin/class-qc-choice-admin.php

    r1881293 r2355432  
    4242
    4343    /**
     44     * A quantcast.com account Universal Tag ID (UTID/pCode).
     45     *
     46     * @since    2.0.0
     47     * @access   private
     48     * @var      string    $version    Quantcast UTID/pCode.
     49     */
     50    private $qc_choice_cmp_utid;
     51
     52    /**
     53     * Enable the Quantcast Chioce CMP
     54     *
     55     * @since    2.0.0
     56     * @access   private
     57     * @var      string    $version    Enable the Choice TCF v2.0 CMP.
     58     */
     59    private $qc_choice_cmp_enable;
     60
     61    /**
    4462     * Initialize the class and set its properties.
    4563     *
     
    5371        $this->version = $version;
    5472
     73        $this->qc_choice_cmp_utid = esc_attr( get_option( 'qc_choice_cmp_utid' ) );
     74        $this->qc_choice_cmp_enable = esc_attr( get_option( 'qc_choice_cmp_enable' ) );
     75
     76        add_action( 'admin_notices', array( $this, 'qc_choice_utid_missing_notice' ) );
     77
     78    }
     79
     80    /**
     81     * Display a notice in the admin section the the Choice Plugin does not have a UTID.
     82     *
     83     * @since    2.0.0
     84     */
     85    public function qc_choice_utid_missing_notice() {
     86        if( empty( $this->qc_choice_cmp_utid ) && empty( $this->qc_choice_cmp_enable ) ) {
     87            $class = 'notice notice-error';
     88            $message = __( 'The Quantcast Choice CMP is not setup is not complete.  You must <strong>enter your Universal Tag ID</strong> and <strong>enable the CMP</strong>.', 'qc-choice' );
     89            $link_text = __( 'View Choice CMP Settings', 'qc-choice' );
     90            printf( '<div class="%1$s"><p>%2$s <a href="%3$s">%4$s</a></p></div>', esc_attr( $class ),  $message, esc_url( '/wp-admin/admin.php?page=qc-choice-options&tab=tcfv2_screen' ), esc_html( $link_text ) );
     91        }
     92        elseif( ! empty( $this->qc_choice_cmp_utid ) && empty( $this->qc_choice_cmp_enable ) ) {
     93            $class = 'notice notice-warning';
     94            $message = __( 'The Quantcast Choice CMP must be <strong>enabled</strong> from the setting page before it is shown to site visitors.', 'qc-choice' );
     95            $link_text = __( 'View Choice CMP Settings', 'qc-choice' );
     96            printf( '<div class="%1$s"><p>%2$s <a href="%3$s">%4$s</a></p></div>', esc_attr( $class ), $message, esc_url( '/wp-admin/admin.php?page=qc-choice-options&tab=tcfv2_screen' ), esc_html( $link_text ) );
     97        }
     98        elseif( empty( $this->qc_choice_cmp_utid ) ) {
     99            $class = 'notice notice-error';
     100            $message = __( 'The Quantcast Choice CMP is not setup is not complete.  Please enter your Universal Tag ID.', 'qc-choice' );
     101            $link_text = __( 'View Choice CMP Settings', 'qc-choice' );
     102            printf( '<div class="%1$s"><p>%2$s <a href="%3$s">%4$s</a></p></div>', esc_attr( $class ), $message, esc_url( '/wp-admin/admin.php?page=qc-choice-options&tab=tcfv2_screen' ), esc_html( $link_text ) );
     103        }
     104        else {
     105            // TCF v2 Enabled
     106        }
    55107    }
    56108
     
    73125    public function enqueue_scripts() {
    74126
    75         wp_enqueue_script( 'qc-choice-ext', 'https://quantcast.mgr.consensu.org/cmp.js', array( ), $this->version, false );
    76         wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', array( 'jquery', 'qc-choice-ext' ), $this->version, true );
    77 
     127        if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) {
     128            // TCF v1 Enabled (Scheduled deprecation of TCFv1 on August 16, 2020 by the IAB).
     129            wp_enqueue_script( 'qc-choice-ext', 'https://quantcast.mgr.consensu.org/cmp.js', array( ), $this->version, false );
     130            wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', array( 'jquery', 'qc-choice-ext' ), $this->version, true );
     131        }
     132        else {
     133            // TCF v2 Enabled
     134        }
    78135    }
    79 
    80136}
  • quantcast-choice/tags/2.0.0/admin/class-qc-choice-values.php

    r2053666 r2355432  
    11<?php
    22namespace QCChoice\Values;
     3
     4/**
     5 * ToDo: Remove this entire class and it's functionality.  All CMP configuration is handled
     6 *       in the quantcast.com user account dashboard, and imported with the js tag.
     7 */
    38
    49/**
     
    258263        );
    259264    }
    260  
     265
    261266    public function get_default_value( $field_name, $language_code = 'en' ) {
    262267
     
    283288        return $ret;
    284289    }
    285  
     290
    286291    public function get_default_array_values( $field_name, $language_code = 'en' ) {
    287292
  • quantcast-choice/tags/2.0.0/admin/css/style.min.css

    r1879896 r2355432  
    1 #adminmenu>#toplevel_page_qc-choice-options .dashicons-before img{width:100%;height:auto;padding-top:0}#adminmenu>#toplevel_page_qc-choice-options.current .dashicons-before img{opacity:1}body .change-consent{box-shadow:none}.wrap-qc-choice-options .qc-loader{height:40px;margin:100px auto;position:relative;width:40px}.wrap-qc-choice-options .double-bounce1,.wrap-qc-choice-options .double-bounce2{background-color:#333;border-radius:50%;height:100%;left:0;opacity:.6;position:absolute;top:0;width:100%;animation:a 2s infinite ease-in-out}.wrap-qc-choice-options .double-bounce2{animation-delay:-1s}@keyframes a{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.wrap-qc-choice-options .vendor-item{display:inline-block;float:left;margin-bottom:7px;width:100%}.wrap-qc-choice-options .vendor-item label{display:block;line-height:1.1;padding-left:1.5rem;position:relative}.wrap-qc-choice-options .vendor-item input{left:0;position:absolute;top:5px}.wrap-qc-choice-options .admin-header .left{width:100%}.wrap-qc-choice-options .admin-header .right{width:100%;padding-top:9px}.wrap-qc-choice-options .admin-header .clear{clear:both}.wrap-qc-choice-options .admin-header .logo img{max-width:125px;height:auto;width:100%}.wrap-qc-choice-options .nav-tab.active{background-color:#fff;color:#444}.wrap-qc-choice-options .form-table input[type=text],.wrap-qc-choice-options .form-table select,.wrap-qc-choice-options .form-table textarea{min-width:100%;max-width:500px}.wrap-qc-choice-options .form-table textarea{min-height:14rem}.wrap-qc-choice-options .form-table select.select-lg{white-space:pre-wrap;height:100px}.wrap-qc-choice-options .form-table td,.wrap-qc-choice-options .form-table th{margin-bottom:5px;padding:10px;vertical-align:top}.wrap-qc-choice-options .form-table th{vertical-align:top}.wrap-qc-choice-options .form-table .desc{font-size:12px;font-weight:300;margin-top:5px}.wrap-qc-choice-options .form-table .desc ul{list-style:disc;margin:.5rem 0 .5rem .5rem;padding-left:1rem}@media (min-width:783px){.wrap-qc-choice-options .admin-header .left{float:left;width:50%}.wrap-qc-choice-options .admin-header .right{float:right;width:50%;text-align:right}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:200px}.wrap-qc-choice-options .form-table.options-form-table .col-2{vertical-align:top}.wrap-qc-choice-options .form-table textarea{min-height:12rem}}@media (min-width:992px){.wrap-qc-choice-options .vendor-item{width:50%}.wrap-qc-choice-options .form-table.options-form-table{max-width:1200px}.wrap-qc-choice-options .form-table.options-form-table .col-1,.wrap-qc-choice-options .form-table.options-form-table .col-3{min-width:200px}.wrap-qc-choice-options .form-table.options-form-table .col-2{min-width:350px}.wrap-qc-choice-options .form-table textarea{min-height:10rem}}@media (min-width:1200px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:250px}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2{min-width:400px}.wrap-qc-choice-options .form-table textarea{min-height:10rem}}@media (min-width:1400px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:300px}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2{min-width:500px;max-width:100%;width:900px}.wrap-qc-choice-options .form-table textarea{min-height:8rem}}
     1#adminmenu>#toplevel_page_qc-choice-options .dashicons-before img{width:100%;height:auto;padding-top:0}#adminmenu>#toplevel_page_qc-choice-options.current .dashicons-before img{opacity:1}body .change-consent{box-shadow:none}.wrap-qc-choice-options .show-lg{display:none}.wrap-qc-choice-options .embed-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%;height:auto}.wrap-qc-choice-options .embed-container embed,.wrap-qc-choice-options .embed-container iframe,.wrap-qc-choice-options .embed-container object{position:absolute;top:0;left:0;width:100%;height:100%}.wrap-qc-choice-options .instructions-wrapper{display:flex;justify-content:center;flex-wrap:wrap}.wrap-qc-choice-options .instructions-wrapper .instructions-box{flex:0 1 98%;padding:1rem;background-color:#fff;display:flex;width:100%;margin:1rem 1%}.wrap-qc-choice-options .instructions-wrapper .instructions-box-inside{flex:1}@media (min-width:992px){.wrap-qc-choice-options .instructions-wrapper{justify-content:space-between;flex-wrap:nowrap}.wrap-qc-choice-options .instructions-wrapper .show-lg{display:block}.wrap-qc-choice-options .instructions-wrapper .instructions-box{flex:0 1 48%}}.wrap-qc-choice-options .tab-content{padding:2rem 1rem;clear:both}.wrap-qc-choice-options .tab-content::after{content:"";clear:both;display:table}.wrap-qc-choice-options .inline-list li{display:inline}.wrap-qc-choice-options .inline-flex-third{display:flex}.wrap-qc-choice-options .inline-flex-third li{flex:1 1 31%;padding-left:2%}.wrap-qc-choice-options .form-table-disabled{opacity:.6;position:relative;z-index:1}.wrap-qc-choice-options .form-table-disabled::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:10}.wrap-qc-choice-options .update-headline{color:red!important;font-size:24px!important}.wrap-qc-choice-options .pointer-headline{color:#000!important;font-size:20px!important;font-weight:600}.wrap-qc-choice-options .text-center{text-align:center}.wrap-qc-choice-options .text-right{text-align:right}.wrap-qc-choice-options .logo img{max-width:125px;height:auto;width:100%}.wrap-qc-choice-options .wordmark img{max-width:125px;height:auto;width:100%}.wrap-qc-choice-options .qc-loader{height:40px;margin:100px auto;position:relative;width:40px}.wrap-qc-choice-options .double-bounce1,.wrap-qc-choice-options .double-bounce2{background-color:#333;border-radius:50%;height:100%;left:0;opacity:.6;position:absolute;top:0;width:100%;-webkit-animation:sk-bounce 2s infinite ease-in-out;animation:sk-bounce 2s infinite ease-in-out}.wrap-qc-choice-options .double-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes sk-bounce{0%,100%{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes sk-bounce{0%,100%{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.wrap-qc-choice-options .vendor-item{display:inline-block;float:left;margin-bottom:7px;width:100%}.wrap-qc-choice-options .vendor-item label{display:block;line-height:1.1;padding-left:1.5rem;position:relative}.wrap-qc-choice-options .vendor-item input{left:0;position:absolute;top:5px}.wrap-qc-choice-options .nav-tab.active{background-color:#fff;color:#444}.wrap-qc-choice-options .form-table input[type=text],.wrap-qc-choice-options .form-table select,.wrap-qc-choice-options .form-table textarea{min-width:100%;max-width:500px}.wrap-qc-choice-options .form-table textarea{min-height:14rem}.wrap-qc-choice-options .form-table select.select-lg{white-space:pre-wrap;height:100px}.wrap-qc-choice-options .form-table td,.wrap-qc-choice-options .form-table th{margin-bottom:5px;padding:10px;vertical-align:top}.wrap-qc-choice-options .form-table th{vertical-align:top}.wrap-qc-choice-options .form-table .desc{font-size:12px;font-weight:300;margin-top:5px}.wrap-qc-choice-options .form-table .desc ul{list-style:disc;margin:.5rem 0 .5rem .5rem;padding-left:1rem}@media all and (min-width:783px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:200px}.wrap-qc-choice-options .form-table.options-form-table .col-2{vertical-align:top}.wrap-qc-choice-options .form-table textarea{min-height:12rem}}@media all and (min-width:992px){.wrap-qc-choice-options .vendor-item{width:50%}.wrap-qc-choice-options .form-table.options-form-table{max-width:1200px}.wrap-qc-choice-options .form-table.options-form-table .col-1,.wrap-qc-choice-options .form-table.options-form-table .col-3{min-width:200px}.wrap-qc-choice-options .form-table.options-form-table .col-2{min-width:350px}.wrap-qc-choice-options .form-table textarea{min-height:10rem}}@media all and (min-width:1200px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:250px}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2{min-width:400px}.wrap-qc-choice-options .form-table textarea{min-height:10rem}}@media all and (min-width:1400px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:300px}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2{min-width:500px;max-width:100%;width:900px}.wrap-qc-choice-options .form-table textarea{min-height:8rem}}
     2/*# sourceMappingURL=style.min.css.map */
  • quantcast-choice/tags/2.0.0/admin/js/script.min.js

    r1881293 r2355432  
    1 !function(e){"use strict";window.__cmp("init",{"Display UI":"never"});var m=document.getElementById("vendor_list");if(m){var u=document.getElementById("submit");u.setAttribute("disabled","disabled");var v=m.getAttribute("data-checked-vendors");v=v.split(","),window.__cmp("getVendorList","LATEST",function(e){var t=e.vendors;t.sort(function(e,t){var d=e.name.toUpperCase(),n=t.name.toUpperCase();return d<n?-1:n<d?1:0});for(var d=0;d<t.length;d++){var n=t[d].id,r=t[d].name,i=document.createElement("SPAN");i.setAttribute("class","vendor-item-label");var a=document.createTextNode(r);i.appendChild(a);var c=document.createElement("LABEL"),o=document.createElement("DIV");o.setAttribute("class","vendor-item");var s=document.createElement("INPUT");s.setAttribute("type","checkbox"),s.setAttribute("value",t[d].id),s.setAttribute("name","qc_choice_vendors["+n+"]"),-1<v.indexOf(n.toString())&&s.setAttribute("checked","checked"),c.appendChild(s),c.appendChild(i),o.appendChild(c),m.appendChild(o)}u.removeAttribute("disabled");var l=document.getElementById("vendor_list_loader");l&&l.remove()})}}(jQuery);
     1jQuery;
     2//# sourceMappingURL=script.min.js.map
  • quantcast-choice/tags/2.0.0/composer.json

    r2053668 r2355432  
    11{
    22    "name": "quantcast/quantcast-choice",
    3     "version": "1.2.2",
    4     "description": "Quantcast Choice GDPR Consent",
     3    "version": "2.0.0",
     4    "description": "Quantcast Choice TCF v2.0 Consent Management Platform (CMP) for GDPR (including IAB & Non-IAB vendor suppport), CCPA & ePrivacy Directive.",
    55    "type": "wordpress-plugin",
    66    "authors": [
     
    88            "name": "Ryan Baron",
    99            "email": "rbaron@quantcast.com",
    10             "homepage": "https://www.quantcast.com"
     10            "homepage": "https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=info&utm_term=author-home&utm_content=choice"
    1111        }
    1212    ],
  • quantcast-choice/tags/2.0.0/includes/class-qc-choice.php

    r2053666 r2355432  
    7171            $this->version = QC_CHOICE_VERSION;
    7272        } else {
    73             $this->version = '1.2.2';
     73            $this->version = '2.0.0';
    7474        }
    7575        $this->plugin_name = 'qc-choice';
     
    188188        $plugin_public = new QC_Choice_Public( $this->get_plugin_name(), $this->get_version() );
    189189
     190        $this->loader->add_filter( 'script_loader_tag', $plugin_public , 'add_async_attribute', 10, 2 );
     191
     192        $this->loader->add_action( 'wp_footer', $plugin_public, 'add_footer_message_container', 10, 0 );
     193
    190194        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
    191195        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
  • quantcast-choice/tags/2.0.0/public/class-qc-choice-public.php

    r2053666 r2355432  
    11<?php
    22
    3 use QCChoice\Values\QC_Choice_Values;
     3use QCChoice\Values\QC_Choice_Values;  // This entire class and its functionality should be removed in the next TCF v2 update.
    44
    55/**
     
    5959     */
    6060    private $qc_choice_display_language;
    61    
     61
    6262    /**
    6363     * The avaliable languages.
     
    6868     */
    6969    private $qc_choice_avaliable_languages;
     70
     71    /**
     72     * Quantcast.com account Universal Tag ID.
     73     *
     74     * @since    2.0.0
     75     * @access   private
     76     * @var      array    $qc_choice_utid    A string value that should contain a valid quantcast.com utid.
     77     */
     78    private $qc_choice_cmp_utid;
     79
     80    /**
     81     * How to display the Chioce CCPA msg '', 'auto', 'manual'.
     82     *
     83     * @since    2.0.0
     84     * @access   private
     85     * @var      array    $qc_choice_cmp_ccpa_wp_footer    A string value to indicate the CCPA footer display style.
     86     */
     87    private $qc_choice_cmp_ccpa_wp_footer;
     88
     89    /**
     90     * Enable the CMP to be shown to users.
     91     *
     92     * @since    2.0.0
     93     * @access   private
     94     * @var      string    $qc_choice_cmp_enable    Enable Quantcast Choice TCF v2.
     95     */
     96    private $qc_choice_cmp_enable;
     97
     98    /**
     99     * Enable automatic Data Layer push.
     100     *
     101     * @since    2.0.0
     102     * @access   private
     103     * @var      string    $qc_choice_cmp_datalayer_push    Enable automatic push of consent signals to the data layer.
     104     */
     105    private $qc_choice_cmp_datalayer_push;
    70106
    71107    /**
     
    80116        $this->plugin_name = $plugin_name;
    81117        $this->version = $version;
    82         $this->qc_choice_values = new QC_Choice_Values();
    83 
    84         // Set the frontend display language.
    85         $this->set_display_language();
    86 
    87     }
     118
     119        $this->qc_choice_cmp_utid = esc_attr( get_option( 'qc_choice_cmp_utid' ) );
     120        $this->qc_choice_cmp_enable = esc_attr( get_option( 'qc_choice_cmp_enable' ) );
     121        $this->qc_choice_cmp_ccpa_wp_footer = esc_attr( get_option( 'qc_choice_cmp_ccpa_wp_footer' ) );
     122        $this->qc_choice_cmp_datalayer_push = esc_attr( get_option( 'qc_choice_cmp_datalayer_push' ) );
     123
     124        if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) {
     125            // TCF v1 Enabled (Scheduled deprecation of TCFv1 on August 16, 2020 by the IAB).
     126            $this->qc_choice_values = new QC_Choice_Values();
     127
     128            // Set the frontend display language.
     129            $this->set_display_language();
     130        }
     131        else {
     132            // TCF v2 Enabled
     133        }
     134
     135    }
     136
     137    /**
     138     * Register the stylesheets for the public-facing side of the site.
     139     *
     140     * @since    1.0.0
     141     */
     142    public function enqueue_styles() {
     143
     144        if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) {
     145            // TCF v1 Enabled (Scheduled deprecation of TCFv1 on August 16, 2020 by the IAB).
     146            wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/style.min.css', array(), $this->version, 'all' );
     147        }
     148        else {
     149            // TCF v2 enabled
     150            wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/style.min.css', array(), $this->version, 'all' );
     151        }
     152
     153    }
     154
     155    /**
     156     * Register the JavaScript for the public-facing side of the site.
     157     *
     158     * @since    1.0.0
     159     */
     160    public function enqueue_scripts() {
     161
     162        if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) {
     163
     164            // TCF v1 Enabled (Scheduled deprecation of TCFv1 on August 16, 2020 by the IAB).
     165            wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', array(), $this->version, false );
     166            wp_enqueue_script( 'qc-choice-init', plugin_dir_url( __FILE__ ) . 'js/script.async.min.js', array(), $this->version, false );
     167
     168            // localize the qc-choice-init script and pass in the qc_choice_init values
     169            $qc_choice_init = $this->get_cmp_init_values();
     170            wp_localize_script( 'qc-choice-init', 'qc_choice_init', $qc_choice_init );
     171
     172        }
     173        else {
     174
     175            // TCF v2 enabled
     176            wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', '', $this->version, false );
     177
     178            $choice_cmp_config = array(
     179                'utid' => $this->qc_choice_cmp_utid,
     180                'enabled' => $this->qc_choice_cmp_enable,
     181                'ccpa' => $this->qc_choice_cmp_ccpa_wp_footer,
     182                'datalayer' => $this->qc_choice_cmp_datalayer_push,
     183            );
     184
     185            wp_localize_script( $this->plugin_name, 'choice_cmp_config', $choice_cmp_config );
     186
     187        }
     188
     189    }
     190
     191    /**
     192     * Javascript async attribute filter.
     193     *
     194     * @since    1.0.0
     195     */
     196    public function add_async_attribute($tag, $handle) {
     197
     198        // Add scripts to the array to make the async
     199        $scripts_to_async = array(
     200            $this->plugin_name,
     201        );
     202
     203        foreach($scripts_to_async as $async_script) {
     204            if ($async_script === $handle) {
     205                return str_replace(' src', ' async="async" src', $tag);
     206            }
     207        }
     208
     209        return $tag;
     210    }
     211
     212
     213    /**
     214     * Add a container to the footer with the id 'choice-footer-msg' where choice
     215     *   automatically add the CCPA message.
     216     *
     217     * @since    2.0.0
     218     */
     219    public function add_footer_message_container() {
     220        // Only add the footer message container if the admin has enabled auto adding.
     221        if( 'auto' === $this->qc_choice_cmp_ccpa_wp_footer ) {
     222            echo '<div class="container container-choice-footer-msg"><div class="container-inside"><div id="choice-footer-msg" class="choice-footer-msg"></div></div></div>';
     223        }
     224    }
     225
    88226
    89227    /**
     
    100238
    101239    }
     240
     241
    102242    /**
    103243    * Set the language for frontend display.
     
    146286    }
    147287
    148     /**
    149      * Register the stylesheets for the public-facing side of the site.
    150      *
    151      * @since    1.0.0
    152      */
    153     public function enqueue_styles() {
    154 
    155         wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/style.min.css', array(), $this->version, 'all' );
    156 
    157     }
    158 
    159     /**
    160      * Register the JavaScript for the public-facing side of the site.
    161      *
    162      * @since    1.0.0
    163      */
    164     public function enqueue_scripts() {
    165 
    166         wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', array(), $this->version, true );
    167         wp_enqueue_script( 'qc-choice-init', plugin_dir_url( __FILE__ ) . 'js/script.async.min.js', array(), $this->version, true );
    168 
    169         // localize the qc-choice-init script and pass in the qc_choice_init values
    170         $qc_choice_init = $this->get_cmp_init_values();
    171         wp_localize_script( 'qc-choice-init', 'qc_choice_init', $qc_choice_init );
    172 
    173     }
    174288
    175289    /**
  • quantcast-choice/tags/2.0.0/public/css/style.min.css

    r1893098 r2355432  
    1 .page-content{-ms-flex-flow:row nowrap;flex-flow:row nowrap;min-height:calc(60vh - 120px);min-width:0;padding:25px 0;position:relative;width:100%}.centered-content,.page-content{display:-ms-flexbox;display:flex;margin:0 auto}.centered-content{-ms-flex-flow:column;flex-flow:column;-ms-flex-line-pack:center;align-content:center;max-width:800px;min-width:276px;width:80vw}.content-title{font-size:24px;font-weight:700;width:100%}.consent-header{color:#000;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.change-consent{color:#6844cd;cursor:pointer;font-size:16px;font-weight:100;line-height:27px;text-decoration:underline;transition:all .2s ease-in-out}.change-consent:before{content:"\f013";display:inline-block;font-family:Font Awesome\ 5 Free;font-style:normal;font-variant:normal;font-weight:900;margin-right:10px;text-rendering:auto;-webkit-font-smoothing:antialiased}.change-consent:hover{opacity:.6}.consent-lists{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.consent-list-container{-ms-flex:1 1 40%;flex:1 1 40%;margin:0 25px}.consent-list{border-collapse:collapse;font-family:neuzeit-grotesk,Arial,Verdana,sans-serif;text-align:left;width:100%;margin-bottom:25px}.consent-list-title{font-size:14px;letter-spacing:2px;margin:0;text-transform:uppercase}.consent-row{height:45px;background-color:#fafafa;border:1px solid #e8e9ea}.no-consent{opacity:.5}.no-consent:before{content:"\f057";display:inline-block;font-family:Font Awesome\ 5 Free;font-style:normal;font-variant:normal;font-weight:900;margin-right:15px;text-rendering:auto;-webkit-font-smoothing:antialiased}.has-consent{color:#00b47d}.has-consent:before{content:"\f058";display:inline-block;font-family:Font Awesome\ 5 Free;font-style:normal;font-variant:normal;font-weight:900;margin-right:15px;text-rendering:auto;-webkit-font-smoothing:antialiased}.learn-more{width:100%}.content-subtitle{font-size:18px;font-weight:700}.consent-list-container .consent-cell,.qc-cmp-ui-container .qc-cmp-company-cell,.qc-cmp-ui-container .qc-cmp-enabled-cell,.qc-cmp-ui-container .qc-cmp-table-header,.qc-cmp-ui-container .qc-cmp-table-row,.qc-cmp-ui-container .qc-cmp-vendor-column-header{padding:0 15px}.qc-cmp-ui-container .qc-cmp-title{padding:0}.qc-cmp-ui-container .qc-cmp-table{margin:0}.qc-cmp-ui-container .qc-cmp-toggle{background-color:#a6a9ae;border:1px solid #a6a9ae;border-radius:27px;cursor:pointer;display:block;height:23px;margin:0 0 0 auto;position:relative;width:44px}.qc-cmp-ui-container .qc-cmp-toggle.qc-cmp-toggle-on{background-color:#368bd6;border-color:#368bd6}.qc-cmp-ui-container .qc-cmp-toggle.qc-cmp-toggle-on .qc-cmp-toggle-switch{right:0}.qc-cmp-ui-container .qc-cmp-toggle-switch{position:absolute;display:inline-block;top:0;right:21px;width:23px;height:23px;background-color:#fff;border-radius:50%;transition:all .1s ease-in-out 0ms}.qc-cmp-ui-container .qc-cmp-vendor-info-content{padding:0 15px 15px;font-size:12px;line-height:16px}.qc-cmp-ui-container .qc-cmp-vendor-row{border-bottom:none}.qc-cmp-ui-container .qc-cmp-purpose-toggle-cell{text-align:right;padding-right:15px}.qc-cmp-toggle{box-sizing:content-box}
     1.container-choice-footer-msg{text-align:center}.container-choice-footer-msg .container-inside .ccpa-msg-added{padding:2rem}.page-content{display:flex;flex-flow:row nowrap;margin:0 auto;min-height:calc(60vh - 120px);min-width:0;padding:25px 0;position:relative;width:100%}.centered-content{display:flex;flex-flow:column;align-content:center;margin:0 auto;max-width:800px;min-width:276px;width:80vw}.content-title{font-size:24px;font-weight:700;width:100%}.consent-header{color:#000;display:flex;justify-content:space-between}.change-consent{color:#6844cd;cursor:pointer;font-size:16px;font-weight:100;line-height:27px;text-decoration:underline;transition:all .2s ease-in-out}.change-consent::before{content:"\f013";display:inline-block;font-family:"Font Awesome 5 Free";font-style:normal;font-variant:normal;font-weight:900;margin-right:10px;text-rendering:auto;-webkit-font-smoothing:antialiased}.change-consent:hover{opacity:.6}.consent-lists{display:flex;flex-wrap:wrap}.consent-list-container{flex:1 1 40%;margin:0 25px}.consent-list{border-collapse:collapse;font-family:neuzeit-grotesk,Arial,Verdana,sans-serif;text-align:left;width:100%;margin-bottom:25px}.consent-list-title{font-size:14px;letter-spacing:2px;margin:0;text-transform:uppercase}.consent-row{height:45px;background-color:#fafafa;border:1px solid #e8e9ea}.no-consent{opacity:.5}.no-consent::before{content:"\f057";display:inline-block;font-family:"Font Awesome 5 Free";font-style:normal;font-variant:normal;font-weight:900;margin-right:15px;text-rendering:auto;-webkit-font-smoothing:antialiased}.has-consent{color:#00b47d}.has-consent::before{content:"\f058";display:inline-block;font-family:"Font Awesome 5 Free";font-style:normal;font-variant:normal;font-weight:900;margin-right:15px;text-rendering:auto;-webkit-font-smoothing:antialiased}.learn-more{width:100%}.content-subtitle{font-size:18px;font-weight:700}.consent-list-container .consent-cell{padding:0 15px}.qc-cmp-ui-container .qc-cmp-company-cell,.qc-cmp-ui-container .qc-cmp-enabled-cell,.qc-cmp-ui-container .qc-cmp-table-header,.qc-cmp-ui-container .qc-cmp-table-row,.qc-cmp-ui-container .qc-cmp-vendor-column-header{padding:0 15px}.qc-cmp-ui-container .qc-cmp-title{padding:0}.qc-cmp-ui-container .qc-cmp-table{margin:0}.qc-cmp-ui-container .qc-cmp-toggle{background-color:#a6a9ae;border:1px solid #a6a9ae;border-radius:27px;cursor:pointer;display:block;height:23px;margin:0 0 0 auto;position:relative;width:44px}.qc-cmp-ui-container .qc-cmp-toggle.qc-cmp-toggle-on{background-color:#368bd6;border-color:#368bd6}.qc-cmp-ui-container .qc-cmp-toggle.qc-cmp-toggle-on .qc-cmp-toggle-switch{right:0}.qc-cmp-ui-container .qc-cmp-toggle-switch{position:absolute;display:inline-block;top:0;right:21px;width:23px;height:23px;background-color:#fff;border-radius:50%;transition:all .1s ease-in-out 0s}.qc-cmp-ui-container .qc-cmp-vendor-info-content{padding:0 15px 15px;font-size:12px;line-height:16px}.qc-cmp-ui-container .qc-cmp-vendor-row{border-bottom:none}.qc-cmp-ui-container .qc-cmp-purpose-toggle-cell{text-align:right;padding-right:15px}.qc-cmp-toggle{box-sizing:content-box}.qc-cmp-deprecation-messaging p{padding:1rem;margin:0}
     2/*# sourceMappingURL=style.min.css.map */
  • quantcast-choice/tags/2.0.0/public/js/script.async.min.js

    r1881293 r2355432  
    1 (function($) {
    2     var elem = document.createElement('script');
    3     elem.src = 'https://quantcast.mgr.consensu.org/cmp.js';
    4     elem.async = true;
    5     elem.type = "text/javascript";
    6     var scpt = document.getElementsByTagName('script')[0];
    7     scpt.parentNode.insertBefore(elem, scpt);
     1var elem = document.createElement('script');
     2elem.src = 'https://quantcast.mgr.consensu.org/cmp.js';
     3elem.async = true;
     4elem.type = "text/javascript";
     5var scpt = document.getElementsByTagName('script')[0];
     6scpt.parentNode.insertBefore(elem, scpt);
    87
    9     (function() {
    10         var gdprAppliesGlobally = true;
    11         function addFrame() {
    12             if (!window.frames['__cmpLocator']) {
    13                 if (document.body) {
    14                     var body = document.body,
    15                             iframe = document.createElement('iframe');
    16                     iframe.style = 'display:none';
    17                     iframe.name = '__cmpLocator';
    18                     body.appendChild(iframe);
    19                 } else {
    20                     // In the case where this stub is located in the head,
    21                     // this allows us to inject the iframe more quickly than
    22                     // relying on DOMContentLoaded or other events.
    23                     setTimeout(addFrame, 5);
    24                 }
     8(function() {
     9    var gdprAppliesGlobally = true;
     10    function addFrame() {
     11        if (!window.frames['__cmpLocator']) {
     12            if (document.body) {
     13                var body = document.body,
     14                        iframe = document.createElement('iframe');
     15                iframe.style = 'display:none';
     16                iframe.name = '__cmpLocator';
     17                body.appendChild(iframe);
     18            } else {
     19                // In the case where this stub is located in the head,
     20                // this allows us to inject the iframe more quickly than
     21                // relying on DOMContentLoaded or other events.
     22                setTimeout(addFrame, 5);
    2523            }
    2624        }
     25    }
    2726
    28         addFrame();
     27    addFrame();
    2928
    30         function cmpMsgHandler(event) {
    31             var msgIsString = typeof event.data === "string";
    32             var json;
    33             if(msgIsString) {
    34                 json = event.data.indexOf("__cmpCall") != -1 ? JSON.parse(event.data) : {};
    35             } else {
    36                 json = event.data;
    37             }
    38 
    39             if (json.__cmpCall) {
    40                 var i = json.__cmpCall;
    41                 window.__cmp(i.command, i.parameter, function(retValue, success) {
    42                     var returnMsg = {"__cmpReturn": {
    43                     "returnValue": retValue,
    44                     "success": success,
    45                     "callId": i.callId
    46                     }};
    47                     event.source.postMessage(msgIsString ?
    48                     JSON.stringify(returnMsg) : returnMsg, '*');
    49                 });
    50             }
     29    function cmpMsgHandler(event) {
     30        var msgIsString = typeof event.data === "string";
     31        var json;
     32        if(msgIsString) {
     33            json = event.data.indexOf("__cmpCall") != -1 ? JSON.parse(event.data) : {};
     34        } else {
     35            json = event.data;
    5136        }
    5237
    53         window.__cmp = function (c) {
    54             var b = arguments;
    55             if (!b.length) {
    56                 return __cmp.a;
    57             }
    58             else if (b[0] === 'ping') {
    59                 b[2]({"gdprAppliesGlobally": gdprAppliesGlobally,
    60                     "cmpLoaded": false}, true);
    61             } else if (c == '__cmp')
    62                 return false;
    63             else {
    64                 if (typeof __cmp.a === 'undefined') {
    65                     __cmp.a = [];
    66             }
    67             __cmp.a.push([].slice.apply(b));
    68             }
     38        if (json.__cmpCall) {
     39            var i = json.__cmpCall;
     40            window.__cmp(i.command, i.parameter, function(retValue, success) {
     41                var returnMsg = {"__cmpReturn": {
     42                "returnValue": retValue,
     43                "success": success,
     44                "callId": i.callId
     45                }};
     46                event.source.postMessage(msgIsString ?
     47                JSON.stringify(returnMsg) : returnMsg, '*');
     48            });
    6949        }
    70         window.__cmp.gdprAppliesGlobally = gdprAppliesGlobally;
    71         window.__cmp.msgHandler = cmpMsgHandler;
     50    }
    7251
    73         if (window.addEventListener) {
    74             window.addEventListener('message', cmpMsgHandler, false);
     52    window.__cmp = function (c) {
     53        var b = arguments;
     54        if (!b.length) {
     55            return __cmp.a;
    7556        }
     57        else if (b[0] === 'ping') {
     58            b[2]({"gdprAppliesGlobally": gdprAppliesGlobally,
     59                "cmpLoaded": false}, true);
     60        } else if (c == '__cmp')
     61            return false;
    7662        else {
    77             window.attachEvent('onmessage', cmpMsgHandler);
     63            if (typeof __cmp.a === 'undefined') {
     64                __cmp.a = [];
    7865        }
     66        __cmp.a.push([].slice.apply(b));
     67        }
     68    }
     69    window.__cmp.gdprAppliesGlobally = gdprAppliesGlobally;
     70    window.__cmp.msgHandler = cmpMsgHandler;
    7971
    80     })();
     72    if (window.addEventListener) {
     73        window.addEventListener('message', cmpMsgHandler, false);
     74    }
     75    else {
     76        window.attachEvent('onmessage', cmpMsgHandler);
     77    }
    8178
    82     window.__cmp('init', JSON.parse( qc_choice_init ) );
     79})();
    8380
    84 })(jQuery);
     81window.__cmp('init', JSON.parse( qc_choice_init ) );
  • quantcast-choice/tags/2.0.0/public/js/script.min.js

    r1881293 r2355432  
    1 !function(n){"use strict";if(n("body").on("click","a[href^='#']",function(e){"#displayConsentUI"===n(this).attr("href")&&(e.preventDefault(),window.__cmp("displayConsentUi"))}),n("#qc_choice_consent_display").length){var e=document.createElement("link");e.rel="stylesheet",e.href="https://use.fontawesome.com/releases/v5.0.1/css/all.css",document.head.appendChild(e);var s=function(o){var c=document.getElementById(o.tableId);c.innerHTML="",o.requestors.forEach(function(e,n){var t=document.createElement("td");t.className="consent-cell "+(o.consents[e.id]?"has-consent":"no-consent"),t.innerText=e.name||e.purpose;var s=document.createElement("tr");s.className="consent-row",s.appendChild(t),c.appendChild(s)})},t=function(){window.__cmp("setConsentUiCallback",function(){window.__cmp("getVendorList","LATEST",function(e){var n=e.vendors,t=e.purposes;n&&t&&(window.__cmp("getVendorConsents",null,function(e){s({requestors:n,consents:e.vendorConsents,tableId:"vendorList"}),s({requestors:t,consents:e.purposeConsents,tableId:"vendorPurposeList"})}),window.__cmp("getPublisherConsents",null,function(e){s({requestors:t,consents:e.standardPurposeConsents,tableId:"publisherPurposeList"})}))})})};t(),n("body").on("click","#qc_choice_consent_change",function(e){e.preventDefault(),t(),window.__cmp("displayConsentUi")})}}(jQuery);
     1!function(){var e,n,t,o,a,i,s;"undefined"!=typeof choice_cmp_config&&choice_cmp_config.utid&&choice_cmp_config.enabled&&(e=window.location.hostname,n=document.createElement("script"),t=document.getElementsByTagName("script")[0],o="https://quantcast.mgr.consensu.org".concat("/choice/",choice_cmp_config.utid,"/",e,"/choice.js"),a=0,n.async=!0,n.type="text/javascript",n.src=o,t.parentNode.insertBefore(n,t),function(){for(var e,a="__tcfapiLocator",o=[],i=window;i;){try{if(i.frames[a]){e=i;break}}catch(e){}if(i===window.top)break;i=i.parent}e||(!function e(){var n,t=i.document,o=!!i.frames[a];return o||(t.body?((n=t.createElement("iframe")).style.cssText="display:none",n.name=a,t.body.appendChild(n)):setTimeout(e,5)),!o}(),i.__tcfapi=function(){var e,n,t=arguments;if(!t.length)return o;"setGdprApplies"===t[0]?3<t.length&&2===t[2]&&"boolean"==typeof t[3]&&(e=t[3],"function"==typeof t[2]&&t[2]("set",!0)):"ping"===t[0]?(n={gdprApplies:e,cmpLoaded:!1,cmpStatus:"stub"},"function"==typeof t[2]&&t[2](n)):o.push(t)},i.addEventListener("message",function(o){var a="string"==typeof o.data,e={};try{e=a?JSON.parse(o.data):o.data}catch(e){}var i=e.__tcfapiCall;i&&window.__tcfapi(i.command,i.version,function(e,n){var t={__tcfapiReturn:{returnValue:e,success:n,callId:i.callId}};a&&(t=JSON.stringify(t)),o.source.postMessage(t,"*")},i.parameter)},!1))}(),i=function(){var e=arguments;typeof window.__uspapi!==i&&setTimeout(function(){void 0!==window.__uspapi&&window.__uspapi.apply(window.__uspapi,e)},500)},void 0===window.__uspapi&&(window.__uspapi=i,s=setInterval(function(){a++,window.__uspapi===i&&a<3?console.warn("USP is not accessible"):clearInterval(s)},6e3)))}(),function(){var e,n,t,o,a,i,s,c,r,p,d,u,f,l,_,h,w,m,g,y,v;function I(e){for(var n in b=",",e)e[n]&&(b+=n+",");return b}function L(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"__cmpLoaded",__cmpLoaded:!0,gdpr:e.gdprApplies})}function C(n){window.dataLayer=window.dataLayer||[],n.hasOwnProperty("publisher")&&(h=I(n.publisher.consents),w=I(n.publisher.legitimateInterests)),n.hasOwnProperty("purpose")&&(m=I(n.purpose.consents),g=I(n.purpose.legitimateInterests));var e=0,t=setInterval(function(){100===(e+=1)&&clearInterval(t),o&&p&&(clearInterval(t),n.gdprApplies?n.hasOwnProperty("vendor")&&Object.keys(n.vendor.consents).forEach(function(e){!n.vendor.consents[e]&&n.gdprApplies||(r[e]=s[e],c[e]=e)}):(r=s).forEach(function(e,n){c[n]=n}),i=r.filter(Boolean).join("|"),a=c.filter(Boolean).join(","),window.__tcfapi("getNonIABVendorConsents",2,function(n,e){e&&(n.gdprApplies&&n.hasOwnProperty("nonIabVendorConsents")&&null!==n.nonIabVendorConsents?Object.keys(n.nonIabVendorConsents).forEach(function(e){!n.nonIabVendorConsents[e]&&n.gdprApplies||(_[e]=f[e],l[e]=e)}):(_=f).forEach(function(e,n){l[n]=n}))}),u=_.filter(Boolean).join("|"),d=l.filter(Boolean).join(","),window.dataLayer.push({event:"__cmpConsents",__cmpConsents:{iabVendorConsentIds:a,iabVendorsWithConsent:i,nonIABVendorConsentIds:d,nonIABVendorsWithConsent:u,gdpr:n.gdprApplies,publisherConsents:h,publisherLegitimateInterests:w,purposeConsents:m,purposeLegitimateInterests:g}}))},100)}"undefined"!=typeof choice_cmp_config&&choice_cmp_config.utid&&choice_cmp_config.enabled&&(e=(new Date).getTime(),n=window.location.hostname,t="https://quantcast.mgr.consensu.org".concat("/choice/",choice_cmp_config.utid,"/",n,"/.well-known/noniab-vendorlist.json").concat("?timestamp=",e),s=[],c=[],r=[],f=[],l=[],_=[],choice_cmp_config.datalayer&&((v=new XMLHttpRequest).onreadystatechange=function(){var e;4!=this.readyState||200!=this.status||(e=JSON.parse(this.responseText)).hasOwnProperty("vendors")&&(o=e.vendors,Object.keys(o).forEach(function(e){s[o[e].id]=o[e].name}))},v.open("GET","https://test.quantcast.mgr.consensu.org/GVL-v2/vendor-list.json",!0),v.send(),(y=new XMLHttpRequest).onreadystatechange=function(){var e;4!=this.readyState||200!=this.status||(e=JSON.parse(this.responseText)).hasOwnProperty("nonIabVendorList")&&(p=e.nonIabVendorList,Object.keys(p).forEach(function(e){f[p[e].vendorId]=p[e].name}))},y.open("GET",t,!0),y.send()),window.__tcfapi("addEventListener",2,function(e,n){if(n)switch(e.eventStatus){case"cmpuishown":choice_cmp_config.datalayer&&L(e);break;case"tcloaded":choice_cmp_config.datalayer&&(L(e),C(e)),choice_cmp_config.ccpa&&choice_cmp_config.ccpa&&window.__uspapi("uspPing",1,function(e,n){var t=document.getElementById("choice-footer-msg");n&&e.mode.includes("USP")&&e.jurisdiction.includes(e.location.toUpperCase())&&null!==t&&(t.innerHTML=t.innerHTML+'We use cookies and other data collection technologies to provide the best experience for our customers. You may request that your data not be shared with third parties here: <a href="javascript:void(0)" onclick="window.__uspapi(\'displayUspUi\');">Do Not Sell My Data</a>.',t.classList.add("ccpa-msg-added"),window.__uspapi("setUspDftData",1,function(e,n){n||console.log("Error: USP string not updated!")}))});break;case"useractioncomplete":choice_cmp_config.datalayer&&C(e)}}))}();
     2function displayConsentUiClick(){document.querySelectorAll("a[href='#displayConsentUI']").forEach(function(n){n.addEventListener("click",function(n){n.preventDefault(),window.__cmp("displayConsentUi")})})}document.addEventListener("DOMContentLoaded",function(){displayConsentUiClick()});
     3//# sourceMappingURL=script.min.js.map
  • quantcast-choice/tags/2.0.0/qc-choice.php

    r2053666 r2355432  
    1515 * @wordpress-plugin
    1616 * Plugin Name:       Quantcast Choice
    17  * Plugin URI:        https://www.quantcast.com/gdpr/consent-management-solution/
    18  * Description:       The QC Choice plugin implements the Quantcast Choice GDPR Consent tool.
    19  * Version:           1.2.2
     17 * Plugin URI:        https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=learn-more&utm_content=choice
     18 * Description:       Quantcast Choice TCF v2.0 Consent Management Platform (CMP) for GDPR (including IAB & Non-IAB vendor suppport), CCPA & ePrivacy Directive.
     19 * Version:           2.0.0
    2020 * Author:            Quantcast
    21  * Author URI:        https://www.quantcast.com
     21 * Author URI:        https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=info&utm_term=author-home&utm_content=choice
    2222 * License:           GPL-2.0+
    2323 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'QC_CHOICE_VERSION', '1.2.2' );
     38define( 'QC_CHOICE_VERSION', '2.0.0' );
    3939define( 'PUBLISHER_VENDORS_VERSION', 1 );
    4040define( 'QC_CHOICE_VENDOR_FILE', 'quantcast-choice/.well-known/pubvendors.json' );
  • quantcast-choice/trunk/README.txt

    r2053668 r2355432  
    11=== Quantcast Choice ===
    2 Version: 1.2.2
     2Version: 2.0.0
    33Contributors: rbaronqc
    4 Tags: GDPR, GDPR Consent, Quantcast, Quantcast Choice, QC Choice
     4Tags: GDPR, GDPR Consent, CCPA, ePrivacy, ePrivacy Directive, Quantcast, Quantcast Choice, QC Choice, CMP, Consent Management, Consent Management Platform, TCF v2, TCF v2.0
    55Requires at least: 4.0
    6 Tested up to: 4.9.4
    7 Stable tag: 1.2.2
     6Tested up to: 5.4.2
     7Stable tag: 2.0.0
    88
    9 The Quantcast Choice plugin implements the [Quantcast Choice GDPR Consent Tool - Consumer Demo](https://quantcast.mgr.consensu.org/index.html).
     9The Quantcast Choice plugin implements the [Quantcast Choice TCF v2.0 Consent Tool](https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordrpess&utm_medium=wp-org&utm_campaign=info&utm_term=tool&utm_content=choice) offering support for GDPR (including Non-IAB vendors), CCPA and ePrivacy Directive and automatically passing consent signals to the Data Layer.
     10
     11== TCF v2.0 Update ==
     12
     13August, 9, 2020 Plugin Update
     14Now supporting *TCF v2.0*, *CCPA*, *full theme customisation*, *Non-IAB vendor support*, *vendor customisation*, *and more*.
    1015
    1116== Description ==
    1217
    13 The Quantcast Choice plugin implements the [Quantcast Choice GDPR Consent Tool - Consumer Demo](https://quantcast.mgr.consensu.org/index.html).
     18Quantcast Choice is a fully customisable Consent Management Platform (CMP). The Quantcast Choice plugin implements the [Quantcast Choice TCF v2.0 Consent Tool](https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordrpess&utm_medium=wp-org&utm_campaign=info&utm_term=tool&utm_content=choice) on WordPress websites.  Quantcast Choice supports GDPR (including Non-IAB vendors), CCPA and ePrivacy Directive regulation compliance.
    1419
    15 IAB Europe announced a technical standard to support the digital advertising ecosystem in meeting the General Data Protection Regulation (GDPR) consumer consent requirements. This provides an implementation of that framework.
     20The Quantcast Choice Plugin can also automatically push IAB and Non-IAB vendor consent signals to the data layer for consumption by Google Tag Manager and other tools.
     21
     22  From you dashboard on quantcast.com you can set:
     231. Geo location targeting
     241. Add Non-IAB vendors
     251. Customise IAB vendor settings
     261. Enable and configure CCPA support
     271. Customise the CMP display style
     281. Customise the CMP messaging and links
     291. Customise the consent scope
     301. Customise the consent configuration.
     311. And more....
    1632
    1733== Installation ==
     
    1935This section describes how to install the plugin and get it working.
    2036
     371. Create your (free quantcast.com account)[https://www.quantcast.com/signin/register?qcRefer=/protect/sites/newUser?utm_source=wordpress&utm_medium=wp-org&utm_campaign=info&utm_term=desc-create-account&utm_content=choice]
     381. Get your (Quantcast Universal Tag ID)[https://help.quantcast.com/hc/en-us/articles/360051794614-Quantcast-Choice-TCFv2-GTM-Implementation-Guide-Finding-your-UTID?utm_source=wordpress&utm_medium=wp-org&utm_campaign=info&utm_term=get-utid&utm_content=choice]
    21391. Upload `quantcast-choice` to the `/wp-content/plugins/` directory
    22401. Activate the plugin through the 'Plugins' menu in WordPress
    23 1. Navigate to the Quantcast Choice admin page and configure your settings.
     411. Navigate to the Quantcast Choice admin page and follow the setup instructions.
    2442
    2543== Frequently Asked Questions ==
     
    3149For more information and resources about GDPR, visit the [IAB Europe’s GDPR informational website](https://www.iabeurope.eu/?s=gdpr).
    3250
    33 = When does the GDPR come in effect? =
    34 
    35 The GDPR will be enforceable beginning on May 25, 2018.
    36 
    3751= To whom does the GDPR apply? =
    3852
    3953The GDPR applies to any business, whether or not it is based in the EU, that processes the personal data of EU citizens. The GDPR applies to these businesses even if the goods or services that they offer are free.
    4054
    41 = How does Quantcast Choice, or a Consent Management Provider (CMP) solution work? =
    42 
    43 Quantcast, or any other IAB approved Consent Management Provider (CMP), provides publishers and advertisers with a mechanism to obtain consent, and then control which third-party vendors can request consent to track users of their websites and apps. [Read this white paper outlining the function of a CMP and the Quantcast Consent implementation](https://www.quantcast.com/resources/how-to-obtain-consumer-consent-under-gdpr/).
    44 
    4555== Screenshots ==
    4656
    47 1. Quantcast Choice - what a consumer would see.
    48 2. Quantcast Choice - purpose level consent screen.
    49 3. Quantcast Choice - vendor level consent screen.
     571. Choice UI - Initial screen
     582. Choice UI - More options screen
     593. Choice UI - IAB vendors
     604. Choice UI - Non-IAB vendors
     615. Choice UI - IAB vendor details
     626. Dashboard UI - Theme customisation 1
     637. Dashboard UI - Theme customisation 2
     648. Dashboard UI - Theme customisation 3
     659. Dashboard UI - IAB vendors
     6610. Dashboard UI - Non-IAB vendor list
     6711. Dashboard UI - Add Non-IAB vendor
     68
    5069
    5170== Changelog ==
     
    6887= 1.2.2 =
    6988* Adding Google Personalization option.
     89
     90= 2.0.0 =
     91* Complete *upgrade to TCV v2.0* that requires a *free* [quantcast.com account](https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=website&utm_campaign=tcfv2&utm_content=changelog)
     92* Complete IAB and Non-IAB vendor management from your quantcast.com dashboard.
     93* CCPA support
     94* Automatic consent value push to the Data Layer for signal consumption by Google Tag Manager
  • quantcast-choice/trunk/admin/class-qc-choice-admin-pages.php

    r2053666 r2355432  
    5050
    5151    /**
     52     * Quantcast Universal Tag ID.
     53     *
     54     * @since    2.0.0
     55     * @access   private
     56     * @var      string    $qc_choice_cmp_utid    Quantcast Universal Tag ID.
     57     */
     58    private $qc_choice_cmp_utid;
     59
     60    /**
     61     * Enable automatic Data Layer push.
     62     *
     63     * @since    2.0.0
     64     * @access   private
     65     * @var      string    $qc_choice_cmp_datalayer_push    Enable automatic push of consent signals to the data layer.
     66     */
     67    private $qc_choice_cmp_datalayer_push;
     68
     69    /**
     70     * Enable the CMP to be shown to users.
     71     *
     72     * @since    2.0.0
     73     * @access   private
     74     * @var      string    $qc_choice_cmp_enable    Enable Quantcast Choice TCF v2.
     75     */
     76    private $qc_choice_cmp_enable;
     77
     78    /**
     79     * Enable CCPA automatically in the footer
     80     *
     81     * @since    2.0.0
     82     * @access   private
     83     * @var      string    $qc_choice_cmp_ccpa_wp_footer    Quantcast Universal Tag ID.
     84     */
     85    private $qc_choice_cmp_ccpa_wp_footer;
     86
     87    /**
    5288     * Initialize the class and set its properties.
    5389     *
     
    64100            ? $this->qc_choice_language
    65101            : $this->qc_choice_language_default;
     102
     103        $this->qc_choice_cmp_utid = esc_attr( get_option( 'qc_choice_cmp_utid' ) );
     104        $this->qc_choice_cmp_datalayer_push = esc_attr( get_option( 'qc_choice_cmp_datalayer_push' ) );
     105        $this->qc_choice_cmp_enable = esc_attr( get_option( 'qc_choice_cmp_enable' ) );
     106        $this->qc_choice_cmp_ccpa_wp_footer = esc_attr( get_option( 'qc_choice_cmp_ccpa_wp_footer' ) );
    66107
    67108        add_action( 'admin_init', array( $this, 'qc_choice_options_page_init' ) );
     
    230271     */
    231272    public function qc_choice_options() { ?>
    232 
    233273        <div class="wrap wrap-qc-choice-options">
    234             <div class="admin-header">
    235                 <div class="left"><h1><?php _e( 'Quantcast Choice Options', 'qc-choice' ); ?></h1></div>
    236                 <div class="right">
    237                     <div class='logo'>
    238                         <div>
    239                             <a target="_blank" href="<?php _e( 'https://www.quantcast.com', 'qc-choice' ); ?>" target="_blank">
    240                                 <img src="<?php echo plugins_url( 'quantcast-choice/admin/img/quantcast-logo.png' ); ?>" />
    241                             </a>
    242                         </div>
    243                         <div>
    244                             <a target="_blank" href="<?php _e( 'https://www.quantcast.com/gdpr', 'qc-choice' ); ?>" target="_blank"><?php _e( 'More About GDPR', 'qc-choice' ); ?></a>
    245                         </div>
    246                         <div>
    247                             <a target="_blank" href="<?php _e( 'https://www.quantcast.com/gdpr/consent-management-solution/', 'qc-choice' ); ?>" target="_blank"><?php _e( 'More about Quantcast Choice', 'qc-choice' ); ?></a>
    248                         </div>
    249                         <div>
    250                             <a target="_blank" href="<?php _e( 'https://www.quantcast.com/terms/quantcast-choice-terms-of-service/', 'qc-choice' ); ?>" target="_blank"><?php _e( 'Quantcast Choice Terms of Service', 'qc-choice' ); ?></a>
    251                         </div>
    252                     </div>
    253                 </div>
    254                 <div class="clear"></div>
     274
     275            <div class="plugin-title-wrapper">
     276                <h1><?php _e('Quantcast Choice - TCF v2.0', 'qc-choice'); ?></h1>
    255277            </div>
    256278
     
    261283                    $active_tab = $_GET[ 'tab' ];
    262284                } else {
    263                     $active_tab = 'general_configuration';
     285                    $active_tab = 'overview_screen';
    264286                }
    265287            ?>
    266288
    267             <h2 class="nav-tab-wrapper">
    268                 <?php if ( 'general_configuration' === $active_tab ) { ?>
    269                     <a href="?page=qc-choice-options&tab=general_configuration" class="nav-tab active"><?php _e( 'General Settings', 'qc-choice' ); ?></a>
     289            <div class="nav-tab-wrapper">
     290                <?php if ( 'overview_screen' === $active_tab ) { ?>
     291                    <a href="?page=qc-choice-options&tab=overview_screen" class="nav-tab active"><?php _e( 'Overview', 'qc-choice' ); ?></a>
    270292                <?php } else { ?>
    271                     <a href="?page=qc-choice-options&tab=general_configuration" class="nav-tab"><?php _e( 'General Settings', 'qc-choice' ); ?></a>
     293                    <a href="?page=qc-choice-options&tab=overview_screen" class="nav-tab"><?php _e( 'Overview', 'qc-choice' ); ?></a>
    272294                <?php }?>
    273295
    274                 <?php if ( 'initial_screen' === $active_tab ) { ?>
    275                     <a href="?page=qc-choice-options&tab=initial_screen" class="nav-tab active"><?php _e( 'Initial Screen', 'qc-choice' ); ?></a>
     296                <?php if ( 'tcfv2_screen' === $active_tab ) { ?>
     297                    <a href="?page=qc-choice-options&tab=tcfv2_screen" class="nav-tab active"><?php _e( 'TCF v2.0 Settings', 'qc-choice' ); ?></a>
    276298                <?php } else { ?>
    277                     <a href="?page=qc-choice-options&tab=initial_screen" class="nav-tab"><?php _e( 'Initial Screen', 'qc-choice' ); ?></a>
     299                    <a href="?page=qc-choice-options&tab=tcfv2_screen" class="nav-tab"><?php _e( 'TCF v2.0 Settings', 'qc-choice' ); ?></a>
    278300                <?php }?>
    279301
    280                 <?php if ( 'purpose_screen' === $active_tab ) { ?>
    281                     <a href="?page=qc-choice-options&tab=purpose_screen" class="nav-tab active"><?php _e( 'Purpose Screen', 'qc-choice' ); ?></a>
    282                 <?php } else { ?>
    283                     <a href="?page=qc-choice-options&tab=purpose_screen" class="nav-tab"><?php _e( 'Purpose Screen', 'qc-choice' ); ?></a>
    284                 <?php }?>
    285 
    286                 <?php if ( 'vendor_screen' === $active_tab ) { ?>
    287                     <a href="?page=qc-choice-options&tab=vendor_screen" class="nav-tab active"><?php _e( 'Vendor Screen', 'qc-choice' ); ?></a>
    288                 <?php } else { ?>
    289                     <a href="?page=qc-choice-options&tab=vendor_screen" class="nav-tab"><?php _e( 'Vendor Screen', 'qc-choice' ); ?></a>
    290                 <?php }?>
    291 
    292                 <?php if ( 'buttons' === $active_tab ) { ?>
    293                     <a href="?page=qc-choice-options&tab=buttons" class="nav-tab active"><?php _e( 'Buttons', 'qc-choice' ); ?></a>
    294                 <?php } else { ?>
    295                     <a href="?page=qc-choice-options&tab=buttons" class="nav-tab"><?php _e( 'Buttons', 'qc-choice' ); ?></a>
    296                 <?php }?>
    297             </h2>
     302                <?php
     303                // Only show the TCF v1 options if the UTID is not set.
     304                ?>
     305                <?php if( empty( $this->qc_choice_cmp_utid ) ) { ?>
     306                    <?php if ( 'general_configuration' === $active_tab ) { ?>
     307                        <a href="?page=qc-choice-options&tab=general_configuration" class="nav-tab active"><?php _e( 'General Settings', 'qc-choice' ); ?></a>
     308                    <?php } else { ?>
     309                        <a href="?page=qc-choice-options&tab=general_configuration" class="nav-tab"><?php _e( 'General Settings', 'qc-choice' ); ?></a>
     310                    <?php }?>
     311
     312                    <?php if ( 'initial_screen' === $active_tab ) { ?>
     313                        <a href="?page=qc-choice-options&tab=initial_screen" class="nav-tab active"><?php _e( 'Initial Screen', 'qc-choice' ); ?></a>
     314                    <?php } else { ?>
     315                        <a href="?page=qc-choice-options&tab=initial_screen" class="nav-tab"><?php _e( 'Initial Screen', 'qc-choice' ); ?></a>
     316                    <?php }?>
     317
     318                    <?php if ( 'purpose_screen' === $active_tab ) { ?>
     319                        <a href="?page=qc-choice-options&tab=purpose_screen" class="nav-tab active"><?php _e( 'Purpose Screen', 'qc-choice' ); ?></a>
     320                    <?php } else { ?>
     321                        <a href="?page=qc-choice-options&tab=purpose_screen" class="nav-tab"><?php _e( 'Purpose Screen', 'qc-choice' ); ?></a>
     322                    <?php }?>
     323
     324                    <?php if ( 'vendor_screen' === $active_tab ) { ?>
     325                        <a href="?page=qc-choice-options&tab=vendor_screen" class="nav-tab active"><?php _e( 'Vendor Screen', 'qc-choice' ); ?></a>
     326                    <?php } else { ?>
     327                        <a href="?page=qc-choice-options&tab=vendor_screen" class="nav-tab"><?php _e( 'Vendor Screen', 'qc-choice' ); ?></a>
     328                    <?php }?>
     329
     330                    <?php if ( 'buttons' === $active_tab ) { ?>
     331                        <a href="?page=qc-choice-options&tab=buttons" class="nav-tab active"><?php _e( 'Buttons', 'qc-choice' ); ?></a>
     332                    <?php } else { ?>
     333                        <a href="?page=qc-choice-options&tab=buttons" class="nav-tab"><?php _e( 'Buttons', 'qc-choice' ); ?></a>
     334                    <?php }?>
     335                <?php } ?>
     336            </div>
    298337
    299338            <form method="post" action="options.php">
    300339
    301                 <?php if( $active_tab === 'general_configuration' ) { ?>
     340                <?php if( $active_tab === 'overview_screen' ) { ?>
     341
     342                    <div class="tab-content">
     343                        <div class="tab-content-inside">
     344                            <div class='wordmark'>
     345                                <div>
     346                                    <a target="_blank" href="<?php _e( 'https://www.quantcast.com/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=logo&utm_content=choice', 'qc-choice' ); ?>" target="_blank">
     347                                        <img src="<?php echo plugins_url( 'quantcast-choice/admin/img/quantcast-choice-wordmark.png' ); ?>" />
     348                                    </a>
     349                                </div>
     350                            </div>
     351
     352                            <?php $hl_style = (empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) ? 'style="color:red;"' : ''; ?>
     353
     354                            <?php if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) { ?>
     355                                <h1 class="update-headline">
     356                                    <?php _e( '**Important - REQUIRED TCF v2.0 Update before August 16, 2020.', 'qc-choice' ); ?>
     357                                </h1>
     358                                <h4 class="update-subheadline">
     359                                    <?php _e( 'Follow the setup steps or video guide below, it only takes a few minutes.', 'qc-choice' ); ?>
     360                                </h4>
     361                            <?php } ?>
     362
     363                            <div class="instructions-wrapper">
     364                                <div class="instructions-box instructions-box-left">
     365                                    <div class="instructions-box-inside">
     366                                        <h4 <?php echo $hl_style ?>><?php _e('Choice TCF v2.0 Setup Intructions (Required)', 'qc-choice'); ?></h4>
     367                                        <ol>
     368                                            <li>
     369                                                <?php printf(
     370                                                    __(
     371                                                        'Create your <strong>Free</strong> <a %1$s href="%2$s">quantcast.com account</a>.',
     372                                                        'qc-choice'
     373                                                    ),
     374                                                    'target="_blank"',
     375                                                    esc_url('https://www.quantcast.com/signin/register?qcRefer=/protect/sites/newUser&utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=overview-create-account&utm_content=choice')
     376                                                );
     377                                                ?>
     378                                            </li>
     379                                            <li>
     380                                                <?php printf(
     381                                                    __(
     382                                                        'Add your website url, under "<a %1$s href="%2$s">Privacy</a>" in your the quantcast.com account dashboard.".',
     383                                                        'qc-choice'
     384                                                    ),
     385                                                    'target="_blank"',
     386                                                    esc_url('https://www.quantcast.com/protect/sites?utm_source=wordrpess&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=add-site&utm_content=chocie')
     387                                                );
     388                                                ?>
     389                                            </li>
     390                                            <li>
     391                                                <?php _e('Configure your CMP settings (name, logo, consent settings).', 'qc-choice'); ?>
     392                                            </li>
     393                                            <li>
     394                                                <?php printf(
     395                                                    __(
     396                                                        'Add your <strong>Universal Tag ID (UTID)</strong> & <strong>Enable Choice TCF v2.0</strong> on the <a %1$s href="%2$s">TCF v2.0 Settings</a> tab.',
     397                                                        'qc-choice'
     398                                                    ),
     399                                                    'target="_self"',
     400                                                    esc_url('/wp-admin/admin.php?page=qc-choice-options&tab=tcfv2_screen')
     401                                                );
     402                                                ?>
     403                                            </li>
     404                                        </ol>
     405                                        <br>
     406                                        <div class="text-right pointer-headline show-lg"><?php _e( 'Choice TCF v2.0 setup demo video -->', 'qc-choice' ); ?></div>
     407
     408                                        <h4><?php _e( 'Advanced setup (optional)', 'qc-choice' ); ?></h4>
     409                                        <ol>
     410                                            <li><?php _e( 'Add <strong>Non-IAB vendors</strong>.', 'qc-choice' ); ?></li>
     411                                            <li><?php _e( 'Enable <strong>CCPA support</strong>.', 'qc-choice' ); ?></li>
     412                                            <li><?php _e( '<strong>Customise the CMP display</strong> with a theme.', 'qc-choice' ); ?></li>
     413                                            <li><?php _e( '<strong>Enable Data Layer consent data push</strong>, automatically passing consent signals to Google Tag Manager for consumption by customer triggers and trigger groups.', 'qc-choice' ); ?></li>
     414                                        </ol>
     415
     416                                        <br>
     417                                        <h4><?php _e( 'Additional Setup & Configuration Help', 'qc-choice' ); ?></h4>
     418                                        <div>
     419
     420                                            <p>
     421                                                <?php printf(
     422                                                    __(
     423                                                        'Check out the <a %1$s href="%2$s">help center guides</a> for the list of configuration options and setup guides for Quantcast Choice TCF v2.0.',
     424                                                        'qc-choice'
     425                                                    ),
     426                                                    'target="_blank"',
     427                                                    esc_url('https://help.quantcast.com/hc/en-us/sections/360008320914-Configuration-Options-for-TCF-v2?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=cmp-configuration-help&utm_content=choice')
     428                                                );
     429                                                ?>
     430                                            </p>
     431                                        </div>
     432                                    </div>
     433                                </div>
     434                                <div class="instructions-box instructions-box-right">
     435                                    <div class="instructions-box-inside">
     436                                        <h4><?php _e( 'Choice TCF v2.0 setup demo video', 'qc-choice' ); ?></h4>
     437                                        <div class='embed-container'><iframe src='https://player.vimeo.com/video/445983282' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></div>
     438                                    </div>
     439                                </div>
     440                            </div>
     441
     442                            <br>
     443                            <hr>
     444                            <br><br>
     445                            <h3><?php _e('Additional Information'); ?></h3>
     446                            <div class="instructions-wrapper">
     447                                <div class="instructions-box instructions-box-left">
     448                                    <div class="instructions-box-inside">
     449                                        <div class="more-info-box">
     450                                            <div>
     451                                                <ul>
     452                                                    <li>
     453                                                        <strong>Purpose Notification</strong>
     454                                                        <p>Provides notices of the purpose and vendors for processing personal data.</p>
     455                                                    </li>
     456
     457                                                    <li>
     458                                                        <strong>Privacy Preferences</strong>
     459                                                        <p>Provides users options to allow or disallows processing on a granular basis under both the consent and legitimate interest legal basis.</p>
     460                                                    </li>
     461
     462                                                    <li>
     463                                                        <strong>Signal Storing & Sharing</strong>
     464                                                        <p>Signals vendor and purpose permissions for processing personal data.</p>
     465                                                    </li>
     466
     467                                                    <li>
     468                                                        <strong>Audit Log</strong>
     469                                                        <p>Site owners can access the audit log and use it to prove that consent was given.</p>
     470                                                    </li>
     471                                                </ul>
     472                                            </div>
     473                                            <div class="text-center">
     474                                                <a target="_blank" class="button" href="https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=learn-more&utm_content=choice">Learn more</a>
     475                                            </div>
     476                                        </div>
     477                                    </div>
     478                                </div>
     479                                <div class="instructions-box instructions-box-right">
     480                                    <div class="instructions-box-inside">
     481                                        <h4>More Resources</h4>
     482                                        <nav>
     483                                            <ul>
     484                                                <li>
     485                                                    <a target="_blank" href="<?php _e( esc_url('https://help.quantcast.com/hc/en-us/categories/360002940873-Quantcast-Choice?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=help&utm_content=choice'), 'qc-choice' ); ?>" target="_blank"><?php _e( 'Quantcast Choice Help Guides', 'qc-choice' ); ?></a>
     486                                                </li>
     487                                                <li>
     488                                                    <a target="_blank" href="<?php _e( esc_url('https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=learn-more&utm_content=choice'), 'qc-choice' ); ?>" target="_blank"><?php _e( 'More about Quantcast Choice', 'qc-choice' ); ?></a>
     489                                                </li>
     490                                                <li>
     491                                                    <a target="_blank" href="<?php _e( esc_url('https://www.quantcast.com/terms/quantcast-choice-terms-of-service/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=terms&utm_content=choice'), 'qc-choice' ); ?>" target="_blank"><?php _e( 'Quantcast Choice Terms of Service', 'qc-choice' ); ?></a>
     492                                                </li>
     493                                            </ul>
     494                                        </nav>
     495                                    </div>
     496                                </div>
     497                            </div>
     498                        </div>
     499                    </div>
     500
     501                <?php } elseif( $active_tab === 'tcfv2_screen' ) { ?>
     502
     503                    <?php settings_fields( 'choice-cmp-config' ); ?>
     504                    <?php do_settings_sections( 'choice-cmp-config' ); ?>
     505
     506                    <!-- Start - UI Configuration Section -->
     507                    <div class="tab-content">
     508                        <div class="tab-content-inside">
     509                            <table class="form-table" role="presentation">
     510                                <tbody>
     511                                    <tr valign="top">
     512                                        <th scope="row">
     513                                            <?php _e( 'Universal Tag ID (UTID)', 'qc-choice' ); ?>
     514                                        </th>
     515                                        <td>
     516                                            <?php if( empty($this->qc_choice_cmp_utid ) ) { ?>
     517                                                <div class="desc"><em style="color:red">A UTID value must be set in order to enable Choice TCF v2.0 for website visitors.</em></div>
     518                                            <?php } ?>
     519                                            <input name="qc_choice_cmp_utid" type="text" value="<?php echo $this->qc_choice_cmp_utid; ?>">
     520                                            <div class="desc">
     521                                                <div>
     522                                                    <?php printf(
     523                                                        __(
     524                                                            'If you already have a quantcast.com account you can find your UTID by following <a %1$s href="%2$s">this help center guide</a>.',
     525                                                            'qc-choice'
     526                                                        ),
     527                                                        'target="_blank"',
     528                                                        esc_url('https://help.quantcast.com/hc/en-us/articles/360051794614-Quantcast-Choice-TCFv2-GTM-Implementation-Guide-Finding-your-UTID?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=cmp-config-utid&utm_content=choice')
     529                                                    );
     530                                                    ?>
     531                                                </div>
     532                                                <div>
     533                                                    <?php printf(
     534                                                        __(
     535                                                            'If you do <strong>NOT</strong> have a quantcast.com account you can create one for <strong>FREE</strong> at quantcast.com. <a %1$s href="%2$s">Create quantcast.com account</a>. Detailed instructions and a video can be found on the <a %3$s href="%4$s">overview tab</a>.',
     536                                                            'qc-choice'
     537                                                        ),
     538                                                        'target="_blank"',
     539                                                        esc_url('https://www.quantcast.com/signin/register?qcRefer=/protect/sites/newUser&utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=settings-create-account&utm_content=choice'),
     540                                                        'target="_self"',
     541                                                        esc_url('/wp-admin/admin.php?page=qc-choice-options&tab=overview_screen')
     542                                                    );
     543                                                    ?>
     544                                                </div>
     545                                            </div>
     546
     547                                        </td>
     548                                    </tr>
     549
     550                                    <tr valign="top">
     551                                        <th scope="row">
     552                                            <?php _e( 'Enable Choice TCF v2.0', 'qc-choice' ); ?>
     553                                        </th>
     554                                        <td>
     555                                            <select name="qc_choice_cmp_enable">
     556                                                <option value="" <?php selected( $this->qc_choice_cmp_enable, '' ); ?>><?php _e( 'No', 'qc-choice' ); ?></option>
     557                                                <option value="all" <?php selected( $this->qc_choice_cmp_enable, 'all' ); ?>><?php _e( 'Yes', 'qc-choice' ); ?></option>
     558                                            </select>
     559                                            <?php if( empty($this->qc_choice_cmp_enable ) ) { ?>
     560                                                <div class="desc"><em style="color:red">Choice TCF v2.0 is current <strong>NOT</strong> enabled for website visitors.</em></div>
     561                                            <?php } ?>
     562                                        </td>
     563                                    </tr>
     564
     565                                    <tr valign="top">
     566                                        <th scope="row">
     567                                            <?php _e( 'Push IAB & Non-IAB consent data to the Data Layer', 'qc-choice' ); ?>
     568                                        </th>
     569                                        <td>
     570                                            <select name="qc_choice_cmp_datalayer_push">
     571                                                <option value="" <?php selected( $this->qc_choice_cmp_datalayer_push, '' ); ?>><?php _e( 'No', 'qc-choice' ); ?></option>
     572                                                <option value="true" <?php selected( $this->qc_choice_cmp_datalayer_push, 'true' ); ?>><?php _e( 'Yes', 'qc-choice' ); ?></option>
     573                                            </select>
     574                                            <div class="desc">
     575                                                <?php printf(
     576                                                    __(
     577                                                        'Learn more about using consent data passed to Google Tag Manager using Trigger events and Trigger groups to allow/block Non-IAB vendors. <a %1$s href="%2$s">View the guide</a>',
     578                                                        'qc-choice'
     579                                                    ),
     580                                                    'target="_blank"',
     581                                                    esc_url('https://help.quantcast.com/hc/en-us/articles/360051794134-Quantcast-Choice-TCFv2-Google-Tag-Manager-GTM-Implementation-Guide#h_01EEVBK4AENH0F5YPKHXH70PXX?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=datalayer-triggers&utm_content=choice')
     582                                                );
     583                                                ?>
     584                                            </div>
     585                                        </td>
     586                                    </tr>
     587
     588                                    <tr valign="top">
     589                                        <th scope="row">
     590                                            <?php _e( 'Automatically add footer CCPA message', 'qc-choice' ); ?>
     591                                            <div class="desc"><?php _e('You must also enable CCPA via the quantcast.com dashboard where you can also configure the popup style, text and links.', 'qc-choice'); ?></div>
     592                                        </th>
     593                                        <td>
     594                                            <select name="qc_choice_cmp_ccpa_wp_footer">
     595                                                <option value="" <?php selected( $this->qc_choice_cmp_ccpa_wp_footer, '' ); ?>><?php _e( 'Disable', 'qc-choice' ); ?></option>
     596                                                <option value="auto" <?php selected( $this->qc_choice_cmp_ccpa_wp_footer, 'auto' ); ?>><?php _e( 'Automatically add CCPA to footer', 'qc-choice' ); ?></option>
     597                                                <option value="manual" <?php selected( $this->qc_choice_cmp_ccpa_wp_footer, 'manual' ); ?>><?php _e( 'Manually place footer div', 'qc-choice' ); ?></option>
     598                                            </select>
     599                                            <div>
     600                                                <p class="desc">
     601                                                    <?php _e("You can select 'Manually place footer div' and add '<strong>&#x3C;div id=&#x22;choice-footer-msg&#x22;&#x3E;&#x3C;/div&#x3E;</strong>' your website template footer for manual CCPA message placement (The CCPA message & Do Not Sell My Data button will be added to the empty div automatically once Choice loads).", 'qc-choice'); ?>
     602                                                </p>
     603                                            </div>
     604                                        </td>
     605                                    </tr>
     606
     607                                    <?php if( ! empty($this->qc_choice_cmp_utid ) ) { ?>
     608                                        <tr valign="top">
     609                                        <th scope="row">
     610                                            <?php _e( 'CMP Configuration & Settings', 'qc-choice' ); ?>
     611                                        </th>
     612                                        <td>
     613                                            <div>
     614                                                <h4>
     615                                                    <?php printf(
     616                                                        __(
     617                                                            'Configuration options avaliable at <a %1$s href="%2$s">quantcast.com/protect/sites</a>.',
     618                                                            'qc-choice'
     619                                                        ),
     620                                                        'target="_blank"',
     621                                                        esc_url('https://www.quantcast.com/protect/sites?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=cmp-configuration&utm_content=choice')
     622                                                    );
     623                                                    ?>
     624                                                </h4>
     625                                            </div>
     626                                            <ol>
     627                                                <li><?php _e('<strong>Geo location</strong> targeting.', 'qc-choice'); ?></li>
     628                                                <li><?php _e('Add <strong>Non-IAB vendors</strong>.', 'qc-choice'); ?></li>
     629                                                <li><?php _e('Enable <strong>CCPA support</strong>.', 'qc-choice'); ?></li>
     630                                                <li><?php _e('<strong>Customise the CMP display</strong> with a theme.', 'qc-choice'); ?></li>
     631                                                <li><?php _e('Customise the <strong>CMP display position</strong>, text, links & other content and more.', 'qc-choice'); ?></li>
     632                                                <li><?php _e('Customise <strong>consent scope</strong>.', 'qc-choice'); ?></li>
     633                                                <li><?php _e('Customise <strong>consent configuration</strong>.', 'qc-choice'); ?></li>
     634                                                <li><?php _e('<strong>And more....</strong>', 'qc-choice'); ?></li>
     635                                            </ol>
     636                                            <div>
     637                                                <p><?php _e('Log into your quantcast.com account to customise your CMP.', 'qc-choice'); ?></p><br>
     638                                                <a class="btn button" target="_blank" href="<?php echo esc_url('https://www.quantcast.com/protect/sites?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=cmp-configuration&utm_content=choice'); ?>">
     639                                                    <?php _e('Go to your quantcast.com CMP dashboard', 'qc-choice'); ?>
     640                                                </a>
     641                                            </div>
     642                                        </td>
     643                                    </tr>
     644                                <?php } ?>
     645
     646                                </tbody>
     647                            </table>
     648                        </div>
     649                    </div>
     650                    <!-- END - UI Configuration Section -->
     651
     652                <?php } elseif( $active_tab === 'general_configuration' ) { ?>
    302653
    303654                    <?php settings_fields( 'qc-choice-general-config' ); ?>
     
    305656
    306657                    <!-- Start - UI Configuration Section -->
    307                     <table class="form-table options-form-table">
    308 
    309                         <tr valign="top">
    310                             <th scope="row" colspan="2">
    311                                 <h2><?php _e( 'General Settings', 'qc-choice' ); ?></h2>
    312                                 <hr>
    313                             </th>
    314                         </tr>
    315 
    316                         <?php $qc_choice_language = $this->get_option_qc_choice( 'qc_choice_language', $this->qc_choice_language ); ?>
    317                         <tr class="table-top-row" valign="top">
    318                             <th scope="row">
    319                                 <?php _e( 'UI Default Language', 'qc-choice' ); ?>
    320                                 <div class="desc"><?php _e( 'Select your language for default localized values.', 'qc-choice' ); ?></div>
    321                             </th>
    322                             <td class="col-2">
    323                                 <select name="qc_choice_language">
    324                                     <option value="en" <?php selected( $qc_choice_language, 'en' ); ?>><?php _e( 'English', 'qc-choice' ); ?></option>
    325                                     <option value="fr" <?php selected( $qc_choice_language, 'fr' ); ?>><?php _e( 'French', 'qc-choice' ); ?></option>
    326                                     <option value="de" <?php selected( $qc_choice_language, 'de' ); ?>><?php _e( 'German', 'qc-choice' ); ?></option>
    327                                     <option value="it" <?php selected( $qc_choice_language, 'it' ); ?>><?php _e( 'Italian', 'qc-choice' ); ?></option>
    328                                     <option value="es" <?php selected( $qc_choice_language, 'es' ); ?>><?php _e( 'Spanish', 'qc-choice' ); ?></option>
    329                                 </select>
    330                             </td>
    331                         </tr>
    332 
    333                         <?php $qc_choice_auto_localize = $this->get_option_qc_choice( 'qc_choice_auto_localize', $this->qc_choice_language ); ?>
    334                         <tr class="table-top-row" valign="top">
    335                             <th scope="row">
    336                                 <?php _e( 'Auto UI Language Localization', 'qc-choice' ); ?>
    337                                 <div class="desc"><?php _e( 'Attempt to detect the users site/browser language and localize content for supported languages, with a fallback to the "UI Default Language".', 'qc-choice' ); ?></div>
    338                             </th>
    339                             <td class="col-2">
    340                                 <select name="qc_choice_auto_localize">
    341                                     <option value="auto-localize-language" <?php selected( $qc_choice_auto_localize, "auto-localize-language" ); ?>><?php _e( 'Auto-Localize Language', 'qc-choice' ); ?></option>
    342                                     <option value="always-use-default-language" <?php selected( $qc_choice_auto_localize, "always-use-default-language" ); ?>><?php _e( 'Always Use the Default Language', 'qc-choice' ); ?></option>
    343                                 </select>
    344                             </td>
    345                         </tr>
    346 
    347                         <?php $qc_choice_display_ui = $this->get_option_qc_choice( 'qc_choice_display_ui', $this->qc_choice_language ); ?>
    348                         <tr class="table-top-row" valign="top">
    349                             <th scope="row">
    350                                 <?php _e( 'Display UI', 'qc-choice' ); ?>
    351                                 <div class="desc"><?php _e( 'Determines when and to whom the ui will be displayed.', 'qc-choice' ); ?></div>
    352                             </th>
    353                             <td class="col-2">
    354                                 <select name="qc_choice_display_ui">
    355                                     <option value="never" <?php selected( $qc_choice_display_ui, 'never' ); ?>><?php _e( 'Never', 'qc-choice' ); ?></option>
    356                                     <option value="always" <?php selected( $qc_choice_display_ui, 'always' ); ?>><?php _e( 'Always', 'qc-choice' ); ?></option>
    357                                     <option value="inEU" <?php selected( $qc_choice_display_ui, 'inEU' ); ?>><?php _e( 'EU Only', 'qc-choice' ); ?></option>
    358                                 </select>
    359                                 <div class="desc">
    360                                     <ul>
    361                                         <li><?php _e( 'EU Only - UI will be displayed to users in the EU when consent is required.', 'qc-choice' ); ?></li>
    362                                         <li><?php _e( 'Always - UI will be displayed to everyone when consent is required.', 'qc-choice' ); ?></li>
    363                                         <li><?php _e( 'Never - UI will never be shown.', 'qc-choice' ); ?></li>
    364                                     </ul>
    365                                 </div>
    366                             </td>
    367                         </tr>
    368 
    369                         <?php $qc_choice_display_layout = $this->get_option_qc_choice( 'qc_choice_display_layout', $this->qc_choice_language ); ?>
    370                         <tr class="table-top-row" valign="top">
    371                             <th scope="row">
    372                                 <?php _e( 'Display Layout', 'qc-choice' ); ?>
    373                                 <div class="desc"><?php _e( 'Determines the QC Choice display layout.', 'qc-choice' ); ?></div>
    374                             </th>
    375                             <td class="col-2">
    376                                 <select name="qc_choice_display_layout">
    377                                     <option value="popup" <?php selected( $qc_choice_display_layout, 'popup' ); ?>><?php _e( 'Popup Modal', 'qc-choice' ); ?></option>
    378                                     <option value="banner" <?php selected( $qc_choice_display_layout, 'banner' ); ?>><?php _e( 'Bottom Banner', 'qc-choice' ); ?></option>
    379                                 </select>
    380                             </td>
    381                         </tr>
    382 
    383                         <tr valign="top">
    384                             <th scope="row">
    385                                 <?php _e( 'Minimum Days Between UI Displays', 'qc-choice' ); ?>
    386                                 <div class="desc">
    387                                     <?php _e( 'Determines how often the CMP will check for an updated vendor list and get updated consent using the ui if there is an updated list.', 'qc-choice' ); ?>
    388                                 </div>
    389                             </th>
    390                             <td class="col-2">
    391                                 <input name="qc_choice_min_days_between_ui_displays" type="number" min="1" max="365" value="<?php echo $this->get_option_qc_choice( 'qc_choice_min_days_between_ui_displays', $this->qc_choice_language ); ?>">
    392                             </td>
    393                         </tr>
    394 
    395                         <tr valign="top">
    396                             <th scope="row">
    397                                 <?php _e( 'Non-Consent Display Frequency', 'qc-choice' ); ?>
    398                                 <div class="desc">
    399                                     <?php _e( 'The re-prompt frequency, in days, for users who have not given any positive consents; i.e. users who rejected all purposes and vendors.', 'qc-choice' ); ?>
    400                                 </div>
    401                             </th>
    402                             <td class="col-2">
    403                                 <input name="qc_choice_non_consent_display_frequency" type="number" min="1" max="365" value="<?php echo $this->get_option_qc_choice( 'qc_choice_non_consent_display_frequency', $this->qc_choice_language ); ?>">
    404                             </td>
    405                         </tr>
    406 
    407                         <?php $qc_choice_google_personalisation = $this->get_option_qc_choice( 'qc_choice_google_personalisation', $this->qc_choice_language ); ?>
    408                         <tr class="table-top-row" valign="top">
    409                             <th scope="row">
    410                                 <?php _e( 'Google Personalisation', 'qc-choice' ); ?>
    411                                 <div class="desc"><?php _e( 'Allow Google and their technology partners to collect data and use cookies for ad personalisation and measurement.', 'qc-choice' ); ?></div>
    412                             </th>
    413                             <td class="col-2">
    414                                 <select name="qc_choice_google_personalisation">
    415                                     <option value="true" <?php selected( $qc_choice_google_personalisation, "true" ); ?>><?php _e( 'Enable Google Personalisation', 'qc-choice' ); ?></option>
    416                                     <option value="false" <?php selected( $qc_choice_google_personalisation, "false" ); ?>><?php _e( 'Disable Google Personalisation', 'qc-choice' ); ?></option>
    417                                 </select>
    418                             </td>
    419                         </tr>
    420 
    421                         <tr valign="top">
    422                             <th scope="row">
    423                                 <?php _e( 'Post Consent Page URL', 'qc-choice' ); ?>
    424                                 <div class="desc">
    425                                     <?php _e( 'Determines if the cmp will redirect a user to different page when consent is not given for ALL global vendors and purposes. If any yes consents are given, the cmp will not redirect the user to the specified url.', 'qc-choice' ); ?>
    426                                 </div>
    427                             </th>
    428                             <td class="col-2">
    429                                 <input name="qc_choice_post_consent_page" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_post_consent_page', $this->qc_choice_language ); ?>">
    430                                 <div class="desc">
    431                                     <strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <?php _e( 'https://www.example.com/no-consnet', 'qc-choice' ); ?>
    432                                 </div>
    433                             </td>
    434                         </tr>
    435 
    436                         <tr valign="top">
    437                             <th class="col-1" scope="row">
    438                                 <?php _e( 'Publisher Name', 'qc-choice' ); ?>
    439                                 <div class="desc"><?php _e( 'The name of the company using the CMP, to be displayed in the UI.', 'qc-choice' ); ?></div>
    440                             </th>
    441                             <td class="col-2">
    442                                 <input name="qc_choice_publisher_name" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_publisher_name', $this->qc_choice_language ); ?>">
    443                             </td>
    444                         </tr>
    445 
    446                         <tr valign="top">
    447                             <th scope="row">
    448                                 <?php _e( 'Publisher Logo', 'qc-choice' ); ?>
    449                                 <div class="desc"><?php _e( 'A link to the logo of the company using the CMP, to be displayed in the UI.', 'qc-choice' ); ?></div>
    450                             </th>
    451                             <td class="col-2">
    452                                 <input name="qc_choice_publisher_logo" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_publisher_logo', $this->qc_choice_language ); ?>">
    453                                 <div class="desc">
    454                                     <strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <?php _e( 'https://www.example.com/logo.png', 'qc-choice' ); ?>
    455                                 </div>
    456                             </td>
    457                         </tr>
    458 
    459                     </table>
     658                    <div class="tab-content">
     659                        <div class="tab-content-inside">
     660
     661                            <?php $this->qc_choice_deprecated_header(); ?>
     662
     663                            <!-- Start - UI Configuration Section -->
     664                            <table class="form-table options-form-table form-table-disabled">
     665
     666                                <tr valign="top">
     667                                    <th scope="row" colspan="2">
     668                                        <h2><?php _e( 'General Settings', 'qc-choice' ); ?></h2>
     669                                        <hr>
     670                                    </th>
     671                                </tr>
     672
     673                                <?php $qc_choice_language = $this->get_option_qc_choice( 'qc_choice_language', $this->qc_choice_language ); ?>
     674                                <tr class="table-top-row" valign="top">
     675                                    <th scope="row">
     676                                        <?php _e( 'UI Default Language', 'qc-choice' ); ?>
     677                                        <div class="desc"><?php _e( 'Select your language for default localized values.', 'qc-choice' ); ?></div>
     678                                    </th>
     679                                    <td class="col-2">
     680                                        <select disabled name="qc_choice_language">
     681                                            <option value="en" <?php selected( $qc_choice_language, 'en' ); ?>><?php _e( 'English', 'qc-choice' ); ?></option>
     682                                            <option value="fr" <?php selected( $qc_choice_language, 'fr' ); ?>><?php _e( 'French', 'qc-choice' ); ?></option>
     683                                            <option value="de" <?php selected( $qc_choice_language, 'de' ); ?>><?php _e( 'German', 'qc-choice' ); ?></option>
     684                                            <option value="it" <?php selected( $qc_choice_language, 'it' ); ?>><?php _e( 'Italian', 'qc-choice' ); ?></option>
     685                                            <option value="es" <?php selected( $qc_choice_language, 'es' ); ?>><?php _e( 'Spanish', 'qc-choice' ); ?></option>
     686                                        </select>
     687                                    </td>
     688                                </tr>
     689
     690                                <?php $qc_choice_auto_localize = $this->get_option_qc_choice( 'qc_choice_auto_localize', $this->qc_choice_language ); ?>
     691                                <tr class="table-top-row" valign="top">
     692                                    <th scope="row">
     693                                        <?php _e( 'Auto UI Language Localization', 'qc-choice' ); ?>
     694                                        <div class="desc"><?php _e( 'Attempt to detect the users site/browser language and localize content for supported languages, with a fallback to the "UI Default Language".', 'qc-choice' ); ?></div>
     695                                    </th>
     696                                    <td class="col-2">
     697                                        <select disabled name="qc_choice_auto_localize">
     698                                            <option value="auto-localize-language" <?php selected( $qc_choice_auto_localize, "auto-localize-language" ); ?>><?php _e( 'Auto-Localize Language', 'qc-choice' ); ?></option>
     699                                            <option value="always-use-default-language" <?php selected( $qc_choice_auto_localize, "always-use-default-language" ); ?>><?php _e( 'Always Use the Default Language', 'qc-choice' ); ?></option>
     700                                        </select>
     701                                    </td>
     702                                </tr>
     703
     704                                <?php $qc_choice_display_ui = $this->get_option_qc_choice( 'qc_choice_display_ui', $this->qc_choice_language ); ?>
     705                                <tr class="table-top-row" valign="top">
     706                                    <th scope="row">
     707                                        <?php _e( 'Display UI', 'qc-choice' ); ?>
     708                                        <div class="desc"><?php _e( 'Determines when and to whom the ui will be displayed.', 'qc-choice' ); ?></div>
     709                                    </th>
     710                                    <td class="col-2">
     711                                        <select disabled name="qc_choice_display_ui">
     712                                            <option value="never" <?php selected( $qc_choice_display_ui, 'never' ); ?>><?php _e( 'Never', 'qc-choice' ); ?></option>
     713                                            <option value="always" <?php selected( $qc_choice_display_ui, 'always' ); ?>><?php _e( 'Always', 'qc-choice' ); ?></option>
     714                                            <option value="inEU" <?php selected( $qc_choice_display_ui, 'inEU' ); ?>><?php _e( 'EU Only', 'qc-choice' ); ?></option>
     715                                        </select>
     716                                        <div class="desc">
     717                                            <ul>
     718                                                <li><?php _e( 'EU Only - UI will be displayed to users in the EU when consent is required.', 'qc-choice' ); ?></li>
     719                                                <li><?php _e( 'Always - UI will be displayed to everyone when consent is required.', 'qc-choice' ); ?></li>
     720                                                <li><?php _e( 'Never - UI will never be shown.', 'qc-choice' ); ?></li>
     721                                            </ul>
     722                                        </div>
     723                                    </td>
     724                                </tr>
     725
     726                                <?php $qc_choice_display_layout = $this->get_option_qc_choice( 'qc_choice_display_layout', $this->qc_choice_language ); ?>
     727                                <tr class="table-top-row" valign="top">
     728                                    <th scope="row">
     729                                        <?php _e( 'Display Layout', 'qc-choice' ); ?>
     730                                        <div class="desc"><?php _e( 'Determines the QC Choice display layout.', 'qc-choice' ); ?></div>
     731                                    </th>
     732                                    <td class="col-2">
     733                                        <select disabled name="qc_choice_display_layout">
     734                                            <option value="popup" <?php selected( $qc_choice_display_layout, 'popup' ); ?>><?php _e( 'Popup Modal', 'qc-choice' ); ?></option>
     735                                            <option value="banner" <?php selected( $qc_choice_display_layout, 'banner' ); ?>><?php _e( 'Bottom Banner', 'qc-choice' ); ?></option>
     736                                        </select>
     737                                    </td>
     738                                </tr>
     739
     740                                <tr valign="top">
     741                                    <th scope="row">
     742                                        <?php _e( 'Minimum Days Between UI Displays', 'qc-choice' ); ?>
     743                                        <div class="desc">
     744                                            <?php _e( 'Determines how often the CMP will check for an updated vendor list and get updated consent using the ui if there is an updated list.', 'qc-choice' ); ?>
     745                                        </div>
     746                                    </th>
     747                                    <td class="col-2">
     748                                        <input disabled name="qc_choice_min_days_between_ui_displays" type="number" min="1" max="365" value="<?php echo $this->get_option_qc_choice( 'qc_choice_min_days_between_ui_displays', $this->qc_choice_language ); ?>">
     749                                    </td>
     750                                </tr>
     751
     752                                <tr valign="top">
     753                                    <th scope="row">
     754                                        <?php _e( 'Non-Consent Display Frequency', 'qc-choice' ); ?>
     755                                        <div class="desc">
     756                                            <?php _e( 'The re-prompt frequency, in days, for users who have not given any positive consents; i.e. users who rejected all purposes and vendors.', 'qc-choice' ); ?>
     757                                        </div>
     758                                    </th>
     759                                    <td class="col-2">
     760                                        <input disabled name="qc_choice_non_consent_display_frequency" type="number" min="1" max="365" value="<?php echo $this->get_option_qc_choice( 'qc_choice_non_consent_display_frequency', $this->qc_choice_language ); ?>">
     761                                    </td>
     762                                </tr>
     763
     764                                <?php $qc_choice_google_personalisation = $this->get_option_qc_choice( 'qc_choice_google_personalisation', $this->qc_choice_language ); ?>
     765                                <tr class="table-top-row" valign="top">
     766                                    <th scope="row">
     767                                        <?php _e( 'Google Personalisation', 'qc-choice' ); ?>
     768                                        <div class="desc"><?php _e( 'Allow Google and their technology partners to collect data and use cookies for ad personalisation and measurement.', 'qc-choice' ); ?></div>
     769                                    </th>
     770                                    <td class="col-2">
     771                                        <select disabled name="qc_choice_google_personalisation">
     772                                            <option value="true" <?php selected( $qc_choice_google_personalisation, "true" ); ?>><?php _e( 'Enable Google Personalisation', 'qc-choice' ); ?></option>
     773                                            <option value="false" <?php selected( $qc_choice_google_personalisation, "false" ); ?>><?php _e( 'Disable Google Personalisation', 'qc-choice' ); ?></option>
     774                                        </select>
     775                                    </td>
     776                                </tr>
     777
     778                                <tr valign="top">
     779                                    <th scope="row">
     780                                        <?php _e( 'Post Consent Page URL', 'qc-choice' ); ?>
     781                                        <div class="desc">
     782                                            <?php _e( 'Determines if the cmp will redirect a user to different page when consent is not given for ALL global vendors and purposes. If any yes consents are given, the cmp will not redirect the user to the specified url.', 'qc-choice' ); ?>
     783                                        </div>
     784                                    </th>
     785                                    <td class="col-2">
     786                                        <input disabled name="qc_choice_post_consent_page" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_post_consent_page', $this->qc_choice_language ); ?>">
     787                                        <div class="desc">
     788                                            <strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <?php _e( 'https://www.example.com/no-consnet', 'qc-choice' ); ?>
     789                                        </div>
     790                                    </td>
     791                                </tr>
     792
     793                                <tr valign="top">
     794                                    <th class="col-1" scope="row">
     795                                        <?php _e( 'Publisher Name', 'qc-choice' ); ?>
     796                                        <div class="desc"><?php _e( 'The name of the company using the CMP, to be displayed in the UI.', 'qc-choice' ); ?></div>
     797                                    </th>
     798                                    <td class="col-2">
     799                                        <input disabled name="qc_choice_publisher_name" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_publisher_name', $this->qc_choice_language ); ?>">
     800                                    </td>
     801                                </tr>
     802
     803                                <tr valign="top">
     804                                    <th scope="row">
     805                                        <?php _e( 'Publisher Logo', 'qc-choice' ); ?>
     806                                        <div class="desc"><?php _e( 'A link to the logo of the company using the CMP, to be displayed in the UI.', 'qc-choice' ); ?></div>
     807                                    </th>
     808                                    <td class="col-2">
     809                                        <input disabled name="qc_choice_publisher_logo" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_publisher_logo', $this->qc_choice_language ); ?>">
     810                                        <div class="desc">
     811                                            <strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <?php _e( 'https://www.example.com/logo.png', 'qc-choice' ); ?>
     812                                        </div>
     813                                    </td>
     814                                </tr>
     815
     816                            </table>
     817                        </div>
     818                    </div>
    460819                    <!-- END - UI Configuration Section -->
    461820
     
    465824                    <?php do_settings_sections( 'qc-choice-initial-screen' ); ?>
    466825
    467                     <!-- START - Initial Screen Settings -->
    468                     <table class="form-table options-form-table">
    469 
    470                         <tr valign="top">
    471                             <th scope="row" colspan="2">
    472                                 <h2><?php _e( 'Initial Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
    473                                 <hr>
    474                             </th>
    475                         </tr>
    476 
    477                         <tr class="table-top-row" valign="top">
    478                             <th class="col-1" scope="row">
    479                                 <?php _e( 'Initial Screen Title Text', 'qc-choice' ); ?>
    480                                 <div class="desc">
    481                                     <?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    482                                 </div>
    483                             </th>
    484                             <td class="col-2">
    485                                 <input name="qc_choice_initial_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_title_text', $this->qc_choice_language ); ?>">
    486                             </td>
    487                         </tr>
    488 
    489                         <tr valign="top">
    490                             <th class="col-1" scope="row">
    491                                 <?php _e( 'Body Text', 'qc-choice' ); ?>
    492                                 <div class="desc">
    493                                     <?php _e( "The main body text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    494                                 </div>
    495                             </th>
    496                             <td class="col-2">
    497                                 <?php $qc_choice_initial_screen_body_text_choices = $this->qc_choice_values->get_default_array_values( 'qc_choice_initial_screen_body_text', $this->qc_choice_language ); ?>
    498                                 <?php
    499                                 $qc_choice_initial_screen_body_text = $this->get_option_qc_choice( 'qc_choice_initial_screen_body_text', $this->qc_choice_language );
    500                                 if( is_array( $qc_choice_initial_screen_body_text ) ) {
    501                                     $qc_choice_initial_screen_body_text = 1;
    502                                 }
    503                                 ?>
    504                                 <select class="select-lg" name="qc_choice_initial_screen_body_text[<?php echo $this->qc_choice_language; ?>]">
    505                                     <?php if( is_array( $qc_choice_initial_screen_body_text_choices ) ) {
    506                                         foreach ($qc_choice_initial_screen_body_text_choices as $key => $value) { ?>
    507                                             <option value="<?php echo $key; ?>" <?php selected( $key, $qc_choice_initial_screen_body_text ); ?>><?php echo $value; ?></option>
    508                                         <?php }
    509                                     } ?>
    510                                 </select>
    511                             </td>
    512                         </tr>
    513 
    514                         <tr valign="top">
    515                             <th class="col-1" scope="row">
    516                                 <?php _e( 'Reject Button Text', 'qc-choice' ); ?>
    517                                 <div class="desc">
    518                                     <?php _e( "The reject consent button text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    519                                 </div>
    520                             </th>
    521                             <td class="col-2">
    522                                 <input name="qc_choice_initial_screen_reject_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_reject_button_text', $this->qc_choice_language ); ?>">
    523                             </td>
    524                         </tr>
    525 
    526                         <?php $qc_choice_initial_screen_no_option = $this->get_option_qc_choice( 'qc_choice_initial_screen_no_option', $this->qc_choice_language ); ?>
    527                         <tr valign="top">
    528                             <th class="col-1" scope="row">
    529                                 <?php _e( 'No Option', 'qc-choice' ); ?>
    530                                 <div class="desc">
    531                                     <?php _e( "Determines if the the reject consent button will be displayed on the initial global consent page.", 'qc-choice' ); ?>
    532                                 </div>
    533                             </th>
    534                             <td class="col-2">
    535                                 <select name="qc_choice_initial_screen_no_option">
    536                                     <option value="false" <?php selected( $qc_choice_initial_screen_no_option, 'false' ); ?>><?php _e( 'Do not display the Reject All Consent button on the initial screen.', 'qc-choice' ); ?></option>
    537                                     <option value="true" <?php selected( $qc_choice_initial_screen_no_option, 'true' ); ?>><?php _e( 'Display the Reject All Consent button on the initial screen.', 'qc-choice' ); ?></option>
    538                                 </select>
    539                             </td>
    540                         </tr>
    541 
    542                         <tr valign="top">
    543                             <th class="col-1" scope="row">
    544                                 <?php _e( 'Accept Button Text', 'qc-choice' ); ?>
    545                                 <div class="desc">
    546                                     <?php _e( "The accept consent button text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    547                                 </div>
    548                             </th>
    549                             <td class="col-2">
    550                                 <input name="qc_choice_initial_screen_accept_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_accept_button_text', $this->qc_choice_language ); ?>">
    551                             </td>
    552                         </tr>
    553 
    554                         <tr valign="top">
    555                             <th class="col-1" scope="row">
    556                                 <?php _e( 'Purpose Link Text', 'qc-choice' ); ?>
    557                                 <div class="desc">
    558                                     <?php _e( "The purpose link text on the initial global consent screen to be displayed in the ui. When clicked, the ui updates to display the purpose consent screen.", 'qc-choice' ); ?>
    559                                 </div>
    560                             </th>
    561                             <td class="col-2">
    562                                 <input name="qc_choice_initial_screen_purpose_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_purpose_link_text', $this->qc_choice_language ); ?>">
    563                             </td>
    564                         </tr>
    565 
    566                         <tr valign="top">
    567                             <th class="col-1" scope="row">
    568                                 <?php _e( 'Custom Link 1 Text', 'qc-choice' ); ?>
    569                                 <div class="desc">
    570                                     <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
    571                                 </div>
    572                             </th>
    573                             <td class="col-2">
    574                                 <input name="qc_choice_initial_screen_custom_link_1_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_1_text', $this->qc_choice_language ); ?>">
    575                             </td>
    576                         </tr>
    577 
    578                         <tr valign="top">
    579                             <th class="col-1" scope="row">
    580                                 <?php _e( 'Custom Link 1 URL ', 'qc-choice' ); ?>
    581                                 <div class="desc">
    582                                     <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
    583                                 </div>
    584                             </th>
    585                             <td class="col-2">
    586                                 <input name="qc_choice_initial_screen_custom_link_1_url[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_1_url', $this->qc_choice_language ); ?>">
    587                             </td>
    588                         </tr>
    589 
    590                         <tr valign="top">
    591                             <th class="col-1" scope="row">
    592                                 <?php _e( 'Custom Link 2 Text', 'qc-choice' ); ?>
    593                                 <div class="desc">
    594                                     <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
    595                                 </div>
    596                             </th>
    597                             <td class="col-2">
    598                                 <input name="qc_choice_initial_screen_custom_link_2_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_2_text', $this->qc_choice_language ); ?>">
    599                             </td>
    600                         </tr>
    601 
    602                         <tr valign="top">
    603                             <th class="col-1" scope="row">
    604                                 <?php _e( 'Custom Link 2 URL ', 'qc-choice' ); ?>
    605                                 <div class="desc">
    606                                     <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
    607                                 </div>
    608                             </th>
    609                             <td class="col-2">
    610                                 <input name="qc_choice_initial_screen_custom_link_2_url[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_2_url', $this->qc_choice_language ); ?>">
    611                             </td>
    612                         </tr>
    613 
    614                     </table>
    615                     <!-- END - Initial Screen Settings -->
     826                    <!-- Start - UI Configuration Section -->
     827                    <div class="tab-content">
     828                        <div class="tab-content-inside">
     829
     830                            <?php $this->qc_choice_deprecated_header(); ?>
     831
     832                            <!-- START - Initial Screen Settings -->
     833                            <table class="form-table options-form-table form-table-disabled">
     834
     835                                <tr valign="top">
     836                                    <th scope="row" colspan="2">
     837                                        <h2><?php _e( 'Initial Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
     838                                        <hr>
     839                                    </th>
     840                                </tr>
     841
     842                                <tr class="table-top-row" valign="top">
     843                                    <th class="col-1" scope="row">
     844                                        <?php _e( 'Initial Screen Title Text', 'qc-choice' ); ?>
     845                                        <div class="desc">
     846                                            <?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     847                                        </div>
     848                                    </th>
     849                                    <td class="col-2">
     850                                        <input disabled name="qc_choice_initial_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_title_text', $this->qc_choice_language ); ?>">
     851                                    </td>
     852                                </tr>
     853
     854                                <tr valign="top">
     855                                    <th class="col-1" scope="row">
     856                                        <?php _e( 'Body Text', 'qc-choice' ); ?>
     857                                        <div class="desc">
     858                                            <?php _e( "The main body text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     859                                        </div>
     860                                    </th>
     861                                    <td class="col-2">
     862                                        <?php $qc_choice_initial_screen_body_text_choices = $this->qc_choice_values->get_default_array_values( 'qc_choice_initial_screen_body_text', $this->qc_choice_language ); ?>
     863                                        <?php
     864                                        $qc_choice_initial_screen_body_text = $this->get_option_qc_choice( 'qc_choice_initial_screen_body_text', $this->qc_choice_language );
     865                                        if( is_array( $qc_choice_initial_screen_body_text ) ) {
     866                                            $qc_choice_initial_screen_body_text = 1;
     867                                        }
     868                                        ?>
     869                                        <select disabled class="select-lg" name="qc_choice_initial_screen_body_text[<?php echo $this->qc_choice_language; ?>]">
     870                                            <?php if( is_array( $qc_choice_initial_screen_body_text_choices ) ) {
     871                                                foreach ($qc_choice_initial_screen_body_text_choices as $key => $value) { ?>
     872                                                    <option value="<?php echo $key; ?>" <?php selected( $key, $qc_choice_initial_screen_body_text ); ?>><?php echo $value; ?></option>
     873                                                <?php }
     874                                            } ?>
     875                                        </select>
     876                                    </td>
     877                                </tr>
     878
     879                                <tr valign="top">
     880                                    <th class="col-1" scope="row">
     881                                        <?php _e( 'Reject Button Text', 'qc-choice' ); ?>
     882                                        <div class="desc">
     883                                            <?php _e( "The reject consent button text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     884                                        </div>
     885                                    </th>
     886                                    <td class="col-2">
     887                                        <input disabled name="qc_choice_initial_screen_reject_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_reject_button_text', $this->qc_choice_language ); ?>">
     888                                    </td>
     889                                </tr>
     890
     891                                <?php $qc_choice_initial_screen_no_option = $this->get_option_qc_choice( 'qc_choice_initial_screen_no_option', $this->qc_choice_language ); ?>
     892                                <tr valign="top">
     893                                    <th class="col-1" scope="row">
     894                                        <?php _e( 'No Option', 'qc-choice' ); ?>
     895                                        <div class="desc">
     896                                            <?php _e( "Determines if the the reject consent button will be displayed on the initial global consent page.", 'qc-choice' ); ?>
     897                                        </div>
     898                                    </th>
     899                                    <td class="col-2">
     900                                        <select disabled name="qc_choice_initial_screen_no_option">
     901                                            <option value="false" <?php selected( $qc_choice_initial_screen_no_option, 'false' ); ?>><?php _e( 'Do not display the Reject All Consent button on the initial screen.', 'qc-choice' ); ?></option>
     902                                            <option value="true" <?php selected( $qc_choice_initial_screen_no_option, 'true' ); ?>><?php _e( 'Display the Reject All Consent button on the initial screen.', 'qc-choice' ); ?></option>
     903                                        </select>
     904                                    </td>
     905                                </tr>
     906
     907                                <tr valign="top">
     908                                    <th class="col-1" scope="row">
     909                                        <?php _e( 'Accept Button Text', 'qc-choice' ); ?>
     910                                        <div class="desc">
     911                                            <?php _e( "The accept consent button text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     912                                        </div>
     913                                    </th>
     914                                    <td class="col-2">
     915                                        <input disabled name="qc_choice_initial_screen_accept_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_accept_button_text', $this->qc_choice_language ); ?>">
     916                                    </td>
     917                                </tr>
     918
     919                                <tr valign="top">
     920                                    <th class="col-1" scope="row">
     921                                        <?php _e( 'Purpose Link Text', 'qc-choice' ); ?>
     922                                        <div class="desc">
     923                                            <?php _e( "The purpose link text on the initial global consent screen to be displayed in the ui. When clicked, the ui updates to display the purpose consent screen.", 'qc-choice' ); ?>
     924                                        </div>
     925                                    </th>
     926                                    <td class="col-2">
     927                                        <input disabled name="qc_choice_initial_screen_purpose_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_purpose_link_text', $this->qc_choice_language ); ?>">
     928                                    </td>
     929                                </tr>
     930
     931                                <tr valign="top">
     932                                    <th class="col-1" scope="row">
     933                                        <?php _e( 'Custom Link 1 Text', 'qc-choice' ); ?>
     934                                        <div class="desc">
     935                                            <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
     936                                        </div>
     937                                    </th>
     938                                    <td class="col-2">
     939                                        <input disabled name="qc_choice_initial_screen_custom_link_1_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_1_text', $this->qc_choice_language ); ?>">
     940                                    </td>
     941                                </tr>
     942
     943                                <tr valign="top">
     944                                    <th class="col-1" scope="row">
     945                                        <?php _e( 'Custom Link 1 URL ', 'qc-choice' ); ?>
     946                                        <div class="desc">
     947                                            <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
     948                                        </div>
     949                                    </th>
     950                                    <td class="col-2">
     951                                        <input disabled name="qc_choice_initial_screen_custom_link_1_url[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_1_url', $this->qc_choice_language ); ?>">
     952                                    </td>
     953                                </tr>
     954
     955                                <tr valign="top">
     956                                    <th class="col-1" scope="row">
     957                                        <?php _e( 'Custom Link 2 Text', 'qc-choice' ); ?>
     958                                        <div class="desc">
     959                                            <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
     960                                        </div>
     961                                    </th>
     962                                    <td class="col-2">
     963                                        <input disabled name="qc_choice_initial_screen_custom_link_2_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_2_text', $this->qc_choice_language ); ?>">
     964                                    </td>
     965                                </tr>
     966
     967                                <tr valign="top">
     968                                    <th class="col-1" scope="row">
     969                                        <?php _e( 'Custom Link 2 URL ', 'qc-choice' ); ?>
     970                                        <div class="desc">
     971                                            <?php _e( "Add a custom link to the initial screen.", 'qc-choice' ); ?>
     972                                        </div>
     973                                    </th>
     974                                    <td class="col-2">
     975                                        <input disabled name="qc_choice_initial_screen_custom_link_2_url[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_initial_screen_custom_link_2_url', $this->qc_choice_language ); ?>">
     976                                    </td>
     977                                </tr>
     978
     979                            </table>
     980                            <!-- END - Initial Screen Settings -->
     981                        </div>
     982                    </div>
    616983
    617984                <?php } elseif ($active_tab === 'purpose_screen') { ?>
     
    620987                    <?php do_settings_sections( 'qc-choice-purpose-screen' ); ?>
    621988
    622                     <!-- START - Purpose Screen Settings -->
    623                     <table class="form-table options-form-table">
    624 
    625                         <tr valign="top">
    626                             <th scope="row" colspan="2">
    627                                 <h2><?php _e( 'Purpose Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
    628                                 <hr>
    629                             </th>
    630                         </tr>
    631 
    632                         <tr class="table-top-row" valign="top">
    633                             <th class="col-1" scope="row">
    634                                 <?php _e( 'Header Title Text', 'qc-choice' ); ?>
    635                                 <div class="desc">
    636                                     <?php _e( "The title text in the purposes header on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
    637                                 </div>
    638                             </th>
    639                             <td class="col-2">
    640                                 <input name="qc_choice_purpose_screen_header_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_header_title_text', $this->qc_choice_language ); ?>">
    641                             </td>
    642                         </tr>
    643 
    644                         <tr valign="top">
    645                             <th class="col-1" scope="row">
    646                                 <?php _e( 'Title Text', 'qc-choice' ); ?>
    647                                 <div class="desc">
    648                                     <?php _e( "The title text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
    649                                 </div>
    650                             </th>
    651                             <td class="col-2">
    652                                 <input name="qc_choice_purpose_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_title_text', $this->qc_choice_language ); ?>">
    653                             </td>
    654                         </tr>
    655 
    656                         <tr valign="top">
    657                             <th class="col-1" scope="row">
    658                                 <?php _e( 'Body Text', 'qc-choice' ); ?>
    659                                 <div class="desc">
    660                                     <?php _e( "The main body text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
    661                                 </div>
    662                             </th>
    663                             <td class="col-2">
    664                                  <textarea name="qc_choice_purpose_screen_body_text[<?php echo $this->qc_choice_language; ?>]"><?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_body_text', $this->qc_choice_language ); ?></textarea>
    665                             </td>
    666                         </tr>
    667 
    668                         <tr valign="top">
    669                             <th class="col-1" scope="row">
    670                                 <?php _e( 'Enable All Button Text', 'qc-choice' ); ?>
    671                                 <div class="desc">
    672                                     <?php _e( "The accept all purpose consents button text on the purposes consent page to be displayed in the ui. When clicked, all of the purpose consent toggles are set to on.", 'qc-choice' ); ?>
    673                                 </div>
    674                             </th>
    675                             <td class="col-2">
    676                                 <input name="qc_choice_purpose_screen_enable_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_enable_all_button_text', $this->qc_choice_language ); ?>">
    677                             </td>
    678                         </tr>
    679 
    680                         <tr valign="top">
    681                             <th class="col-1" scope="row">
    682                                 <?php _e( 'Vendor Link Text', 'qc-choice' ); ?>
    683                                 <div class="desc">
    684                                     <?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
    685                                 </div>
    686                             </th>
    687                             <td class="col-2">
    688                                 <input name="qc_choice_purpose_screen_vendor_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_vendor_link_text', $this->qc_choice_language ); ?>">
    689                             </td>
    690                         </tr>
    691 
    692                         <tr valign="top">
    693                             <th class="col-1" scope="row">
    694                                 <?php _e( 'Cancel Button Text', 'qc-choice' ); ?>
    695                                 <div class="desc"><?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?></div>
    696                             </th>
    697                             <td class="col-2">
    698                                 <input name="qc_choice_purpose_screen_cancel_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_cancel_button_text', $this->qc_choice_language ); ?>">
    699                             </td>
    700                         </tr>
    701 
    702                         <tr valign="top">
    703                             <th class="col-1" scope="row">
    704                                 <?php _e( 'Save and Exit Button Text', 'qc-choice' ); ?>
    705                                 <div class="desc"><?php _e( "The save consent and exit the ui button text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?></div>
    706                             </th>
    707                             <td class="col-2">
    708                                 <input name="qc_choice_purpose_screen_save_and_exit_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_save_and_exit_button_text', $this->qc_choice_language ); ?>">
    709                             </td>
    710                         </tr>
    711 
    712                         <?php $qc_choice_purpose = get_option( 'qc_choice_purpose' ); ?>
    713 
    714                         <?php
    715                         $accessing_a_device = isset( $qc_choice_purpose["accessing_a_device"] ) && ! empty( $qc_choice_purpose["accessing_a_device"] )
    716                             ? esc_attr( $qc_choice_purpose["accessing_a_device"] )
    717                             : $this->qc_choice_values->get_default_value('purpose_accessing_a_device');
    718                         ?>
    719                         <tr valign="top">
    720                             <th class="col-1" scope="row">
    721                                 <?php _e( 'Accessing a Device', 'qc-choice' ); ?>
    722                             </th>
    723                             <td class="col-2">
    724                                 <label>
    725                                     <input name="qc_choice_purpose[accessing_a_device]" type="checkbox" value="1" <?php checked( $accessing_a_device, '1' ); ?>>
    726                                     <?php _e( "Allow storing or accessing information on a user's device.", 'qc-choice' ); ?>
    727                                 </label>
    728                             </td>
    729                         </tr>
    730 
    731                         <?php
    732                         $advertising_personalisation = isset( $qc_choice_purpose["advertising_personalisation"] ) && ! empty( $qc_choice_purpose["advertising_personalisation"] )
    733                             ? esc_attr( $qc_choice_purpose["advertising_personalisation"] )
    734                             : $this->qc_choice_values->get_default_value('purpose_advertising_personalisation');
    735                         ?>
    736                         <tr valign="top">
    737                             <th class="col-1" scope="row">
    738                                 <?php _e( 'Advertising Personalisation', 'qc-choice' ); ?>
    739                             </th>
    740                             <td class="col-2">
    741                                 <label>
    742                                     <input name="qc_choice_purpose[advertising_personalisation]" type="checkbox" value="2" <?php checked( $advertising_personalisation, '2' ); ?>>
    743                                     <?php _e( "Allow processing of a user's data to provide and inform personalised advertising (including delivery, measurement, and reporting) based on a user's preferences or interests known or inferred from data collected across multiple sites, apps, or devices; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
    744                                 </label>
    745                             </td>
    746                         </tr>
    747 
    748                         <?php
    749                         $analytics = isset( $qc_choice_purpose["analytics"] ) && ! empty( $qc_choice_purpose["analytics"] )
    750                             ? esc_attr( $qc_choice_purpose["analytics"] )
    751                             : $this->qc_choice_values->get_default_value('purpose_analytics');
    752                         ?>
    753                         <tr valign="top">
    754                             <th class="col-1" scope="row">
    755                                 <?php _e( 'Analytics', 'qc-choice' ); ?>
    756                             </th>
    757                             <td class="col-2">
    758                                 <label>
    759                                     <input name="qc_choice_purpose[analytics]" type="checkbox" value="3" <?php checked( $analytics, '3' ); ?>>
    760                                     <?php _e( "Allow processing of a user's data to deliver content or advertisements and measure the delivery of such content or advertisements, extract insights and generate reports to understand service usage; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
    761                                 </label>
    762                             </td>
    763                         </tr>
    764 
    765                         <?php
    766                         $content_personalisation = isset( $qc_choice_purpose["content_personalisation"] ) && ! empty( $qc_choice_purpose["content_personalisation"] )
    767                             ? esc_attr( $qc_choice_purpose["content_personalisation"] )
    768                             : $this->qc_choice_values->get_default_value('purpose_content_personalisation');
    769                         ?>
    770                         <tr valign="top">
    771                             <th class="col-1" scope="row">
    772                                 <?php _e( 'Content Personalisation', 'qc-choice' ); ?>
    773                             </th>
    774                             <td class="col-2">
    775                                 <label>
    776                                     <input name="qc_choice_purpose[content_personalisation]" type="checkbox" value="4" <?php checked( $content_personalisation, '4' ); ?>>
    777                                     <?php _e( "Allow processing of a user's data to provide and inform personalised content (including delivery, measurement, and reporting) based on a user's preferences or interests known or inferred from data collected across multiple sites, apps, or devices; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
    778                                 </label>
    779                             </td>
    780                         </tr>
    781 
    782                         <?php
    783                         $measurement = isset( $qc_choice_purpose["measurement"] ) && ! empty( $qc_choice_purpose["measurement"] )
    784                             ? esc_attr( $qc_choice_purpose["measurement"] )
    785                             : $this->qc_choice_values->get_default_value('purpose_measurement');
    786                         ?>
    787                         <tr valign="top">
    788                             <th class="col-1" scope="row">
    789                                 <?php _e( 'Measurement', 'qc-choice' ); ?>
    790                             </th>
    791                             <td class="col-2">
    792                                 <label>
    793                                     <input name="qc_choice_purpose[measurement]" type="checkbox" value="5" <?php checked( $measurement, '5' ); ?>>
    794                                     <?php _e( "Allow processing of a user's data for measurement purposes.", 'qc-choice' ); ?>
    795                                 </label>
    796                             </td>
    797                         </tr>
    798 
    799                     </table>
    800                     <!-- END - Purpose Screen Settings -->
     989                    <!-- Start - UI Configuration Section -->
     990                    <div class="tab-content">
     991                        <div class="tab-content-inside">
     992
     993                            <?php $this->qc_choice_deprecated_header(); ?>
     994
     995                            <!-- START - Purpose Screen Settings -->
     996                            <table class="form-table options-form-table form-table-disabled">
     997
     998                                <tr valign="top">
     999                                    <th scope="row" colspan="2">
     1000                                        <h2><?php _e( 'Purpose Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
     1001                                        <hr>
     1002                                    </th>
     1003                                </tr>
     1004
     1005                                <tr class="table-top-row" valign="top">
     1006                                    <th class="col-1" scope="row">
     1007                                        <?php _e( 'Header Title Text', 'qc-choice' ); ?>
     1008                                        <div class="desc">
     1009                                            <?php _e( "The title text in the purposes header on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1010                                        </div>
     1011                                    </th>
     1012                                    <td class="col-2">
     1013                                        <input disabled name="qc_choice_purpose_screen_header_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_header_title_text', $this->qc_choice_language ); ?>">
     1014                                    </td>
     1015                                </tr>
     1016
     1017                                <tr valign="top">
     1018                                    <th class="col-1" scope="row">
     1019                                        <?php _e( 'Title Text', 'qc-choice' ); ?>
     1020                                        <div class="desc">
     1021                                            <?php _e( "The title text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1022                                        </div>
     1023                                    </th>
     1024                                    <td class="col-2">
     1025                                        <input disabled name="qc_choice_purpose_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_title_text', $this->qc_choice_language ); ?>">
     1026                                    </td>
     1027                                </tr>
     1028
     1029                                <tr valign="top">
     1030                                    <th class="col-1" scope="row">
     1031                                        <?php _e( 'Body Text', 'qc-choice' ); ?>
     1032                                        <div class="desc">
     1033                                            <?php _e( "The main body text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1034                                        </div>
     1035                                    </th>
     1036                                    <td class="col-2">
     1037                                         <textarea disabled name="qc_choice_purpose_screen_body_text[<?php echo $this->qc_choice_language; ?>]"><?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_body_text', $this->qc_choice_language ); ?></textarea>
     1038                                    </td>
     1039                                </tr>
     1040
     1041                                <tr valign="top">
     1042                                    <th class="col-1" scope="row">
     1043                                        <?php _e( 'Enable All Button Text', 'qc-choice' ); ?>
     1044                                        <div class="desc">
     1045                                            <?php _e( "The accept all purpose consents button text on the purposes consent page to be displayed in the ui. When clicked, all of the purpose consent toggles are set to on.", 'qc-choice' ); ?>
     1046                                        </div>
     1047                                    </th>
     1048                                    <td class="col-2">
     1049                                        <input disabled name="qc_choice_purpose_screen_enable_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_enable_all_button_text', $this->qc_choice_language ); ?>">
     1050                                    </td>
     1051                                </tr>
     1052
     1053                                <tr valign="top">
     1054                                    <th class="col-1" scope="row">
     1055                                        <?php _e( 'Vendor Link Text', 'qc-choice' ); ?>
     1056                                        <div class="desc">
     1057                                            <?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?>
     1058                                        </div>
     1059                                    </th>
     1060                                    <td class="col-2">
     1061                                        <input disabled name="qc_choice_purpose_screen_vendor_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_vendor_link_text', $this->qc_choice_language ); ?>">
     1062                                    </td>
     1063                                </tr>
     1064
     1065                                <tr valign="top">
     1066                                    <th class="col-1" scope="row">
     1067                                        <?php _e( 'Cancel Button Text', 'qc-choice' ); ?>
     1068                                        <div class="desc"><?php _e( "The title text on the initial global consent screen to be displayed in the ui.", 'qc-choice' ); ?></div>
     1069                                    </th>
     1070                                    <td class="col-2">
     1071                                        <input disabled name="qc_choice_purpose_screen_cancel_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_cancel_button_text', $this->qc_choice_language ); ?>">
     1072                                    </td>
     1073                                </tr>
     1074
     1075                                <tr valign="top">
     1076                                    <th class="col-1" scope="row">
     1077                                        <?php _e( 'Save and Exit Button Text', 'qc-choice' ); ?>
     1078                                        <div class="desc"><?php _e( "The save consent and exit the ui button text on the purposes consent page to be displayed in the ui.", 'qc-choice' ); ?></div>
     1079                                    </th>
     1080                                    <td class="col-2">
     1081                                        <input disabled name="qc_choice_purpose_screen_save_and_exit_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_purpose_screen_save_and_exit_button_text', $this->qc_choice_language ); ?>">
     1082                                    </td>
     1083                                </tr>
     1084
     1085                                <?php $qc_choice_purpose = get_option( 'qc_choice_purpose' ); ?>
     1086
     1087                                <?php
     1088                                $accessing_a_device = isset( $qc_choice_purpose["accessing_a_device"] ) && ! empty( $qc_choice_purpose["accessing_a_device"] )
     1089                                    ? esc_attr( $qc_choice_purpose["accessing_a_device"] )
     1090                                    : $this->qc_choice_values->get_default_value('purpose_accessing_a_device');
     1091                                ?>
     1092                                <tr valign="top">
     1093                                    <th class="col-1" scope="row">
     1094                                        <?php _e( 'Accessing a Device', 'qc-choice' ); ?>
     1095                                    </th>
     1096                                    <td class="col-2">
     1097                                        <label>
     1098                                            <input disabled name="qc_choice_purpose[accessing_a_device]" type="checkbox" value="1" <?php checked( $accessing_a_device, '1' ); ?>>
     1099                                            <?php _e( "Allow storing or accessing information on a user's device.", 'qc-choice' ); ?>
     1100                                        </label>
     1101                                    </td>
     1102                                </tr>
     1103
     1104                                <?php
     1105                                $advertising_personalisation = isset( $qc_choice_purpose["advertising_personalisation"] ) && ! empty( $qc_choice_purpose["advertising_personalisation"] )
     1106                                    ? esc_attr( $qc_choice_purpose["advertising_personalisation"] )
     1107                                    : $this->qc_choice_values->get_default_value('purpose_advertising_personalisation');
     1108                                ?>
     1109                                <tr valign="top">
     1110                                    <th class="col-1" scope="row">
     1111                                        <?php _e( 'Advertising Personalisation', 'qc-choice' ); ?>
     1112                                    </th>
     1113                                    <td class="col-2">
     1114                                        <label>
     1115                                            <input disabled name="qc_choice_purpose[advertising_personalisation]" type="checkbox" value="2" <?php checked( $advertising_personalisation, '2' ); ?>>
     1116                                            <?php _e( "Allow processing of a user's data to provide and inform personalised advertising (including delivery, measurement, and reporting) based on a user's preferences or interests known or inferred from data collected across multiple sites, apps, or devices; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
     1117                                        </label>
     1118                                    </td>
     1119                                </tr>
     1120
     1121                                <?php
     1122                                $analytics = isset( $qc_choice_purpose["analytics"] ) && ! empty( $qc_choice_purpose["analytics"] )
     1123                                    ? esc_attr( $qc_choice_purpose["analytics"] )
     1124                                    : $this->qc_choice_values->get_default_value('purpose_analytics');
     1125                                ?>
     1126                                <tr valign="top">
     1127                                    <th class="col-1" scope="row">
     1128                                        <?php _e( 'Analytics', 'qc-choice' ); ?>
     1129                                    </th>
     1130                                    <td class="col-2">
     1131                                        <label>
     1132                                            <input disabled name="qc_choice_purpose[analytics]" type="checkbox" value="3" <?php checked( $analytics, '3' ); ?>>
     1133                                            <?php _e( "Allow processing of a user's data to deliver content or advertisements and measure the delivery of such content or advertisements, extract insights and generate reports to understand service usage; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
     1134                                        </label>
     1135                                    </td>
     1136                                </tr>
     1137
     1138                                <?php
     1139                                $content_personalisation = isset( $qc_choice_purpose["content_personalisation"] ) && ! empty( $qc_choice_purpose["content_personalisation"] )
     1140                                    ? esc_attr( $qc_choice_purpose["content_personalisation"] )
     1141                                    : $this->qc_choice_values->get_default_value('purpose_content_personalisation');
     1142                                ?>
     1143                                <tr valign="top">
     1144                                    <th class="col-1" scope="row">
     1145                                        <?php _e( 'Content Personalisation', 'qc-choice' ); ?>
     1146                                    </th>
     1147                                    <td class="col-2">
     1148                                        <label>
     1149                                            <input disabled name="qc_choice_purpose[content_personalisation]" type="checkbox" value="4" <?php checked( $content_personalisation, '4' ); ?>>
     1150                                            <?php _e( "Allow processing of a user's data to provide and inform personalised content (including delivery, measurement, and reporting) based on a user's preferences or interests known or inferred from data collected across multiple sites, apps, or devices; and/or accessing or storing information on devices for that purpose.", 'qc-choice' ); ?>
     1151                                        </label>
     1152                                    </td>
     1153                                </tr>
     1154
     1155                                <?php
     1156                                $measurement = isset( $qc_choice_purpose["measurement"] ) && ! empty( $qc_choice_purpose["measurement"] )
     1157                                    ? esc_attr( $qc_choice_purpose["measurement"] )
     1158                                    : $this->qc_choice_values->get_default_value('purpose_measurement');
     1159                                ?>
     1160                                <tr valign="top">
     1161                                    <th class="col-1" scope="row">
     1162                                        <?php _e( 'Measurement', 'qc-choice' ); ?>
     1163                                    </th>
     1164                                    <td class="col-2">
     1165                                        <label>
     1166                                            <input disabled name="qc_choice_purpose[measurement]" type="checkbox" value="5" <?php checked( $measurement, '5' ); ?>>
     1167                                            <?php _e( "Allow processing of a user's data for measurement purposes.", 'qc-choice' ); ?>
     1168                                        </label>
     1169                                    </td>
     1170                                </tr>
     1171
     1172                            </table>
     1173                            <!-- END - Purpose Screen Settings -->
     1174                        </div>
     1175                    </div>
     1176
    8011177
    8021178                <?php } elseif ($active_tab === 'vendor_screen') { ?>
     
    8051181                    <?php do_settings_sections( 'qc-choice-vendor-screen' ); ?>
    8061182
    807                     <!-- START - Vendor Screen Settings -->
    808                     <table class="form-table options-form-table">
    809 
    810                         <tr valign="top">
    811                             <th scope="row" colspan="2">
    812                                 <h2><?php _e( 'Vendor Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
    813                                 <hr>
    814                             </th>
    815                         </tr>
    816 
    817                         <tr class="table-top-row" valign="top">
    818                             <th class="col-1" scope="row">
    819                                 <?php _e( 'Title Text', 'qc-choice' ); ?>
    820                                 <div class="desc">
    821                                     <?php _e( "The title text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
    822                                 </div>
    823                             </th>
    824                             <td class="col-2">
    825                                 <input name="qc_choice_vendor_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_title_text', $this->qc_choice_language ); ?>">
    826                             </td>
    827                         </tr>
    828 
    829                         <tr valign="top">
    830                             <th scope="row">
    831                                 <?php _e( 'Body Text', 'qc-choice' ); ?>
    832                                 <div class="desc">
    833                                     <?php _e( "The main body text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
    834                                 </div>
    835                             </th>
    836                             <td>
    837                                  <textarea name="qc_choice_vendor_screen_body_text[<?php echo $this->qc_choice_language; ?>]"><?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_body_text', $this->qc_choice_language ); ?></textarea>
    838                             </td>
    839                         </tr>
    840 
    841                         <tr valign="top">
    842                             <th scope="row">
    843                                 <?php _e( 'Accept All Button Text', 'qc-choice' ); ?>
    844                                 <div class="desc">
    845                                     <?php _e( "The accept all vendor consents button text on the vendors consent page to be displayed in the ui. When clicked, all of the vendors consent toggles are set to on.", 'qc-choice' ); ?>
    846                                 </div>
    847                             </th>
    848                             <td>
    849                                 <input name="qc_choice_vendor_screen_accept_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_accept_all_button_text', $this->qc_choice_language ); ?>">
    850                             </td>
    851                         </tr>
    852 
    853                         <tr valign="top">
    854                             <th scope="row">
    855                                 <?php _e( 'Reject All Button Text', 'qc-choice' ); ?>
    856                                 <div class="desc">
    857                                     <?php _e( "The reject all vendor consents button text on the vendors consent page to be displayed in the ui. When clicked, all of the vendors consent toggles are set to off.", 'qc-choice' ); ?>
    858                                 </div>
    859                             </th>
    860                             <td>
    861                                 <input name="qc_choice_vendor_screen_reject_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_reject_all_button_text', $this->qc_choice_language ); ?>">
    862                             </td>
    863                         </tr>
    864 
    865                         <tr valign="top">
    866                             <th scope="row">
    867                                 <?php _e( 'Purposes Link Text', 'qc-choice' ); ?>
    868                                 <div class="desc">
    869                                     <?php _e( "The purpose link text on the vendors consent page to be displayed in the ui. When clicked, the ui updates to display the purpose consent page.", 'qc-choice' ); ?>
    870                                 </div>
    871                             </th>
    872                             <td>
    873                                 <input name="qc_choice_vendor_screen_purposes_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_purposes_link_text', $this->qc_choice_language ); ?>">
    874                             </td>
    875                         </tr>
    876 
    877                         <tr valign="top">
    878                             <th scope="row">
    879                                 <?php _e( 'Cancel Button Text', 'qc-choice' ); ?>
    880                                 <div class="desc">
    881                                     <?php _e( "The cancel link text on the vendors consent page to be displayed in the ui. When clicked, the ui updates to display the initial global consent page.", 'qc-choice' ); ?>
    882                                 </div>
    883                             </th>
    884                             <td>
    885                                 <input name="qc_choice_vendor_screen_cancel_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_cancel_button_text', $this->qc_choice_language ); ?>">
    886                             </td>
    887                         </tr>
    888 
    889                         <tr valign="top">
    890                             <th scope="row">
    891                                 <?php _e( 'Save and Exit Button Text', 'qc-choice' ); ?>
    892                                 <div class="desc">
    893                                     <?php _e( "The save consent and exit the ui button text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
    894                                 </div>
    895                             </th>
    896                             <td>
    897                                 <input name="qc_choice_vendor_screen_save_and_exit_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_save_and_exit_button_text', $this->qc_choice_language ); ?>">
    898                             </td>
    899                         </tr>
    900 
    901                         <tr valign="top">
    902                             <th scope="row" colspan="2">
    903                                 <h3><?php _e( 'Vendors', 'qc-choice' ); ?></h3>
    904                             </th>
    905                         </tr>
    906 
    907                         <tr valign="top">
    908                             <th scope="row">
    909                                 <?php _e( 'Vendor List', 'qc-choice' ); ?>
    910                                 <div class="desc"><?php _e( 'Select the vendors to be included.', 'qc-choice' ); ?></div>
    911 
    912                                 <?php
    913                                 $qc_choice_vendors = get_option( 'qc_choice_vendors' );
    914                                 $qc_vendors = '';
    915 
    916                                 $cnt = 1;
    917                                 if( is_array( $qc_choice_vendors ) ) {
    918                                     $qc_vendors = "";
    919                                     $array_cnt = count($qc_choice_vendors);
    920 
    921                                     foreach ($qc_choice_vendors as $value) {
    922                                         $qc_vendors .= $value;
    923 
    924                                         if($array_cnt > $cnt ) {
    925                                             $qc_vendors .= ",";
     1183                    <!-- Start - UI Configuration Section -->
     1184                    <div class="tab-content">
     1185                        <div class="tab-content-inside">
     1186
     1187                            <?php $this->qc_choice_deprecated_header(); ?>
     1188
     1189                            <!-- START - Vendor Screen Settings -->
     1190                            <table class="form-table options-form-table form-table-disabled">
     1191
     1192                                <tr valign="top">
     1193                                    <th scope="row" colspan="2">
     1194                                        <h2><?php _e( 'Vendor Screen', 'qc-choice' ); ?> - (<?php echo $this->qc_choice_language; ?>)</h2>
     1195                                        <hr>
     1196                                    </th>
     1197                                </tr>
     1198
     1199                                <tr class="table-top-row" valign="top">
     1200                                    <th class="col-1" scope="row">
     1201                                        <?php _e( 'Title Text', 'qc-choice' ); ?>
     1202                                        <div class="desc">
     1203                                            <?php _e( "The title text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1204                                        </div>
     1205                                    </th>
     1206                                    <td class="col-2">
     1207                                        <input disabled name="qc_choice_vendor_screen_title_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_title_text', $this->qc_choice_language ); ?>">
     1208                                    </td>
     1209                                </tr>
     1210
     1211                                <tr valign="top">
     1212                                    <th scope="row">
     1213                                        <?php _e( 'Body Text', 'qc-choice' ); ?>
     1214                                        <div class="desc">
     1215                                            <?php _e( "The main body text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1216                                        </div>
     1217                                    </th>
     1218                                    <td>
     1219                                         <textarea disabled name="qc_choice_vendor_screen_body_text[<?php echo $this->qc_choice_language; ?>]"><?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_body_text', $this->qc_choice_language ); ?></textarea>
     1220                                    </td>
     1221                                </tr>
     1222
     1223                                <tr valign="top">
     1224                                    <th scope="row">
     1225                                        <?php _e( 'Accept All Button Text', 'qc-choice' ); ?>
     1226                                        <div class="desc">
     1227                                            <?php _e( "The accept all vendor consents button text on the vendors consent page to be displayed in the ui. When clicked, all of the vendors consent toggles are set to on.", 'qc-choice' ); ?>
     1228                                        </div>
     1229                                    </th>
     1230                                    <td>
     1231                                        <input disabled name="qc_choice_vendor_screen_accept_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_accept_all_button_text', $this->qc_choice_language ); ?>">
     1232                                    </td>
     1233                                </tr>
     1234
     1235                                <tr valign="top">
     1236                                    <th scope="row">
     1237                                        <?php _e( 'Reject All Button Text', 'qc-choice' ); ?>
     1238                                        <div class="desc">
     1239                                            <?php _e( "The reject all vendor consents button text on the vendors consent page to be displayed in the ui. When clicked, all of the vendors consent toggles are set to off.", 'qc-choice' ); ?>
     1240                                        </div>
     1241                                    </th>
     1242                                    <td>
     1243                                        <input disabled name="qc_choice_vendor_screen_reject_all_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_reject_all_button_text', $this->qc_choice_language ); ?>">
     1244                                    </td>
     1245                                </tr>
     1246
     1247                                <tr valign="top">
     1248                                    <th scope="row">
     1249                                        <?php _e( 'Purposes Link Text', 'qc-choice' ); ?>
     1250                                        <div class="desc">
     1251                                            <?php _e( "The purpose link text on the vendors consent page to be displayed in the ui. When clicked, the ui updates to display the purpose consent page.", 'qc-choice' ); ?>
     1252                                        </div>
     1253                                    </th>
     1254                                    <td>
     1255                                        <input disabled name="qc_choice_vendor_screen_purposes_link_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_purposes_link_text', $this->qc_choice_language ); ?>">
     1256                                    </td>
     1257                                </tr>
     1258
     1259                                <tr valign="top">
     1260                                    <th scope="row">
     1261                                        <?php _e( 'Cancel Button Text', 'qc-choice' ); ?>
     1262                                        <div class="desc">
     1263                                            <?php _e( "The cancel link text on the vendors consent page to be displayed in the ui. When clicked, the ui updates to display the initial global consent page.", 'qc-choice' ); ?>
     1264                                        </div>
     1265                                    </th>
     1266                                    <td>
     1267                                        <input disabled name="qc_choice_vendor_screen_cancel_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_cancel_button_text', $this->qc_choice_language ); ?>">
     1268                                    </td>
     1269                                </tr>
     1270
     1271                                <tr valign="top">
     1272                                    <th scope="row">
     1273                                        <?php _e( 'Save and Exit Button Text', 'qc-choice' ); ?>
     1274                                        <div class="desc">
     1275                                            <?php _e( "The save consent and exit the ui button text on the vendors consent page to be displayed in the ui.", 'qc-choice' ); ?>
     1276                                        </div>
     1277                                    </th>
     1278                                    <td>
     1279                                        <input disabled name="qc_choice_vendor_screen_save_and_exit_button_text[<?php echo $this->qc_choice_language; ?>]" type="text" value="<?php echo $this->get_option_qc_choice( 'qc_choice_vendor_screen_save_and_exit_button_text', $this->qc_choice_language ); ?>">
     1280                                    </td>
     1281                                </tr>
     1282
     1283                                <tr valign="top">
     1284                                    <th scope="row" colspan="2">
     1285                                        <h3><?php _e( 'Vendors', 'qc-choice' ); ?></h3>
     1286                                    </th>
     1287                                </tr>
     1288
     1289                                <tr valign="top">
     1290                                    <th scope="row">
     1291                                        <?php _e( 'Vendor List', 'qc-choice' ); ?>
     1292                                        <div class="desc"><?php _e( 'Select the vendors to be included.', 'qc-choice' ); ?></div>
     1293
     1294                                        <?php
     1295                                        $qc_choice_vendors = get_option( 'qc_choice_vendors' );
     1296                                        $qc_vendors = '';
     1297
     1298                                        $cnt = 1;
     1299                                        if( is_array( $qc_choice_vendors ) ) {
     1300                                            $qc_vendors = "";
     1301                                            $array_cnt = count($qc_choice_vendors);
     1302
     1303                                            foreach ($qc_choice_vendors as $value) {
     1304                                                $qc_vendors .= $value;
     1305
     1306                                                if($array_cnt > $cnt ) {
     1307                                                    $qc_vendors .= ",";
     1308                                                }
     1309
     1310                                                $cnt++;
     1311                                            }
    9261312                                        }
    927 
    928                                         $cnt++;
    929                                     }
    930                                 }
    931                                  ?>
    932                             </th>
    933                             <td>
    934                                 <div id="vendor_list" data-checked-vendors="<?php echo $qc_vendors; ?>">
    935                                     <div id="vendor_list_loader" class="qc-loader">
    936                                         <div class="double-bounce1"></div>
    937                                         <div class="double-bounce2"></div>
    938                                     </div>
    939                                 </div>
    940                             </td>
    941                         </tr>
    942 
    943                     </table>
    944                     <!-- END - Vendor Screen Settigns -->
     1313                                         ?>
     1314                                    </th>
     1315                                    <td>
     1316                                        <div id="vendor_list" data-checked-vendors="<?php echo $qc_vendors; ?>">
     1317                                            <div id="vendor_list_loader" class="qc-loader">
     1318                                                <div class="double-bounce1"></div>
     1319                                                <div class="double-bounce2"></div>
     1320                                            </div>
     1321                                        </div>
     1322                                    </td>
     1323                                </tr>
     1324
     1325                            </table>
     1326                            <!-- END - Vendor Screen Settigns -->
     1327                        </div>
     1328                    </div>
    9451329
    9461330                <?php } elseif ($active_tab === 'about_gdpr') { ?>
    9471331
    948                     <!-- START - About GDPR Tab -->
    949                     <table class="form-table options-form-table">
    950                         <tr>
    951                             <th><h3><?php _e( 'About GDPR', 'qc-choice' ); ?></h3></th>
    952                         </tr>
    953                     </table>
    954                     <!-- END - About GDPR Tab -->
     1332                    <!-- Start - UI Configuration Section -->
     1333                    <div class="tab-content">
     1334                        <div class="tab-content-inside">
     1335
     1336                            <?php $this->qc_choice_deprecated_header(); ?>
     1337
     1338                            <!-- START - About GDPR Tab -->
     1339                            <table class="form-table options-form-table form-table-disabled">
     1340                                <tr>
     1341                                    <th><h3><?php _e( 'About GDPR', 'qc-choice' ); ?></h3></th>
     1342                                </tr>
     1343                            </table>
     1344                            <!-- END - About GDPR Tab -->
     1345                        </div>
     1346                    </div>
    9551347
    9561348                <?php } elseif ($active_tab === 'buttons') { ?>
    9571349
    958                     <!-- START - About GDPR Tab -->
    959                     <table class="form-table options-form-table">
    960                         <tr>
    961                             <th><h3><?php _e( 'Displaying the UI', 'qc-choice' ); ?></h3></th>
    962                         </tr>
    963                         <tr>
    964                             <th><?php _e( 'Adding Change Consent to menu items.', 'qc-choice' ); ?></th>
    965                             <td><?php _e( 'Add a custom link to any', 'qc-choice') ?> <a target="_blank" href="./nav-menus.php"><?php _e( 'menu', 'qc-choice') ?></a> <?php _e( 'and set the url value to "#displayConsentUI" to open the UI when clicked', 'qc-choice') ?></td>
    966                         </tr>
    967                         <tr>
    968                             <th><?php _e( 'Adding Change Consnet to dom elements.', 'qc-choice' ); ?></th>
    969                             <td>
    970                                 <div><?php _e( 'Add "onclick="window.__cmp(\'displayConsentUi\');" to any dom element to open the UI when clicked.', 'qc-choice') ?></div>
    971                                 <div><strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <code> &lt;a onclick="window.__cmp('displayConsentUi');"&gt;<?php _e( 'Change Consent', 'qc-choice' ); ?>&lt;/a&gt;</code></div>
    972                             </td>
    973                         </tr>
    974                     </table>
    975                     <!-- END - About GDPR Tab -->
     1350                    <!-- Start - UI Configuration Section -->
     1351                    <div class="tab-content">
     1352                        <div class="tab-content-inside">
     1353
     1354                            <?php $this->qc_choice_deprecated_header(); ?>
     1355
     1356                            <!-- START - About GDPR Tab -->
     1357                            <table class="form-table options-form-table form-table-disabled">
     1358                                <tr>
     1359                                    <th><h3><?php _e( 'Displaying the UI', 'qc-choice' ); ?></h3></th>
     1360                                </tr>
     1361                                <tr>
     1362                                    <th><?php _e( 'Adding Change Consent to menu items.', 'qc-choice' ); ?></th>
     1363                                    <td><?php _e( 'Add a custom link to any', 'qc-choice') ?> <a target="_blank" href="./nav-menus.php"><?php _e( 'menu', 'qc-choice') ?></a> <?php _e( 'and set the url value to "#displayConsentUI" to open the UI when clicked', 'qc-choice') ?></td>
     1364                                </tr>
     1365                                <tr>
     1366                                    <th><?php _e( 'Adding Change Consnet to dom elements.', 'qc-choice' ); ?></th>
     1367                                    <td>
     1368                                        <div><?php _e( 'Add "onclick="window.__cmp(\'displayConsentUi\');" to any dom element to open the UI when clicked.', 'qc-choice') ?></div>
     1369                                        <div><strong><?php _e( 'Example:', 'qc-choice' ); ?></strong> <code> &lt;a onclick="window.__cmp('displayConsentUi');"&gt;<?php _e( 'Change Consent', 'qc-choice' ); ?>&lt;/a&gt;</code></div>
     1370                                    </td>
     1371                                </tr>
     1372                            </table>
     1373                            <!-- END - About GDPR Tab -->
     1374                        </div>
     1375                    </div>
    9761376
    9771377                <?php } ?>
    9781378
    979                 <?php if ( $active_tab !== 'about_gdpr' && $active_tab !== 'buttons' ) { ?>
     1379                <?php if ( $active_tab !== 'about_gdpr' && $active_tab !== 'buttons' && $active_tab !== 'overview_screen' && $active_tab !== 'general_configuration' && $active_tab !== 'initial_screen' && $active_tab !== 'purpose_screen' && $active_tab !== 'vendor_screen' ) { ?>
    9801380
    9811381                    <table class="form-table options-form-table">
     
    10121412
    10131413    /**
     1414     * QC Choice TCFv1 Deprecation Message
     1415     *
     1416     * @since    2.0.0
     1417     */
     1418    public function qc_choice_deprecated_header() {
     1419        if( empty( $this->qc_choice_cmp_utid ) ) {
     1420            echo '<div class="text-center">';
     1421                echo '<h1 class="update-headline">';
     1422                    _e( '**Important - TCF v1.0 is being deprecated August 15, 2020**', 'qc-choice' );
     1423                echo '</h1>';
     1424                echo '<div>';
     1425                    _e( 'Follow the instructions on the <a href="https://plugins.trac.wordpress.org/wp-admin/admin.php?page=qc-choice-options&tab=overview_screen">overview tab</a> to update to TCF v2.0' );
     1426                echo '</div>';
     1427            echo    '</div>';
     1428        }
     1429    }
     1430
     1431    /**
    10141432     * Register QC Choice admin option fields
    10151433     *
     
    10181436    public function qc_choice_options_page_init() {
    10191437
     1438        // TCF v2.0 settings
     1439        register_setting(
     1440            'choice-cmp-config', // Option group
     1441            'qc_choice_cmp_utid', // Option name
     1442            array(
     1443                'type' => 'string',
     1444                'sanitize_callback' => array( $this, 'sanitize_text' )
     1445            )
     1446        );
     1447        register_setting(
     1448            'choice-cmp-config', // Option group
     1449            'qc_choice_cmp_datalayer_push', // Option name
     1450            array(
     1451                'type' => 'string',
     1452                'sanitize_callback' => array( $this, 'sanitize_text' )
     1453            )
     1454        );
     1455        register_setting(
     1456            'choice-cmp-config', // Option group
     1457            'qc_choice_cmp_enable', // Option name
     1458            array(
     1459                'type' => 'string',
     1460                'sanitize_callback' => array( $this, 'sanitize_text' )
     1461            )
     1462        );
     1463        register_setting(
     1464            'choice-cmp-config', // Option group
     1465            'qc_choice_cmp_ccpa_wp_footer', // Option name
     1466            array(
     1467                'type' => 'string',
     1468                'sanitize_callback' => array( $this, 'sanitize_text' )
     1469            )
     1470        );
     1471
     1472        // TCF v1.0 settings
    10201473        // START - Register General Config Fields
    10211474        register_setting(
     
    10271480            )
    10281481        );
     1482
    10291483        register_setting(
    10301484            'qc-choice-general-config', // Option group
     
    13391793            )
    13401794        );
    1341        
     1795
    13421796        register_setting(
    13431797            'qc-choice-vendor-screen', // Option group
     
    14891943
    14901944    }
    1491    
     1945
    14921946    /**
    14931947     * Sanitize the sanitize_qc_choice_initial_screen_title_text text array.
     
    18042258        // Get the value from the option table.
    18052259        $val = get_option( $field_name );
    1806        
     2260
    18072261        // If the value is an array of values, assume language_code is the array.
    18082262        if( is_array( $val ) ) {
  • quantcast-choice/trunk/admin/class-qc-choice-admin.php

    r1881293 r2355432  
    4242
    4343    /**
     44     * A quantcast.com account Universal Tag ID (UTID/pCode).
     45     *
     46     * @since    2.0.0
     47     * @access   private
     48     * @var      string    $version    Quantcast UTID/pCode.
     49     */
     50    private $qc_choice_cmp_utid;
     51
     52    /**
     53     * Enable the Quantcast Chioce CMP
     54     *
     55     * @since    2.0.0
     56     * @access   private
     57     * @var      string    $version    Enable the Choice TCF v2.0 CMP.
     58     */
     59    private $qc_choice_cmp_enable;
     60
     61    /**
    4462     * Initialize the class and set its properties.
    4563     *
     
    5371        $this->version = $version;
    5472
     73        $this->qc_choice_cmp_utid = esc_attr( get_option( 'qc_choice_cmp_utid' ) );
     74        $this->qc_choice_cmp_enable = esc_attr( get_option( 'qc_choice_cmp_enable' ) );
     75
     76        add_action( 'admin_notices', array( $this, 'qc_choice_utid_missing_notice' ) );
     77
     78    }
     79
     80    /**
     81     * Display a notice in the admin section the the Choice Plugin does not have a UTID.
     82     *
     83     * @since    2.0.0
     84     */
     85    public function qc_choice_utid_missing_notice() {
     86        if( empty( $this->qc_choice_cmp_utid ) && empty( $this->qc_choice_cmp_enable ) ) {
     87            $class = 'notice notice-error';
     88            $message = __( 'The Quantcast Choice CMP is not setup is not complete.  You must <strong>enter your Universal Tag ID</strong> and <strong>enable the CMP</strong>.', 'qc-choice' );
     89            $link_text = __( 'View Choice CMP Settings', 'qc-choice' );
     90            printf( '<div class="%1$s"><p>%2$s <a href="%3$s">%4$s</a></p></div>', esc_attr( $class ),  $message, esc_url( '/wp-admin/admin.php?page=qc-choice-options&tab=tcfv2_screen' ), esc_html( $link_text ) );
     91        }
     92        elseif( ! empty( $this->qc_choice_cmp_utid ) && empty( $this->qc_choice_cmp_enable ) ) {
     93            $class = 'notice notice-warning';
     94            $message = __( 'The Quantcast Choice CMP must be <strong>enabled</strong> from the setting page before it is shown to site visitors.', 'qc-choice' );
     95            $link_text = __( 'View Choice CMP Settings', 'qc-choice' );
     96            printf( '<div class="%1$s"><p>%2$s <a href="%3$s">%4$s</a></p></div>', esc_attr( $class ), $message, esc_url( '/wp-admin/admin.php?page=qc-choice-options&tab=tcfv2_screen' ), esc_html( $link_text ) );
     97        }
     98        elseif( empty( $this->qc_choice_cmp_utid ) ) {
     99            $class = 'notice notice-error';
     100            $message = __( 'The Quantcast Choice CMP is not setup is not complete.  Please enter your Universal Tag ID.', 'qc-choice' );
     101            $link_text = __( 'View Choice CMP Settings', 'qc-choice' );
     102            printf( '<div class="%1$s"><p>%2$s <a href="%3$s">%4$s</a></p></div>', esc_attr( $class ), $message, esc_url( '/wp-admin/admin.php?page=qc-choice-options&tab=tcfv2_screen' ), esc_html( $link_text ) );
     103        }
     104        else {
     105            // TCF v2 Enabled
     106        }
    55107    }
    56108
     
    73125    public function enqueue_scripts() {
    74126
    75         wp_enqueue_script( 'qc-choice-ext', 'https://quantcast.mgr.consensu.org/cmp.js', array( ), $this->version, false );
    76         wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', array( 'jquery', 'qc-choice-ext' ), $this->version, true );
    77 
     127        if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) {
     128            // TCF v1 Enabled (Scheduled deprecation of TCFv1 on August 16, 2020 by the IAB).
     129            wp_enqueue_script( 'qc-choice-ext', 'https://quantcast.mgr.consensu.org/cmp.js', array( ), $this->version, false );
     130            wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', array( 'jquery', 'qc-choice-ext' ), $this->version, true );
     131        }
     132        else {
     133            // TCF v2 Enabled
     134        }
    78135    }
    79 
    80136}
  • quantcast-choice/trunk/admin/class-qc-choice-values.php

    r2053666 r2355432  
    11<?php
    22namespace QCChoice\Values;
     3
     4/**
     5 * ToDo: Remove this entire class and it's functionality.  All CMP configuration is handled
     6 *       in the quantcast.com user account dashboard, and imported with the js tag.
     7 */
    38
    49/**
     
    258263        );
    259264    }
    260  
     265
    261266    public function get_default_value( $field_name, $language_code = 'en' ) {
    262267
     
    283288        return $ret;
    284289    }
    285  
     290
    286291    public function get_default_array_values( $field_name, $language_code = 'en' ) {
    287292
  • quantcast-choice/trunk/admin/css/style.min.css

    r1879896 r2355432  
    1 #adminmenu>#toplevel_page_qc-choice-options .dashicons-before img{width:100%;height:auto;padding-top:0}#adminmenu>#toplevel_page_qc-choice-options.current .dashicons-before img{opacity:1}body .change-consent{box-shadow:none}.wrap-qc-choice-options .qc-loader{height:40px;margin:100px auto;position:relative;width:40px}.wrap-qc-choice-options .double-bounce1,.wrap-qc-choice-options .double-bounce2{background-color:#333;border-radius:50%;height:100%;left:0;opacity:.6;position:absolute;top:0;width:100%;animation:a 2s infinite ease-in-out}.wrap-qc-choice-options .double-bounce2{animation-delay:-1s}@keyframes a{0%,to{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.wrap-qc-choice-options .vendor-item{display:inline-block;float:left;margin-bottom:7px;width:100%}.wrap-qc-choice-options .vendor-item label{display:block;line-height:1.1;padding-left:1.5rem;position:relative}.wrap-qc-choice-options .vendor-item input{left:0;position:absolute;top:5px}.wrap-qc-choice-options .admin-header .left{width:100%}.wrap-qc-choice-options .admin-header .right{width:100%;padding-top:9px}.wrap-qc-choice-options .admin-header .clear{clear:both}.wrap-qc-choice-options .admin-header .logo img{max-width:125px;height:auto;width:100%}.wrap-qc-choice-options .nav-tab.active{background-color:#fff;color:#444}.wrap-qc-choice-options .form-table input[type=text],.wrap-qc-choice-options .form-table select,.wrap-qc-choice-options .form-table textarea{min-width:100%;max-width:500px}.wrap-qc-choice-options .form-table textarea{min-height:14rem}.wrap-qc-choice-options .form-table select.select-lg{white-space:pre-wrap;height:100px}.wrap-qc-choice-options .form-table td,.wrap-qc-choice-options .form-table th{margin-bottom:5px;padding:10px;vertical-align:top}.wrap-qc-choice-options .form-table th{vertical-align:top}.wrap-qc-choice-options .form-table .desc{font-size:12px;font-weight:300;margin-top:5px}.wrap-qc-choice-options .form-table .desc ul{list-style:disc;margin:.5rem 0 .5rem .5rem;padding-left:1rem}@media (min-width:783px){.wrap-qc-choice-options .admin-header .left{float:left;width:50%}.wrap-qc-choice-options .admin-header .right{float:right;width:50%;text-align:right}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:200px}.wrap-qc-choice-options .form-table.options-form-table .col-2{vertical-align:top}.wrap-qc-choice-options .form-table textarea{min-height:12rem}}@media (min-width:992px){.wrap-qc-choice-options .vendor-item{width:50%}.wrap-qc-choice-options .form-table.options-form-table{max-width:1200px}.wrap-qc-choice-options .form-table.options-form-table .col-1,.wrap-qc-choice-options .form-table.options-form-table .col-3{min-width:200px}.wrap-qc-choice-options .form-table.options-form-table .col-2{min-width:350px}.wrap-qc-choice-options .form-table textarea{min-height:10rem}}@media (min-width:1200px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:250px}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2{min-width:400px}.wrap-qc-choice-options .form-table textarea{min-height:10rem}}@media (min-width:1400px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:300px}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2{min-width:500px;max-width:100%;width:900px}.wrap-qc-choice-options .form-table textarea{min-height:8rem}}
     1#adminmenu>#toplevel_page_qc-choice-options .dashicons-before img{width:100%;height:auto;padding-top:0}#adminmenu>#toplevel_page_qc-choice-options.current .dashicons-before img{opacity:1}body .change-consent{box-shadow:none}.wrap-qc-choice-options .show-lg{display:none}.wrap-qc-choice-options .embed-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%;height:auto}.wrap-qc-choice-options .embed-container embed,.wrap-qc-choice-options .embed-container iframe,.wrap-qc-choice-options .embed-container object{position:absolute;top:0;left:0;width:100%;height:100%}.wrap-qc-choice-options .instructions-wrapper{display:flex;justify-content:center;flex-wrap:wrap}.wrap-qc-choice-options .instructions-wrapper .instructions-box{flex:0 1 98%;padding:1rem;background-color:#fff;display:flex;width:100%;margin:1rem 1%}.wrap-qc-choice-options .instructions-wrapper .instructions-box-inside{flex:1}@media (min-width:992px){.wrap-qc-choice-options .instructions-wrapper{justify-content:space-between;flex-wrap:nowrap}.wrap-qc-choice-options .instructions-wrapper .show-lg{display:block}.wrap-qc-choice-options .instructions-wrapper .instructions-box{flex:0 1 48%}}.wrap-qc-choice-options .tab-content{padding:2rem 1rem;clear:both}.wrap-qc-choice-options .tab-content::after{content:"";clear:both;display:table}.wrap-qc-choice-options .inline-list li{display:inline}.wrap-qc-choice-options .inline-flex-third{display:flex}.wrap-qc-choice-options .inline-flex-third li{flex:1 1 31%;padding-left:2%}.wrap-qc-choice-options .form-table-disabled{opacity:.6;position:relative;z-index:1}.wrap-qc-choice-options .form-table-disabled::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:10}.wrap-qc-choice-options .update-headline{color:red!important;font-size:24px!important}.wrap-qc-choice-options .pointer-headline{color:#000!important;font-size:20px!important;font-weight:600}.wrap-qc-choice-options .text-center{text-align:center}.wrap-qc-choice-options .text-right{text-align:right}.wrap-qc-choice-options .logo img{max-width:125px;height:auto;width:100%}.wrap-qc-choice-options .wordmark img{max-width:125px;height:auto;width:100%}.wrap-qc-choice-options .qc-loader{height:40px;margin:100px auto;position:relative;width:40px}.wrap-qc-choice-options .double-bounce1,.wrap-qc-choice-options .double-bounce2{background-color:#333;border-radius:50%;height:100%;left:0;opacity:.6;position:absolute;top:0;width:100%;-webkit-animation:sk-bounce 2s infinite ease-in-out;animation:sk-bounce 2s infinite ease-in-out}.wrap-qc-choice-options .double-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes sk-bounce{0%,100%{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes sk-bounce{0%,100%{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.wrap-qc-choice-options .vendor-item{display:inline-block;float:left;margin-bottom:7px;width:100%}.wrap-qc-choice-options .vendor-item label{display:block;line-height:1.1;padding-left:1.5rem;position:relative}.wrap-qc-choice-options .vendor-item input{left:0;position:absolute;top:5px}.wrap-qc-choice-options .nav-tab.active{background-color:#fff;color:#444}.wrap-qc-choice-options .form-table input[type=text],.wrap-qc-choice-options .form-table select,.wrap-qc-choice-options .form-table textarea{min-width:100%;max-width:500px}.wrap-qc-choice-options .form-table textarea{min-height:14rem}.wrap-qc-choice-options .form-table select.select-lg{white-space:pre-wrap;height:100px}.wrap-qc-choice-options .form-table td,.wrap-qc-choice-options .form-table th{margin-bottom:5px;padding:10px;vertical-align:top}.wrap-qc-choice-options .form-table th{vertical-align:top}.wrap-qc-choice-options .form-table .desc{font-size:12px;font-weight:300;margin-top:5px}.wrap-qc-choice-options .form-table .desc ul{list-style:disc;margin:.5rem 0 .5rem .5rem;padding-left:1rem}@media all and (min-width:783px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:200px}.wrap-qc-choice-options .form-table.options-form-table .col-2{vertical-align:top}.wrap-qc-choice-options .form-table textarea{min-height:12rem}}@media all and (min-width:992px){.wrap-qc-choice-options .vendor-item{width:50%}.wrap-qc-choice-options .form-table.options-form-table{max-width:1200px}.wrap-qc-choice-options .form-table.options-form-table .col-1,.wrap-qc-choice-options .form-table.options-form-table .col-3{min-width:200px}.wrap-qc-choice-options .form-table.options-form-table .col-2{min-width:350px}.wrap-qc-choice-options .form-table textarea{min-height:10rem}}@media all and (min-width:1200px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:250px}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2{min-width:400px}.wrap-qc-choice-options .form-table textarea{min-height:10rem}}@media all and (min-width:1400px){.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-1,.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-3{min-width:300px}.wrap-qc-choice-options .form-table.options-form-table .table-top-row .col-2{min-width:500px;max-width:100%;width:900px}.wrap-qc-choice-options .form-table textarea{min-height:8rem}}
     2/*# sourceMappingURL=style.min.css.map */
  • quantcast-choice/trunk/admin/js/script.min.js

    r1881293 r2355432  
    1 !function(e){"use strict";window.__cmp("init",{"Display UI":"never"});var m=document.getElementById("vendor_list");if(m){var u=document.getElementById("submit");u.setAttribute("disabled","disabled");var v=m.getAttribute("data-checked-vendors");v=v.split(","),window.__cmp("getVendorList","LATEST",function(e){var t=e.vendors;t.sort(function(e,t){var d=e.name.toUpperCase(),n=t.name.toUpperCase();return d<n?-1:n<d?1:0});for(var d=0;d<t.length;d++){var n=t[d].id,r=t[d].name,i=document.createElement("SPAN");i.setAttribute("class","vendor-item-label");var a=document.createTextNode(r);i.appendChild(a);var c=document.createElement("LABEL"),o=document.createElement("DIV");o.setAttribute("class","vendor-item");var s=document.createElement("INPUT");s.setAttribute("type","checkbox"),s.setAttribute("value",t[d].id),s.setAttribute("name","qc_choice_vendors["+n+"]"),-1<v.indexOf(n.toString())&&s.setAttribute("checked","checked"),c.appendChild(s),c.appendChild(i),o.appendChild(c),m.appendChild(o)}u.removeAttribute("disabled");var l=document.getElementById("vendor_list_loader");l&&l.remove()})}}(jQuery);
     1jQuery;
     2//# sourceMappingURL=script.min.js.map
  • quantcast-choice/trunk/composer.json

    r2053668 r2355432  
    11{
    22    "name": "quantcast/quantcast-choice",
    3     "version": "1.2.2",
    4     "description": "Quantcast Choice GDPR Consent",
     3    "version": "2.0.0",
     4    "description": "Quantcast Choice TCF v2.0 Consent Management Platform (CMP) for GDPR (including IAB & Non-IAB vendor suppport), CCPA & ePrivacy Directive.",
    55    "type": "wordpress-plugin",
    66    "authors": [
     
    88            "name": "Ryan Baron",
    99            "email": "rbaron@quantcast.com",
    10             "homepage": "https://www.quantcast.com"
     10            "homepage": "https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=info&utm_term=author-home&utm_content=choice"
    1111        }
    1212    ],
  • quantcast-choice/trunk/includes/class-qc-choice.php

    r2053666 r2355432  
    7171            $this->version = QC_CHOICE_VERSION;
    7272        } else {
    73             $this->version = '1.2.2';
     73            $this->version = '2.0.0';
    7474        }
    7575        $this->plugin_name = 'qc-choice';
     
    188188        $plugin_public = new QC_Choice_Public( $this->get_plugin_name(), $this->get_version() );
    189189
     190        $this->loader->add_filter( 'script_loader_tag', $plugin_public , 'add_async_attribute', 10, 2 );
     191
     192        $this->loader->add_action( 'wp_footer', $plugin_public, 'add_footer_message_container', 10, 0 );
     193
    190194        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
    191195        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
  • quantcast-choice/trunk/public/class-qc-choice-public.php

    r2053666 r2355432  
    11<?php
    22
    3 use QCChoice\Values\QC_Choice_Values;
     3use QCChoice\Values\QC_Choice_Values;  // This entire class and its functionality should be removed in the next TCF v2 update.
    44
    55/**
     
    5959     */
    6060    private $qc_choice_display_language;
    61    
     61
    6262    /**
    6363     * The avaliable languages.
     
    6868     */
    6969    private $qc_choice_avaliable_languages;
     70
     71    /**
     72     * Quantcast.com account Universal Tag ID.
     73     *
     74     * @since    2.0.0
     75     * @access   private
     76     * @var      array    $qc_choice_utid    A string value that should contain a valid quantcast.com utid.
     77     */
     78    private $qc_choice_cmp_utid;
     79
     80    /**
     81     * How to display the Chioce CCPA msg '', 'auto', 'manual'.
     82     *
     83     * @since    2.0.0
     84     * @access   private
     85     * @var      array    $qc_choice_cmp_ccpa_wp_footer    A string value to indicate the CCPA footer display style.
     86     */
     87    private $qc_choice_cmp_ccpa_wp_footer;
     88
     89    /**
     90     * Enable the CMP to be shown to users.
     91     *
     92     * @since    2.0.0
     93     * @access   private
     94     * @var      string    $qc_choice_cmp_enable    Enable Quantcast Choice TCF v2.
     95     */
     96    private $qc_choice_cmp_enable;
     97
     98    /**
     99     * Enable automatic Data Layer push.
     100     *
     101     * @since    2.0.0
     102     * @access   private
     103     * @var      string    $qc_choice_cmp_datalayer_push    Enable automatic push of consent signals to the data layer.
     104     */
     105    private $qc_choice_cmp_datalayer_push;
    70106
    71107    /**
     
    80116        $this->plugin_name = $plugin_name;
    81117        $this->version = $version;
    82         $this->qc_choice_values = new QC_Choice_Values();
    83 
    84         // Set the frontend display language.
    85         $this->set_display_language();
    86 
    87     }
     118
     119        $this->qc_choice_cmp_utid = esc_attr( get_option( 'qc_choice_cmp_utid' ) );
     120        $this->qc_choice_cmp_enable = esc_attr( get_option( 'qc_choice_cmp_enable' ) );
     121        $this->qc_choice_cmp_ccpa_wp_footer = esc_attr( get_option( 'qc_choice_cmp_ccpa_wp_footer' ) );
     122        $this->qc_choice_cmp_datalayer_push = esc_attr( get_option( 'qc_choice_cmp_datalayer_push' ) );
     123
     124        if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) {
     125            // TCF v1 Enabled (Scheduled deprecation of TCFv1 on August 16, 2020 by the IAB).
     126            $this->qc_choice_values = new QC_Choice_Values();
     127
     128            // Set the frontend display language.
     129            $this->set_display_language();
     130        }
     131        else {
     132            // TCF v2 Enabled
     133        }
     134
     135    }
     136
     137    /**
     138     * Register the stylesheets for the public-facing side of the site.
     139     *
     140     * @since    1.0.0
     141     */
     142    public function enqueue_styles() {
     143
     144        if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) {
     145            // TCF v1 Enabled (Scheduled deprecation of TCFv1 on August 16, 2020 by the IAB).
     146            wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/style.min.css', array(), $this->version, 'all' );
     147        }
     148        else {
     149            // TCF v2 enabled
     150            wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/style.min.css', array(), $this->version, 'all' );
     151        }
     152
     153    }
     154
     155    /**
     156     * Register the JavaScript for the public-facing side of the site.
     157     *
     158     * @since    1.0.0
     159     */
     160    public function enqueue_scripts() {
     161
     162        if( empty( $this->qc_choice_cmp_utid ) || empty( $this->qc_choice_cmp_enable ) ) {
     163
     164            // TCF v1 Enabled (Scheduled deprecation of TCFv1 on August 16, 2020 by the IAB).
     165            wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', array(), $this->version, false );
     166            wp_enqueue_script( 'qc-choice-init', plugin_dir_url( __FILE__ ) . 'js/script.async.min.js', array(), $this->version, false );
     167
     168            // localize the qc-choice-init script and pass in the qc_choice_init values
     169            $qc_choice_init = $this->get_cmp_init_values();
     170            wp_localize_script( 'qc-choice-init', 'qc_choice_init', $qc_choice_init );
     171
     172        }
     173        else {
     174
     175            // TCF v2 enabled
     176            wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', '', $this->version, false );
     177
     178            $choice_cmp_config = array(
     179                'utid' => $this->qc_choice_cmp_utid,
     180                'enabled' => $this->qc_choice_cmp_enable,
     181                'ccpa' => $this->qc_choice_cmp_ccpa_wp_footer,
     182                'datalayer' => $this->qc_choice_cmp_datalayer_push,
     183            );
     184
     185            wp_localize_script( $this->plugin_name, 'choice_cmp_config', $choice_cmp_config );
     186
     187        }
     188
     189    }
     190
     191    /**
     192     * Javascript async attribute filter.
     193     *
     194     * @since    1.0.0
     195     */
     196    public function add_async_attribute($tag, $handle) {
     197
     198        // Add scripts to the array to make the async
     199        $scripts_to_async = array(
     200            $this->plugin_name,
     201        );
     202
     203        foreach($scripts_to_async as $async_script) {
     204            if ($async_script === $handle) {
     205                return str_replace(' src', ' async="async" src', $tag);
     206            }
     207        }
     208
     209        return $tag;
     210    }
     211
     212
     213    /**
     214     * Add a container to the footer with the id 'choice-footer-msg' where choice
     215     *   automatically add the CCPA message.
     216     *
     217     * @since    2.0.0
     218     */
     219    public function add_footer_message_container() {
     220        // Only add the footer message container if the admin has enabled auto adding.
     221        if( 'auto' === $this->qc_choice_cmp_ccpa_wp_footer ) {
     222            echo '<div class="container container-choice-footer-msg"><div class="container-inside"><div id="choice-footer-msg" class="choice-footer-msg"></div></div></div>';
     223        }
     224    }
     225
    88226
    89227    /**
     
    100238
    101239    }
     240
     241
    102242    /**
    103243    * Set the language for frontend display.
     
    146286    }
    147287
    148     /**
    149      * Register the stylesheets for the public-facing side of the site.
    150      *
    151      * @since    1.0.0
    152      */
    153     public function enqueue_styles() {
    154 
    155         wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/style.min.css', array(), $this->version, 'all' );
    156 
    157     }
    158 
    159     /**
    160      * Register the JavaScript for the public-facing side of the site.
    161      *
    162      * @since    1.0.0
    163      */
    164     public function enqueue_scripts() {
    165 
    166         wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/script.min.js', array(), $this->version, true );
    167         wp_enqueue_script( 'qc-choice-init', plugin_dir_url( __FILE__ ) . 'js/script.async.min.js', array(), $this->version, true );
    168 
    169         // localize the qc-choice-init script and pass in the qc_choice_init values
    170         $qc_choice_init = $this->get_cmp_init_values();
    171         wp_localize_script( 'qc-choice-init', 'qc_choice_init', $qc_choice_init );
    172 
    173     }
    174288
    175289    /**
  • quantcast-choice/trunk/public/css/style.min.css

    r1893098 r2355432  
    1 .page-content{-ms-flex-flow:row nowrap;flex-flow:row nowrap;min-height:calc(60vh - 120px);min-width:0;padding:25px 0;position:relative;width:100%}.centered-content,.page-content{display:-ms-flexbox;display:flex;margin:0 auto}.centered-content{-ms-flex-flow:column;flex-flow:column;-ms-flex-line-pack:center;align-content:center;max-width:800px;min-width:276px;width:80vw}.content-title{font-size:24px;font-weight:700;width:100%}.consent-header{color:#000;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.change-consent{color:#6844cd;cursor:pointer;font-size:16px;font-weight:100;line-height:27px;text-decoration:underline;transition:all .2s ease-in-out}.change-consent:before{content:"\f013";display:inline-block;font-family:Font Awesome\ 5 Free;font-style:normal;font-variant:normal;font-weight:900;margin-right:10px;text-rendering:auto;-webkit-font-smoothing:antialiased}.change-consent:hover{opacity:.6}.consent-lists{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.consent-list-container{-ms-flex:1 1 40%;flex:1 1 40%;margin:0 25px}.consent-list{border-collapse:collapse;font-family:neuzeit-grotesk,Arial,Verdana,sans-serif;text-align:left;width:100%;margin-bottom:25px}.consent-list-title{font-size:14px;letter-spacing:2px;margin:0;text-transform:uppercase}.consent-row{height:45px;background-color:#fafafa;border:1px solid #e8e9ea}.no-consent{opacity:.5}.no-consent:before{content:"\f057";display:inline-block;font-family:Font Awesome\ 5 Free;font-style:normal;font-variant:normal;font-weight:900;margin-right:15px;text-rendering:auto;-webkit-font-smoothing:antialiased}.has-consent{color:#00b47d}.has-consent:before{content:"\f058";display:inline-block;font-family:Font Awesome\ 5 Free;font-style:normal;font-variant:normal;font-weight:900;margin-right:15px;text-rendering:auto;-webkit-font-smoothing:antialiased}.learn-more{width:100%}.content-subtitle{font-size:18px;font-weight:700}.consent-list-container .consent-cell,.qc-cmp-ui-container .qc-cmp-company-cell,.qc-cmp-ui-container .qc-cmp-enabled-cell,.qc-cmp-ui-container .qc-cmp-table-header,.qc-cmp-ui-container .qc-cmp-table-row,.qc-cmp-ui-container .qc-cmp-vendor-column-header{padding:0 15px}.qc-cmp-ui-container .qc-cmp-title{padding:0}.qc-cmp-ui-container .qc-cmp-table{margin:0}.qc-cmp-ui-container .qc-cmp-toggle{background-color:#a6a9ae;border:1px solid #a6a9ae;border-radius:27px;cursor:pointer;display:block;height:23px;margin:0 0 0 auto;position:relative;width:44px}.qc-cmp-ui-container .qc-cmp-toggle.qc-cmp-toggle-on{background-color:#368bd6;border-color:#368bd6}.qc-cmp-ui-container .qc-cmp-toggle.qc-cmp-toggle-on .qc-cmp-toggle-switch{right:0}.qc-cmp-ui-container .qc-cmp-toggle-switch{position:absolute;display:inline-block;top:0;right:21px;width:23px;height:23px;background-color:#fff;border-radius:50%;transition:all .1s ease-in-out 0ms}.qc-cmp-ui-container .qc-cmp-vendor-info-content{padding:0 15px 15px;font-size:12px;line-height:16px}.qc-cmp-ui-container .qc-cmp-vendor-row{border-bottom:none}.qc-cmp-ui-container .qc-cmp-purpose-toggle-cell{text-align:right;padding-right:15px}.qc-cmp-toggle{box-sizing:content-box}
     1.container-choice-footer-msg{text-align:center}.container-choice-footer-msg .container-inside .ccpa-msg-added{padding:2rem}.page-content{display:flex;flex-flow:row nowrap;margin:0 auto;min-height:calc(60vh - 120px);min-width:0;padding:25px 0;position:relative;width:100%}.centered-content{display:flex;flex-flow:column;align-content:center;margin:0 auto;max-width:800px;min-width:276px;width:80vw}.content-title{font-size:24px;font-weight:700;width:100%}.consent-header{color:#000;display:flex;justify-content:space-between}.change-consent{color:#6844cd;cursor:pointer;font-size:16px;font-weight:100;line-height:27px;text-decoration:underline;transition:all .2s ease-in-out}.change-consent::before{content:"\f013";display:inline-block;font-family:"Font Awesome 5 Free";font-style:normal;font-variant:normal;font-weight:900;margin-right:10px;text-rendering:auto;-webkit-font-smoothing:antialiased}.change-consent:hover{opacity:.6}.consent-lists{display:flex;flex-wrap:wrap}.consent-list-container{flex:1 1 40%;margin:0 25px}.consent-list{border-collapse:collapse;font-family:neuzeit-grotesk,Arial,Verdana,sans-serif;text-align:left;width:100%;margin-bottom:25px}.consent-list-title{font-size:14px;letter-spacing:2px;margin:0;text-transform:uppercase}.consent-row{height:45px;background-color:#fafafa;border:1px solid #e8e9ea}.no-consent{opacity:.5}.no-consent::before{content:"\f057";display:inline-block;font-family:"Font Awesome 5 Free";font-style:normal;font-variant:normal;font-weight:900;margin-right:15px;text-rendering:auto;-webkit-font-smoothing:antialiased}.has-consent{color:#00b47d}.has-consent::before{content:"\f058";display:inline-block;font-family:"Font Awesome 5 Free";font-style:normal;font-variant:normal;font-weight:900;margin-right:15px;text-rendering:auto;-webkit-font-smoothing:antialiased}.learn-more{width:100%}.content-subtitle{font-size:18px;font-weight:700}.consent-list-container .consent-cell{padding:0 15px}.qc-cmp-ui-container .qc-cmp-company-cell,.qc-cmp-ui-container .qc-cmp-enabled-cell,.qc-cmp-ui-container .qc-cmp-table-header,.qc-cmp-ui-container .qc-cmp-table-row,.qc-cmp-ui-container .qc-cmp-vendor-column-header{padding:0 15px}.qc-cmp-ui-container .qc-cmp-title{padding:0}.qc-cmp-ui-container .qc-cmp-table{margin:0}.qc-cmp-ui-container .qc-cmp-toggle{background-color:#a6a9ae;border:1px solid #a6a9ae;border-radius:27px;cursor:pointer;display:block;height:23px;margin:0 0 0 auto;position:relative;width:44px}.qc-cmp-ui-container .qc-cmp-toggle.qc-cmp-toggle-on{background-color:#368bd6;border-color:#368bd6}.qc-cmp-ui-container .qc-cmp-toggle.qc-cmp-toggle-on .qc-cmp-toggle-switch{right:0}.qc-cmp-ui-container .qc-cmp-toggle-switch{position:absolute;display:inline-block;top:0;right:21px;width:23px;height:23px;background-color:#fff;border-radius:50%;transition:all .1s ease-in-out 0s}.qc-cmp-ui-container .qc-cmp-vendor-info-content{padding:0 15px 15px;font-size:12px;line-height:16px}.qc-cmp-ui-container .qc-cmp-vendor-row{border-bottom:none}.qc-cmp-ui-container .qc-cmp-purpose-toggle-cell{text-align:right;padding-right:15px}.qc-cmp-toggle{box-sizing:content-box}.qc-cmp-deprecation-messaging p{padding:1rem;margin:0}
     2/*# sourceMappingURL=style.min.css.map */
  • quantcast-choice/trunk/public/js/script.async.min.js

    r1881293 r2355432  
    1 (function($) {
    2     var elem = document.createElement('script');
    3     elem.src = 'https://quantcast.mgr.consensu.org/cmp.js';
    4     elem.async = true;
    5     elem.type = "text/javascript";
    6     var scpt = document.getElementsByTagName('script')[0];
    7     scpt.parentNode.insertBefore(elem, scpt);
     1var elem = document.createElement('script');
     2elem.src = 'https://quantcast.mgr.consensu.org/cmp.js';
     3elem.async = true;
     4elem.type = "text/javascript";
     5var scpt = document.getElementsByTagName('script')[0];
     6scpt.parentNode.insertBefore(elem, scpt);
    87
    9     (function() {
    10         var gdprAppliesGlobally = true;
    11         function addFrame() {
    12             if (!window.frames['__cmpLocator']) {
    13                 if (document.body) {
    14                     var body = document.body,
    15                             iframe = document.createElement('iframe');
    16                     iframe.style = 'display:none';
    17                     iframe.name = '__cmpLocator';
    18                     body.appendChild(iframe);
    19                 } else {
    20                     // In the case where this stub is located in the head,
    21                     // this allows us to inject the iframe more quickly than
    22                     // relying on DOMContentLoaded or other events.
    23                     setTimeout(addFrame, 5);
    24                 }
     8(function() {
     9    var gdprAppliesGlobally = true;
     10    function addFrame() {
     11        if (!window.frames['__cmpLocator']) {
     12            if (document.body) {
     13                var body = document.body,
     14                        iframe = document.createElement('iframe');
     15                iframe.style = 'display:none';
     16                iframe.name = '__cmpLocator';
     17                body.appendChild(iframe);
     18            } else {
     19                // In the case where this stub is located in the head,
     20                // this allows us to inject the iframe more quickly than
     21                // relying on DOMContentLoaded or other events.
     22                setTimeout(addFrame, 5);
    2523            }
    2624        }
     25    }
    2726
    28         addFrame();
     27    addFrame();
    2928
    30         function cmpMsgHandler(event) {
    31             var msgIsString = typeof event.data === "string";
    32             var json;
    33             if(msgIsString) {
    34                 json = event.data.indexOf("__cmpCall") != -1 ? JSON.parse(event.data) : {};
    35             } else {
    36                 json = event.data;
    37             }
    38 
    39             if (json.__cmpCall) {
    40                 var i = json.__cmpCall;
    41                 window.__cmp(i.command, i.parameter, function(retValue, success) {
    42                     var returnMsg = {"__cmpReturn": {
    43                     "returnValue": retValue,
    44                     "success": success,
    45                     "callId": i.callId
    46                     }};
    47                     event.source.postMessage(msgIsString ?
    48                     JSON.stringify(returnMsg) : returnMsg, '*');
    49                 });
    50             }
     29    function cmpMsgHandler(event) {
     30        var msgIsString = typeof event.data === "string";
     31        var json;
     32        if(msgIsString) {
     33            json = event.data.indexOf("__cmpCall") != -1 ? JSON.parse(event.data) : {};
     34        } else {
     35            json = event.data;
    5136        }
    5237
    53         window.__cmp = function (c) {
    54             var b = arguments;
    55             if (!b.length) {
    56                 return __cmp.a;
    57             }
    58             else if (b[0] === 'ping') {
    59                 b[2]({"gdprAppliesGlobally": gdprAppliesGlobally,
    60                     "cmpLoaded": false}, true);
    61             } else if (c == '__cmp')
    62                 return false;
    63             else {
    64                 if (typeof __cmp.a === 'undefined') {
    65                     __cmp.a = [];
    66             }
    67             __cmp.a.push([].slice.apply(b));
    68             }
     38        if (json.__cmpCall) {
     39            var i = json.__cmpCall;
     40            window.__cmp(i.command, i.parameter, function(retValue, success) {
     41                var returnMsg = {"__cmpReturn": {
     42                "returnValue": retValue,
     43                "success": success,
     44                "callId": i.callId
     45                }};
     46                event.source.postMessage(msgIsString ?
     47                JSON.stringify(returnMsg) : returnMsg, '*');
     48            });
    6949        }
    70         window.__cmp.gdprAppliesGlobally = gdprAppliesGlobally;
    71         window.__cmp.msgHandler = cmpMsgHandler;
     50    }
    7251
    73         if (window.addEventListener) {
    74             window.addEventListener('message', cmpMsgHandler, false);
     52    window.__cmp = function (c) {
     53        var b = arguments;
     54        if (!b.length) {
     55            return __cmp.a;
    7556        }
     57        else if (b[0] === 'ping') {
     58            b[2]({"gdprAppliesGlobally": gdprAppliesGlobally,
     59                "cmpLoaded": false}, true);
     60        } else if (c == '__cmp')
     61            return false;
    7662        else {
    77             window.attachEvent('onmessage', cmpMsgHandler);
     63            if (typeof __cmp.a === 'undefined') {
     64                __cmp.a = [];
    7865        }
     66        __cmp.a.push([].slice.apply(b));
     67        }
     68    }
     69    window.__cmp.gdprAppliesGlobally = gdprAppliesGlobally;
     70    window.__cmp.msgHandler = cmpMsgHandler;
    7971
    80     })();
     72    if (window.addEventListener) {
     73        window.addEventListener('message', cmpMsgHandler, false);
     74    }
     75    else {
     76        window.attachEvent('onmessage', cmpMsgHandler);
     77    }
    8178
    82     window.__cmp('init', JSON.parse( qc_choice_init ) );
     79})();
    8380
    84 })(jQuery);
     81window.__cmp('init', JSON.parse( qc_choice_init ) );
  • quantcast-choice/trunk/public/js/script.min.js

    r1881293 r2355432  
    1 !function(n){"use strict";if(n("body").on("click","a[href^='#']",function(e){"#displayConsentUI"===n(this).attr("href")&&(e.preventDefault(),window.__cmp("displayConsentUi"))}),n("#qc_choice_consent_display").length){var e=document.createElement("link");e.rel="stylesheet",e.href="https://use.fontawesome.com/releases/v5.0.1/css/all.css",document.head.appendChild(e);var s=function(o){var c=document.getElementById(o.tableId);c.innerHTML="",o.requestors.forEach(function(e,n){var t=document.createElement("td");t.className="consent-cell "+(o.consents[e.id]?"has-consent":"no-consent"),t.innerText=e.name||e.purpose;var s=document.createElement("tr");s.className="consent-row",s.appendChild(t),c.appendChild(s)})},t=function(){window.__cmp("setConsentUiCallback",function(){window.__cmp("getVendorList","LATEST",function(e){var n=e.vendors,t=e.purposes;n&&t&&(window.__cmp("getVendorConsents",null,function(e){s({requestors:n,consents:e.vendorConsents,tableId:"vendorList"}),s({requestors:t,consents:e.purposeConsents,tableId:"vendorPurposeList"})}),window.__cmp("getPublisherConsents",null,function(e){s({requestors:t,consents:e.standardPurposeConsents,tableId:"publisherPurposeList"})}))})})};t(),n("body").on("click","#qc_choice_consent_change",function(e){e.preventDefault(),t(),window.__cmp("displayConsentUi")})}}(jQuery);
     1!function(){var e,n,t,o,a,i,s;"undefined"!=typeof choice_cmp_config&&choice_cmp_config.utid&&choice_cmp_config.enabled&&(e=window.location.hostname,n=document.createElement("script"),t=document.getElementsByTagName("script")[0],o="https://quantcast.mgr.consensu.org".concat("/choice/",choice_cmp_config.utid,"/",e,"/choice.js"),a=0,n.async=!0,n.type="text/javascript",n.src=o,t.parentNode.insertBefore(n,t),function(){for(var e,a="__tcfapiLocator",o=[],i=window;i;){try{if(i.frames[a]){e=i;break}}catch(e){}if(i===window.top)break;i=i.parent}e||(!function e(){var n,t=i.document,o=!!i.frames[a];return o||(t.body?((n=t.createElement("iframe")).style.cssText="display:none",n.name=a,t.body.appendChild(n)):setTimeout(e,5)),!o}(),i.__tcfapi=function(){var e,n,t=arguments;if(!t.length)return o;"setGdprApplies"===t[0]?3<t.length&&2===t[2]&&"boolean"==typeof t[3]&&(e=t[3],"function"==typeof t[2]&&t[2]("set",!0)):"ping"===t[0]?(n={gdprApplies:e,cmpLoaded:!1,cmpStatus:"stub"},"function"==typeof t[2]&&t[2](n)):o.push(t)},i.addEventListener("message",function(o){var a="string"==typeof o.data,e={};try{e=a?JSON.parse(o.data):o.data}catch(e){}var i=e.__tcfapiCall;i&&window.__tcfapi(i.command,i.version,function(e,n){var t={__tcfapiReturn:{returnValue:e,success:n,callId:i.callId}};a&&(t=JSON.stringify(t)),o.source.postMessage(t,"*")},i.parameter)},!1))}(),i=function(){var e=arguments;typeof window.__uspapi!==i&&setTimeout(function(){void 0!==window.__uspapi&&window.__uspapi.apply(window.__uspapi,e)},500)},void 0===window.__uspapi&&(window.__uspapi=i,s=setInterval(function(){a++,window.__uspapi===i&&a<3?console.warn("USP is not accessible"):clearInterval(s)},6e3)))}(),function(){var e,n,t,o,a,i,s,c,r,p,d,u,f,l,_,h,w,m,g,y,v;function I(e){for(var n in b=",",e)e[n]&&(b+=n+",");return b}function L(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"__cmpLoaded",__cmpLoaded:!0,gdpr:e.gdprApplies})}function C(n){window.dataLayer=window.dataLayer||[],n.hasOwnProperty("publisher")&&(h=I(n.publisher.consents),w=I(n.publisher.legitimateInterests)),n.hasOwnProperty("purpose")&&(m=I(n.purpose.consents),g=I(n.purpose.legitimateInterests));var e=0,t=setInterval(function(){100===(e+=1)&&clearInterval(t),o&&p&&(clearInterval(t),n.gdprApplies?n.hasOwnProperty("vendor")&&Object.keys(n.vendor.consents).forEach(function(e){!n.vendor.consents[e]&&n.gdprApplies||(r[e]=s[e],c[e]=e)}):(r=s).forEach(function(e,n){c[n]=n}),i=r.filter(Boolean).join("|"),a=c.filter(Boolean).join(","),window.__tcfapi("getNonIABVendorConsents",2,function(n,e){e&&(n.gdprApplies&&n.hasOwnProperty("nonIabVendorConsents")&&null!==n.nonIabVendorConsents?Object.keys(n.nonIabVendorConsents).forEach(function(e){!n.nonIabVendorConsents[e]&&n.gdprApplies||(_[e]=f[e],l[e]=e)}):(_=f).forEach(function(e,n){l[n]=n}))}),u=_.filter(Boolean).join("|"),d=l.filter(Boolean).join(","),window.dataLayer.push({event:"__cmpConsents",__cmpConsents:{iabVendorConsentIds:a,iabVendorsWithConsent:i,nonIABVendorConsentIds:d,nonIABVendorsWithConsent:u,gdpr:n.gdprApplies,publisherConsents:h,publisherLegitimateInterests:w,purposeConsents:m,purposeLegitimateInterests:g}}))},100)}"undefined"!=typeof choice_cmp_config&&choice_cmp_config.utid&&choice_cmp_config.enabled&&(e=(new Date).getTime(),n=window.location.hostname,t="https://quantcast.mgr.consensu.org".concat("/choice/",choice_cmp_config.utid,"/",n,"/.well-known/noniab-vendorlist.json").concat("?timestamp=",e),s=[],c=[],r=[],f=[],l=[],_=[],choice_cmp_config.datalayer&&((v=new XMLHttpRequest).onreadystatechange=function(){var e;4!=this.readyState||200!=this.status||(e=JSON.parse(this.responseText)).hasOwnProperty("vendors")&&(o=e.vendors,Object.keys(o).forEach(function(e){s[o[e].id]=o[e].name}))},v.open("GET","https://test.quantcast.mgr.consensu.org/GVL-v2/vendor-list.json",!0),v.send(),(y=new XMLHttpRequest).onreadystatechange=function(){var e;4!=this.readyState||200!=this.status||(e=JSON.parse(this.responseText)).hasOwnProperty("nonIabVendorList")&&(p=e.nonIabVendorList,Object.keys(p).forEach(function(e){f[p[e].vendorId]=p[e].name}))},y.open("GET",t,!0),y.send()),window.__tcfapi("addEventListener",2,function(e,n){if(n)switch(e.eventStatus){case"cmpuishown":choice_cmp_config.datalayer&&L(e);break;case"tcloaded":choice_cmp_config.datalayer&&(L(e),C(e)),choice_cmp_config.ccpa&&choice_cmp_config.ccpa&&window.__uspapi("uspPing",1,function(e,n){var t=document.getElementById("choice-footer-msg");n&&e.mode.includes("USP")&&e.jurisdiction.includes(e.location.toUpperCase())&&null!==t&&(t.innerHTML=t.innerHTML+'We use cookies and other data collection technologies to provide the best experience for our customers. You may request that your data not be shared with third parties here: <a href="javascript:void(0)" onclick="window.__uspapi(\'displayUspUi\');">Do Not Sell My Data</a>.',t.classList.add("ccpa-msg-added"),window.__uspapi("setUspDftData",1,function(e,n){n||console.log("Error: USP string not updated!")}))});break;case"useractioncomplete":choice_cmp_config.datalayer&&C(e)}}))}();
     2function displayConsentUiClick(){document.querySelectorAll("a[href='#displayConsentUI']").forEach(function(n){n.addEventListener("click",function(n){n.preventDefault(),window.__cmp("displayConsentUi")})})}document.addEventListener("DOMContentLoaded",function(){displayConsentUiClick()});
     3//# sourceMappingURL=script.min.js.map
  • quantcast-choice/trunk/qc-choice.php

    r2053666 r2355432  
    1515 * @wordpress-plugin
    1616 * Plugin Name:       Quantcast Choice
    17  * Plugin URI:        https://www.quantcast.com/gdpr/consent-management-solution/
    18  * Description:       The QC Choice plugin implements the Quantcast Choice GDPR Consent tool.
    19  * Version:           1.2.2
     17 * Plugin URI:        https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=tcfv2&utm_term=learn-more&utm_content=choice
     18 * Description:       Quantcast Choice TCF v2.0 Consent Management Platform (CMP) for GDPR (including IAB & Non-IAB vendor suppport), CCPA & ePrivacy Directive.
     19 * Version:           2.0.0
    2020 * Author:            Quantcast
    21  * Author URI:        https://www.quantcast.com
     21 * Author URI:        https://www.quantcast.com/gdpr/consent-management-solution/?utm_source=wordpress&utm_medium=plugin-admin&utm_campaign=info&utm_term=author-home&utm_content=choice
    2222 * License:           GPL-2.0+
    2323 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'QC_CHOICE_VERSION', '1.2.2' );
     38define( 'QC_CHOICE_VERSION', '2.0.0' );
    3939define( 'PUBLISHER_VENDORS_VERSION', 1 );
    4040define( 'QC_CHOICE_VENDOR_FILE', 'quantcast-choice/.well-known/pubvendors.json' );
Note: See TracChangeset for help on using the changeset viewer.