Noptin_Contact_Form_7::get_map_fields()
Returns an array of map fields
Source Source
File: includes/integrations/class-noptin-contact-form-7.php
public function get_map_fields() { $map_fields = array( array( 'name' => 'name', 'label' => __( 'Subscriber Name', 'newsletter-optin-box' ), 'type' => 'text', ), array( 'name' => 'email', 'label' => __( 'Subscriber Email', 'newsletter-optin-box' ), 'type' => 'email', ), array( 'name' => 'GDPR_consent', 'label' => __( 'GDPR Consent', 'newsletter-optin-box' ), 'type' => 'acceptance', ) ); foreach ( get_special_noptin_form_fields() as $name => $field ) { $id = esc_attr( sanitize_html_class( $name ) ); $type = esc_attr( $field[0] ); $label = wp_kses_post( $field[1] ); if ( $type === 'text' || $type === 'checkbox' || $type === 'textarea' || $type === 'hidden' ) { $map_fields[] = array( 'name' => $id, 'label' => $label, ); } } return apply_filters( 'noptin_contact_form_7_map_fields', $map_fields ); }
Expand full source code Collapse full source code View on GitHub