$field ) { if ( ! is_array( $field ) ) { continue; } $settings = isset( $field['settings'] ) && is_array( $field['settings'] ) ? $field['settings'] : array(); $type = $field['type'] ?? ( $settings['type'] ?? '' ); if ( $this->is_display_only( $type ) || 'recaptcha' === $type || 'spam' === $type ) { continue; } $key = (string) ( $field['key'] ?? ( $settings['key'] ?? $id ) ); $label = (string) ( $field['label'] ?? ( $settings['label'] ?? $key ) ); $out[ $key ] = array( 'label' => wp_strip_all_tags( $label ), 'value' => $field['value'] ?? ( $settings['value'] ?? '' ), ); } $form_id = (int) ( $form_data['form_id'] ?? 0 ); $name = (string) ( $form_data['settings']['title'] ?? '' ); $sub_id = (int) ( $form_data['actions']['save']['sub_id'] ?? 0 ); $url = $sub_id ? admin_url( 'post.php?post=' . $sub_id . '&action=edit' ) : ''; $this->notify( $form_id, $name, $out, $sub_id ? $sub_id : '', $url ); } }