vBulletin: alt attribute conversion could be improved

  • Thread starter Thread starter Kirby
  • Start date Start date

Kirby

Guest
Member
PHP:

Code:

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...

Read more

Continue reading...
 
Top