mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
{NEWSCATICON} Now has the news category title as alt text
The alt attribute of the news category icon now has the title of the news category as its alt text.
This commit is contained in:
@@ -400,8 +400,7 @@ class news_shortcodes extends e_shortcode
|
||||
$src = (is_readable(e_IMAGE_ABS."newspost_images/".$category_icon)) ? e_IMAGE_ABS."newspost_images/".$category_icon : e_IMAGE_ABS."icons/".$category_icon;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$alt_text = e107::getParser()->toHTML($this->news_item['category_name'], FALSE ,'defs');
|
||||
//TODO - remove inline styles
|
||||
if($this->param['caticon'] == ''){$this->param['caticon'] = 'border:0px';}
|
||||
|
||||
@@ -412,12 +411,12 @@ class news_shortcodes extends e_shortcode
|
||||
break;
|
||||
|
||||
case 'tag':
|
||||
return "<img class='news_image' src='{$src}' alt='' style='".$this->param['caticon']."' />";
|
||||
return "<img class='news_image' src='{$src}' alt='$alt_text' style='".$this->param['caticon']."' />";
|
||||
break;
|
||||
|
||||
case 'url':
|
||||
default:
|
||||
return "<a href='".e107::getUrl()->create('news/list/category', $this->news_item)."'><img class='img-rounded' style='".$this->param['caticon']."' src='".$src."' alt='' /></a>";
|
||||
return "<a href='".e107::getUrl()->create('news/list/category', $this->news_item)."'><img class='img-rounded' style='".$this->param['caticon']."' src='".$src."' alt='$alt_text' /></a>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user