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' => 'checkbox', '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' => 'checkbox', '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' => 'checkbox', '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' => 'checkbox', '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', '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_vendor_check'] = [ 'type' => 'checkbox', 'label' => __( 'Check TCF vendor', 'adpresso' ), 'description' => __( 'Check if the user has given consent to the TCF vendor', 'adpresso' ), 'default' => 1, 'section' => 'gdpr', ]; $options['tcf_personalized_purpose'] = [ 'type' => 'checkbox', 'label' => __( 'Only show personalized ads, when user accepts purpose.', 'adpresso' ), 'description' => __( 'Loads Google AdSense non-personalized version, if this one is enabled and user does not accept purpose.', 'adpresso' ), 'default' => 1, 'section' => 'gdpr', ]; $options['cookie_name'] = [ 'type' => 'text', 'label' => __( 'Cookie name', 'adpresso' ), 'description' => __( 'Name of the cookie to check for consent.', 'adpresso' ), 'default' => 'cookie_consent', 'section' => 'gdpr', ]; $options['cookie_value'] = [ 'type' => 'text', 'label' => __( 'Cookie value', 'adpresso' ), 'description' => __( 'Value of the cookie to check for consent.', 'adpresso' ), 'default' => 'accepted', 'section' => 'gdpr', ]; return $options; } }