Accounts Compare Page 19
'one',
2 => 'two',
3 => 'three',
4 => 'four',
5 => 'five'
];
$get_link_url = function ($val) {
if (is_array($val) && !empty($val['url'])) return $val['url'];
if (is_string($val) && !empty($val)) return $val;
return '';
};
$get_link_target = function ($val) {
if (is_array($val) && !empty($val['target'])) return $val['target'];
return '';
};
function lsg_text_without_sup($value) {
$value = (string) $value;
$value = preg_replace('/]*>.*?<\/sup>/is', '', $value);
$value = wp_strip_all_tags($value);
$value = preg_replace('/\s+/u', ' ', $value);
return trim($value);
}
?>
'name' => $account_name,
'description' => $brief_desc,
'button' => $learn_more_text,
'url' => $learn_more_url,
'link_type' => $link_type,
'modal_id' => $modal_id,
];
if ($link_type === 'modal' && $show_link) {
ob_start();
?>
} elseif ($type === 'text' && !empty(get_sub_field('compare_text'))) {
$field_data[] = get_sub_field('compare_text');
} else {
$field_data[] = ' ';
}
}
}
}
$j++;
}
}
$compare_values[] = $field_data;
$a++;
}
}
$total_accounts = count($accounts);
$column_class = isset($number_words[$total_accounts]) ? $number_words[$total_accounts] . '-columns' : 'multi-columns';
$total_rows = count($compare_fields);
?>




