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' => '