vBulletin: alt attribute conversion could be improved

Status
This content is read-only, or is not open for further replies.

Kirby

Guest
offline
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...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom