mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

stockholm.php (820B)


      1 <?php
      2 // Stockholm extension, https://github.com/annaesvensson/yellow-stockholm
      3 
      4 class YellowStockholm {
      5     const VERSION = "0.9.6";
      6     public $yellow;         // access to API
      7     
      8     // Handle initialisation
      9     public function onLoad($yellow) {
     10         $this->yellow = $yellow;
     11     }
     12     
     13     // Handle update
     14     public function onUpdate($action) {
     15         $fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreSystemFile");
     16         if ($action=="install") {
     17             $this->yellow->system->save($fileName, array("theme" => "stockholm"));
     18         } elseif ($action=="uninstall" && $this->yellow->system->get("theme")=="stockholm") {
     19             $this->yellow->system->save($fileName, array("theme" => $this->yellow->system->getDifferent("theme")));
     20         }
     21     }
     22 }