Skip to content
Snippets Groups Projects
Commit 933e9570 authored by l26yan's avatar l26yan
Browse files

ISTWCMS-2607 Use drupal_attributes instead

parent 2c68b76e
No related branches found
No related tags found
No related merge requests found
......@@ -196,12 +196,13 @@
if (!empty($data_item['icon'])):
$html .= '<div class="highlighted-fact text-' . strtolower($text_align) . ' ' . $default_colour_class . '">';
$attr['src'] = $data_item['icon'];
if (!empty($data_item['alt'])):
$html .= '<img src="' . $data_item['icon'] . '" alt="' . $data_item['alt'] . '">';
else:
$html .= '<img src="' . $data_item['icon'] . '">';
$attr['alt'] = $data_item['alt'];
endif;
$html .= '<img ' . drupal_attributes($attr) . '>';
else:
$html .= '<div class="highlighted-fact text-' . strtolower($text_align) . ' ' . $default_colour_class . ' no-icon">';
endif;
......
......@@ -257,12 +257,12 @@ function cke_ff_process($text) {
foreach ($data as $data_item) {
if (!empty($data_item['icon'])) {
$html .= '<div class="highlighted-fact text-' . strtolower($text_align) . ' ' . $default_colour_class . '">';
$attr['src'] = $data_item['icon'];
if ($data_item['alt'] !== NULL) {
$html .= '<img src="' . $data_item['icon'] . '" alt="' . $data_item['alt'] . '">';
}
else {
$html .= '<img src="' . $data_item['icon'] . '">';
$attr['alt'] = $data_item['alt'];
}
$html .= '<img ' . drupal_attributes($attr) . '">';
}
else {
$html .= '<div class="highlighted-fact text-' . strtolower($text_align) . ' ' . $default_colour_class . ' no-icon">';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment