get_noptin_subscriber_fields()

Returns a list of available subscriber fields.


Return Return

(array) An array of subscriber fields.


Top ↑

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 );
}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.2.4Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation