Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Noptin_Ninja_Forms::map_fields( array $settings )


Parameters Parameters

$settings

(array) (Required)


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/integrations/class-noptin-ninja-forms.php

	private function map_fields( $settings ) {

		// Prepare subscriber details.
		$subscriber = array(
            '_subscriber_via' => __( 'Ninja Forms', 'newsletter-optin-box' ),
        );

        // Add the subscriber's IP address.
		$address = noptin_get_user_ip();
		if ( ! empty( $address ) && '::1' !== $address ) {
			$subscriber['ip_address'] = $address;
		}

		// Add map fields.
		$map_fields = wp_list_pluck( $this->get_map_fields(), 'name' );

		foreach ( $map_fields as $field ) {
			if ( isset( $settings[ "noptin_$field" ] ) ) {
				$subscriber[ $field ] = $settings[ "noptin_$field" ];
			}
		}

		return $subscriber;
	}


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