Plugin.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace Kanboard\Plugin\Oxygen;
  3. use Kanboard\Core\Plugin\Base;
  4. class Plugin extends Base
  5. {
  6. public function initialize()
  7. {
  8. global $themeOxygenConfig;
  9. if (file_exists('plugins/Oxygen/config.php'))
  10. {
  11. require_once('plugins/Oxygen/config.php');
  12. }
  13. if (isset($themeOxygenConfig['logo']))
  14. {
  15. $this->template->setTemplateOverride('header/title', 'Oxygen:layout/header/title');
  16. }
  17. $this->hook->on("template:layout:css", array("template" => "plugins/Oxygen/Assets/css/oxygen.css"));
  18. $this->hook->on("template:layout:css", array("template" => "plugins/Oxygen/Assets/css/prism.css"));
  19. $this->hook->on('template:layout:js', array('template' => 'plugins/Oxygen/Assets/js/clipboard.min.js'));
  20. $this->hook->on('template:layout:js', array('template' => 'plugins/Oxygen/Assets/js/prism.js'));
  21. }
  22. public function getPluginName()
  23. {
  24. return 'Oxygen';
  25. }
  26. public function getPluginDescription()
  27. {
  28. return t('This theme allows you to add special features like replacing the logo and adds syntax highlighting for Markdown code.');
  29. }
  30. public function getPluginAuthor()
  31. {
  32. return 'Valentino Pesce';
  33. }
  34. public function getPluginVersion()
  35. {
  36. return '1.3.1';
  37. }
  38. public function getCompatibleVersion()
  39. {
  40. return '>=1.2.5';
  41. }
  42. public function getPluginHomepage()
  43. {
  44. return 'https://github.com/kenlog/Oxygen';
  45. }
  46. }