[ 'type' => 'text', 'label' => __('Sender Name', 'woonoow'), 'description' => __('The name that appears in the "From" field of newsletter emails', 'woonoow'), 'placeholder' => get_bloginfo('name'), 'default' => get_bloginfo('name'), 'required' => true, ], 'sender_email' => [ 'type' => 'email', 'label' => __('Sender Email', 'woonoow'), 'description' => __('The email address that appears in the "From" field', 'woonoow'), 'placeholder' => get_option('admin_email'), 'default' => get_option('admin_email'), 'required' => true, ], 'reply_to_email' => [ 'type' => 'email', 'label' => __('Reply-To Email', 'woonoow'), 'description' => __('Email address for replies (leave empty to use sender email)', 'woonoow'), 'placeholder' => get_option('admin_email'), ], 'double_opt_in' => [ 'type' => 'toggle', 'label' => __('Double Opt-In', 'woonoow'), 'description' => __('Require subscribers to confirm their email address before being added to the list', 'woonoow'), 'default' => true, ], 'welcome_email' => [ 'type' => 'toggle', 'label' => __('Send Welcome Email', 'woonoow'), 'description' => __('Automatically send a welcome email to new subscribers', 'woonoow'), 'default' => true, ], 'unsubscribe_page' => [ 'type' => 'select', 'label' => __('Unsubscribe Page', 'woonoow'), 'description' => __('Page to redirect users after unsubscribing', 'woonoow'), 'placeholder' => __('-- Select Page --', 'woonoow'), 'options' => self::get_pages_options(), ], 'gdpr_consent' => [ 'type' => 'toggle', 'label' => __('GDPR Consent Checkbox', 'woonoow'), 'description' => __('Show a consent checkbox on subscription forms (recommended for EU compliance)', 'woonoow'), 'default' => false, ], 'consent_text' => [ 'type' => 'textarea', 'label' => __('Consent Text', 'woonoow'), 'description' => __('Text shown next to the consent checkbox', 'woonoow'), 'placeholder' => __('I agree to receive marketing emails', 'woonoow'), 'default' => __('I agree to receive marketing emails and understand I can unsubscribe at any time.', 'woonoow'), ], ]; return $schemas; } /** * Get pages as options for select field */ private static function get_pages_options() { $pages = get_pages(); $options = []; foreach ($pages as $page) { $options[$page->ID] = $page->post_title; } return $options; } }