RSS Feed/News vBulletin: alt attribute conversion could be improved

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,759
Points
823

Reputation:

PHP:

Code:
if (!empty($settings['title']))
{
    $attributes['alt'] = $this->convertToUtf8($settings['title']);
}
if (!empty($settings['description']))
{
    $description = preg_replace( '/[\r\n]/', ' ', $this->convertToUtf8($settings['description']));

if (isset($attributes['alt']))
    {
        $attributes['alt'] .= " - $description";
    }
    else
    {
        $attributes['alt'] = $description;
    }
}

If an attachment has title and description and both are identical...

Read more

Continue reading...
 
Status
Not open for further replies.
Top