title */ public function get_sections(): array { return [ 'gdpr' => [ 'title' => __( 'GDPR/DSGVO', 'adpresso' ), 'description' => '', 'controlled_by' => 'enable_module_' . $this->get_id(), 'initially_open' => true, ], // 'cookies' => [ // 'title' => __( 'Cookie Handling', 'adpresso' ), // 'description' => '', // 'controlled_by' => '', // 'initially_open' => true, // ], ]; } /** * Define the options for this settings tab. * * @return array */ protected function define_options(): array { $options = [ 'enable_module_' . $this->get_id() => [ 'type' => 'toggle', 'label' => __( 'Enable privacy', 'adpresso' ), 'description' => __( 'Show ads only to users who give their permission to cookies and ads.', 'adpresso' ), 'default' => 0, 'section' => 'gdpr', ], // 'no_cookies' => [ // 'section' => 'cookies', // 'label' => __( 'Prevent cookies at all', 'adpresso' ), // 'description' => __( 'AdPresso won´t set any cookies. This will impact the functionality of the plugin', 'adpresso' ), // 'type' => 'toggle', // 'default' => '0', // ], // 'show_cookie_notices' => [ // 'section' => 'cookies', // 'label' => __( 'Mark cookie or privacy relevant features in AdPresso.', 'adpresso' ), // 'description' => __( 'Features in AdPresso will be marked as privacy relevant and inform you in which whey they affect privacy.', 'adpresso' ), // 'type' => 'toggle', // 'default' => '0', // ], // 'update_profile_button' => [ // 'section' => 'cookies', // 'label' => __( 'Update visitor profile', 'adpresso' ), // 'text' => __( 'Update visitor profile', 'adpresso' ), // 'type' => 'button', // ], // 'update_profile_login' => [ // 'section' => 'cookies', // 'label' => __( 'Update visitor profile when user logs in or out', 'adpresso' ), // 'type' => 'toggle', // 'default' => '0', // ], ]; $options['privacy_consent_method'] = [ 'type' => 'select', 'label' => __( 'Consent method', 'adpresso' ), 'description' => __( 'Chose a method to define consent', 'adpresso' ), 'options' => [ 'automatic' => __( 'Automatic detection (TCF, Plugin mode, cookie)', 'adpresso' ), 'tcf' => __( 'IAB Transparency and Consent Framework (TCF)', 'adpresso' ), 'plugin_mode' => __( 'Borlabs, Complianz, Real Cookie Banner, etc.', 'adpresso' ), 'custom_cookie' => __( 'Cookie', 'adpresso' ), ], 'default' => 'automatic', 'section' => 'gdpr', ]; $options['tcf_personalized_purpose'] = [ 'type' => 'toggle', 'label' => __( 'Allow Non-Personalized Ads (NPA) Fallback', 'adpresso' ), 'description' => __( 'If the user rejects personalized advertising but accepts basic cookies, signal non-personalized ads mode to Google (AdSense / Ad Manager) instead of blocking the ad completely. Only applies to ads whose "TCF Vendor" field is set to "Google Advertising Products" - ads with a different vendor, or none selected, are not affected by this setting.', 'adpresso' ), 'default' => 1, 'section' => 'gdpr', 'depends_on' => [ [ 'field_id' => 'enable_module_' . $this->get_id(), 'operator' => 'is', 'value' => '1' ], [ 'field_id' => 'privacy_consent_method', 'operator' => 'is_one_of', 'value' => [ 'tcf', 'automatic' ] ], ], 'premium' => true, ]; $options['npa_allow_legitimate_interest'] = [ 'type' => 'toggle', 'label' => __( 'Also accept "legitimate interest" for the NPA fallback', 'adpresso' ), 'description' => __( 'By default, the fallback ad only shows when a visitor has actively agreed to every required purpose. Enabling this also accepts a partner\'s "legitimate interest" signal as sufficient for some of those purposes, not just active consent - legitimate interest is granted by default unless a visitor actively objects in the cookie banner\'s detailed settings, which almost nobody does. This usually means the fallback ad shows for more visitors.', 'adpresso' ), 'default' => 0, 'section' => 'gdpr', 'depends_on' => [ [ 'field_id' => 'enable_module_' . $this->get_id(), 'operator' => 'is', 'value' => '1' ], [ 'field_id' => 'privacy_consent_method', 'operator' => 'is_one_of', 'value' => [ 'tcf', 'automatic' ] ], [ 'field_id' => 'tcf_personalized_purpose', 'operator' => 'is', 'value' => '1' ], ], 'premium' => true, ]; $options['npa_legitimate_interest_notice'] = [ 'type' => 'html-content', 'html' => '
' . __( 'With this enabled, the fallback ad will show for nearly every visitor, since almost nobody actively opts out of legitimate interest. This is allowed under the TCF standard, but relies on a weaker legal basis than active consent - make sure this fits your own compliance approach.', 'adpresso' ) . '
', 'section' => 'gdpr', // Must mirror npa_allow_legitimate_interest's own depends_on in full, not just its // own state - otherwise the notice stays visible after e.g. the NPA fallback toggle // (a level up) hides the checkbox itself, orphaning the warning with nothing left // on screen to explain it. 'depends_on' => [ [ 'field_id' => 'enable_module_' . $this->get_id(), 'operator' => 'is', 'value' => '1' ], [ 'field_id' => 'privacy_consent_method', 'operator' => 'is_one_of', 'value' => [ 'tcf', 'automatic' ] ], [ 'field_id' => 'tcf_personalized_purpose', 'operator' => 'is', 'value' => '1' ], [ 'field_id' => 'npa_allow_legitimate_interest', 'operator' => 'is', 'value' => '1' ], ], ]; $options['cookie_name'] = [ 'type' => 'text', 'label' => __( 'Cookie name', 'adpresso' ), 'description' => __( 'Name of the cookie to check for consent.', 'adpresso' ), 'default' => 'cookie_consent', 'section' => 'gdpr', 'depends_on' => [ [ 'field_id' => 'enable_module_' . $this->get_id(), 'operator' => 'is', 'value' => '1' ], [ 'field_id' => 'privacy_consent_method', 'operator' => 'is_one_of', 'value' => [ 'custom_cookie' ] ], ], ]; $options['cookie_value'] = [ 'type' => 'text', 'label' => __( 'Cookie value', 'adpresso' ), 'description' => __( 'Value of the cookie to check for consent.', 'adpresso' ), 'default' => 'accepted', 'section' => 'gdpr', 'depends_on' => [ [ 'field_id' => 'enable_module_' . $this->get_id(), 'operator' => 'is', 'value' => '1' ], [ 'field_id' => 'privacy_consent_method', 'operator' => 'is_one_of', 'value' => [ 'custom_cookie' ] ], ], ]; $options['rcb_marketing_service_ids'] = [ 'type' => 'text', 'label' => __( 'Real Cookie Banner: Marketing Service ID(s)', 'adpresso' ), 'description' => __( 'Real Cookie Banner tracks consent per individual service, not per category - whether a visitor accepted "marketing" as a whole does not reliably tell us whether a specific ad service was actually consented to. Enter the Service ID(s) (as configured in Real Cookie Banner\'s own service settings) that represent your ad network(s), separated by commas. Ads are only shown once consent is confirmed for at least one of these exact services.', 'adpresso' ), 'default' => '', 'section' => 'gdpr', 'depends_on' => [ [ 'field_id' => 'enable_module_' . $this->get_id(), 'operator' => 'is', 'value' => '1' ], [ 'field_id' => 'privacy_consent_method', 'operator' => 'is_one_of', 'value' => [ 'automatic', 'plugin_mode' ] ], ], ]; $options['pixelmate_marketing_service_ids'] = [ 'type' => 'text', 'label' => __( 'DSGVO Pixelmate: Marketing Service ID(s)', 'adpresso' ), 'description' => __( 'Pixelmate tracks consent per individual service, not per category - whether a visitor accepted "marketing" as a whole does not reliably tell us whether a specific ad service was actually consented to. Enter the Service ID(s) (as configured in Pixelmate\'s own "Custom Services" settings) that represent your ad network(s), separated by commas. Ads are only shown once consent is confirmed for at least one of these exact services.', 'adpresso' ), 'default' => '', 'section' => 'gdpr', 'depends_on' => [ [ 'field_id' => 'enable_module_' . $this->get_id(), 'operator' => 'is', 'value' => '1' ], [ 'field_id' => 'privacy_consent_method', 'operator' => 'is_one_of', 'value' => [ 'automatic', 'plugin_mode' ] ], ], ]; return $options; } }