Example #1
0
    if (trim($value) != '') {
        $return['field_id'] = $field->id;
        $return['type'] = $field->type;
        $return['name'] = __($field->name, WPL_TEXTDOMAIN);
        if (isset($field->multilingual) and $field->multilingual and wpl_global::check_multilingual_status()) {
            $current_language = wpl_global::get_current_language();
            $lang_column = wpl_addon_pro::get_column_lang_name($field->table_column, $current_language, false);
            if (isset($values[$lang_column])) {
                $value = $values[$lang_column];
            }
        }
        $value = stripslashes($value);
        if (in_array($field->id, array(308, 1160))) {
            $value = apply_filters('the_content', $value);
        }
        $value = wpl_global::do_shortcode($value);
        $return['value'] = $value;
    }
    $done_this = true;
} elseif ($type == 'select' and !$done_this) {
    if (trim($value) and trim($value) != '-1') {
        $return['field_id'] = $field->id;
        $return['type'] = $field->type;
        $return['name'] = __($field->name, WPL_TEXTDOMAIN);
        foreach ($options['params'] as $field_option) {
            if ($value == $field_option['key']) {
                $return['value'] = __($field_option['value'], WPL_TEXTDOMAIN);
            }
        }
    }
    $done_this = true;