public static function remove($slug = null)
    {
        if ($slug === null) {
            static::$_current = null;
            static::$_modes = [];
        } else {
            if (isset(static::$_modes[$slug])) {
                unset(static::$_modes[$slug]);
            }
        }
    }
public static function remove($slug = null)
    {
        if ($slug === null) {
            static::$_current = null;
            static::$_modes = [];
        } else {
            if (isset(static::$_modes[$slug])) {
                unset(static::$_modes[$slug]);
            }
        }
    }
public static function remove ( $ slug = null ) { if ( $ slug === null ) { static :: $ _current = null ; static :: $ _modes = [ ] ; } else { if ( isset ( static :: $ _modes [ $ slug ] ) ) { unset ( static :: $ _modes [ $ slug ] ) ; } } }
Unregisters the given view-mode, or all of them if first parameter is null.

@param string|null $slug View mode's slug
@return void
Unregisters the given view - mode or all of them if first parameter is null .