23 lines
821 B
PHP
23 lines
821 B
PHP
<?php
|
|
// Stockholm extension, https://github.com/annaesvensson/yellow-stockholm
|
|
|
|
class YellowStockholm {
|
|
const VERSION = "0.8.14";
|
|
public $yellow; // access to API
|
|
|
|
// Handle initialisation
|
|
public function onLoad($yellow) {
|
|
$this->yellow = $yellow;
|
|
}
|
|
|
|
// Handle update
|
|
public function onUpdate($action) {
|
|
$fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreSystemFile");
|
|
if ($action=="install") {
|
|
$this->yellow->system->save($fileName, array("theme" => "stockholm"));
|
|
} elseif ($action=="uninstall" && $this->yellow->system->get("theme")=="stockholm") {
|
|
$this->yellow->system->save($fileName, array("theme" => $this->yellow->system->getDifferent("theme")));
|
|
}
|
|
}
|
|
}
|