PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 8.0.5
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v8.0.5
8.0.5 8.0.4 8.0.3 8.0.1 8.0.2 8.0.0 7.9.9.7 7.9.9.6 7.9.9.5 7.9.9.4 7.9.9.3 7.9.9.2 7.9.9.1 7.9.9 7.9.8 7.9.7 7.9.6 7.9.5 7.9.4 7.9.3 7.9.2 7.9.1 7.9.0 7.8.9 7.8.8 All 47 releases
← All changes | integrations/weforms/includes/functions.php +40 -0 7.9.3 → 8.0.5 View file →
@@ -1,0 +1,40 @@
1 +<?php
2 +/**
3 + * Functions
4 + *
5 + * @package GamiPress\WeForms\Functions
6 + * @since 1.0.0
7 + */
8 +// Exit if accessed directly
9 +if( !defined( 'ABSPATH' ) ) exit;
10 +
11 +/**
12 + * Get form fields values
13 + *
14 + * @since 1.0.0
15 + *
16 + * @param array $fields
17 + *
18 + * @return array
19 + */
20 +function gamipress_weforms_get_form_field_values( $form, $entry_id ) {
21 +
22 + $form_fields = array();
23 +
24 + $obj_form = new weForms_Form($form);
25 + $obj_entry = new weForms_Form_Entry($entry_id, $obj_form);
26 + $name_fields = $obj_entry->get_form( $entry_id )->get_field_values();
27 +
28 + // Loop all fields
29 + foreach ( $name_fields as $field_name => $value ) {
30 + $field_value = weforms_get_entry_meta( $entry_id, $field_name, true );
31 + $form_fields[$field_name] = $field_value;
32 + }
33 +
34 + if( function_exists( 'automatorwp_utilities_pull_array_values' ) ) {
35 + $form_fields = automatorwp_utilities_pull_array_values( $form_fields );
36 +
37 + }
38 +
39 + return $form_fields;
40 +}