public static function magicAlt(Tag &$Tag, $changed)
    {
        switch ($Tag->realName) {
        case 'img':
            if (in_array('alt', $changed)) {
                $Tag->attributes['alt'] = basename($Tag->attributes['alt']);
            }
            break;
        default:
            break;
        }
    }
public static function magicAlt(Tag &$Tag, $changed)
    {
        switch ($Tag->realName) {
        case 'img':
            if (in_array('alt', $changed)) {
                $Tag->attributes['alt'] = basename($Tag->attributes['alt']);
            }
            break;
        default:
            break;
        }
    }
public static function magicAlt ( Tag & $ Tag , $ changed ) { switch ( $ Tag -> realName ) { case 'img' : if ( in_array ( 'alt' , $ changed ) ) { $ Tag -> attributes [ 'alt' ] = basename ( $ Tag -> attributes [ 'alt' ] ) ; } break ; default : break ; } }
Callback function for double attrs on an image tag.

@param Tag   &$Tag    the current tag
@param array $changed the tags that were changed

@return void
Callback function for double attrs on an image tag .