get ( 'Core.RemoveInvalidImg' )) { return $attr; } $attr ['src'] = $config->get ( 'Attr.DefaultInvalidImage' ); $src = false; } if (! isset ( $attr ['alt'] )) { if ($src) { $alt = $config->get ( 'Attr.DefaultImageAlt' ); if ($alt === null) { // truncate if the alt is too long $attr ['alt'] = substr ( basename ( $attr ['src'] ), 0, 40 ); } else { $attr ['alt'] = $alt; } } else { $attr ['alt'] = $config->get ( 'Attr.DefaultInvalidImageAlt' ); } } return $attr; } } // vim: et sw=4 sts=4