Grunion_Contact_Form_Plugin::get_field_names PHP Метод

get_field_names() защищенный Метод

Get the names of all the form's fields
Устаревший: As this is no longer necessary as of the CSV export rewrite. - 2015-12-29
protected get_field_names ( array | integer $posts ) : array
$posts array | integer the post we want the fields of
Результат array the array of fields
    protected function get_field_names($posts)
    {
        $posts = (array) $posts;
        $all_fields = array();
        foreach ($posts as $post) {
            $fields = self::parse_fields_from_content($post);
            if (isset($fields['_feedback_all_fields'])) {
                $extra_fields = array_keys($fields['_feedback_all_fields']);
                $all_fields = array_merge($all_fields, $extra_fields);
            }
        }
        $all_fields = array_unique($all_fields);
        return $all_fields;
    }