function Wo_GetUserCustomFields() {
global $wo, $sqlConnect;
$data = array();
$where = "WHERE `active` = '1' AND `profile_page` = 1";
$query_one = "SELECT * FROM " . T_FIELDS . " {$where} ORDER BY `id` ASC";
$sql = mysqli_query($sqlConnect, $query_one);
while ($fetched_data = mysqli_fetch_assoc($sql)) {
$fetched_data['fid'] = 'fid_' . $fetched_data['id'];
$fetched_data['name'] = preg_replace_callback("/{{LANG (.*?)}}/", function($m) use ($wo) {
return (isset($wo['lang'][$m[1]])) ? $wo['lang'][$m[1]] : '';
}, $fetched_data['name']);
$fetched_data['description'] = preg_replace_callback("/{{LANG (.*?)}}/", function($m) use ($wo) {
return (isset($wo['lang'][$m[1]])) ? $wo['lang'][$m[1]] : '';
}, $fetched_data['description']);
$fetched_data['type'] = preg_replace_callback("/{{LANG (.*?)}}/", function($m) use ($wo) {
return (isset($wo['lang'][$m[1]])) ? $wo['lang'][$m[1]] : '';
}, $fetched_data['type']);
$data[] = $fetched_data;
}
return $data;
}