get_noptin_subscriber_fields()
Returns a list of available subscriber fields.
Return Return
(array) An array of subscriber fields.
Source Source
File: includes/subscriber.php
function get_noptin_subscriber_fields() { // Base subscriber fields. $fields = array( 'first_name' => __( 'First Name', 'newsletter-optin-box' ), 'second_name' => __( 'Last Name', 'newsletter-optin-box' ), 'full_name' => __( 'Full Name', 'newsletter-optin-box' ), 'email' => __( 'Email Address', 'newsletter-optin-box' ), 'active' => __( 'Active', 'newsletter-optin-box' ), 'confirm_key' => __( 'Confirm Key', 'newsletter-optin-box' ), 'confirmed' => __( 'Email Confirmed', 'newsletter-optin-box' ), 'date_created' => __( 'Subscription Date', 'newsletter-optin-box' ), 'GDPR_consent' => __( 'GDPR Consent', 'newsletter-optin-box' ), 'ip_address' => __( 'IP Address', 'newsletter-optin-box' ), ); // Subscription fields. $extra_fields = get_special_noptin_form_fields(); foreach ( $extra_fields as $name => $field ) { $label = wp_kses_post( $field[1] ); if ( empty( $fields[ $name ] ) ) { $fields[ $name ] = $label; } } return apply_filters( 'get_noptin_subscriber_fields', $fields ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.2.4 | Introduced. |