classes/BearCMS/Themes.php
public function register(string $id, callable $callback): self
    {
        Internal\Themes::$registrations[$id] = $callback;

        if (Config::$initialized) { // Initialize to add asset dirs
            $currentThemeID = Internal\CurrentTheme::getID();
            if ($currentThemeID === $id) {
                Internal\Themes::initialize($currentThemeID);
            }
        }

        return $this;
    }
public function register(string $id, callable $callback): self
    {
        Internal\Themes::$registrations[$id] = $callback;

        if (Config::$initialized) { // Initialize to add asset dirs
            $currentThemeID = Internal\CurrentTheme::getID();
            if ($currentThemeID === $id) {
                Internal\Themes::initialize($currentThemeID);
            }
        }

        return $this;
    }
public function register ( string $ id , callable $ callback ) : self { Internal \ Themes :: $ registrations [ $ id ] = $ callback ; if ( Config :: $ initialized ) { // Initialize to add asset dirs $ currentThemeID = Internal \ CurrentTheme :: getID ( ) ; if ( $ currentThemeID === $ id ) { Internal \ Themes :: initialize ( $ currentThemeID ) ; } } return $ this ; }
Register a new theme.

@param string $id The theme ID.
@param callable $callback A function to define theme parameters.
@return self Returns a reference to itself.
Register a new theme .