diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-08-11 21:17:21 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-08-11 21:17:21 +0400 |
commit | 2340530c1109a37527f3b8ad0b82e54e7a6eb137 (patch) | |
tree | b6df0edb4bec6fa11a74f47b219d33bb8ee571e8 /plugins | |
parent | 7ef891e7ce058a9cb23de75690f6117181e06e45 (diff) |
Refs #3942 Now themes don't need to have a PHP file, themes can simply specify a "stylesheet" entry in the plugin.piwik.json, this CSS/less file will be loaded as if it was registered with the css event
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Goals/Archiver.php | 4 | ||||
-rw-r--r-- | plugins/PleineLune/PleineLune.php | 32 | ||||
-rw-r--r-- | plugins/PleineLune/plugin.piwik.json | 3 |
3 files changed, 4 insertions, 35 deletions
diff --git a/plugins/Goals/Archiver.php b/plugins/Goals/Archiver.php index ae0cbf3b07..efb26854bc 100644 --- a/plugins/Goals/Archiver.php +++ b/plugins/Goals/Archiver.php @@ -16,6 +16,7 @@ use Piwik\Metrics; use Piwik\DataTable; use Piwik\DataArray; use Piwik\PluginsArchiver; +use Piwik\PluginsManager; use Piwik\Tracker\GoalManager; use Piwik\Plugins\Goals\Goals; @@ -333,8 +334,7 @@ class Archiver extends PluginsArchiver } $label = "Value not defined"; // Product Name/Category not defined" - //TODOA : working? - if (class_exists('Piwik\Plugins\CustomVariables\CustomVariables')) { + if (PluginsManager::getInstance()->isPluginActivated('CustomVariables')) { $label = \Piwik\Plugins\CustomVariables\Archiver::LABEL_CUSTOM_VALUE_NOT_DEFINED; } } diff --git a/plugins/PleineLune/PleineLune.php b/plugins/PleineLune/PleineLune.php deleted file mode 100644 index c1189727ba..0000000000 --- a/plugins/PleineLune/PleineLune.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** - * Piwik - Open source web analytics - * - * @link http://piwik.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - * - * @category Piwik_Plugins - * @package PleineLune - */ -namespace Piwik\Plugins\PleineLune; - -use Piwik\AssetManager; - -/** - * - * @package PleineLune - */ -class PleineLune extends \Piwik\Plugin -{ - public function getListHooksRegistered() - { - return array( - AssetManager::CSS_IMPORT_EVENT => 'getCssFiles', - ); - } - - public function getCssFiles(&$cssFiles) - { - $cssFiles[] = "plugins/PleineLune/stylesheets/theme.less"; - } -} diff --git a/plugins/PleineLune/plugin.piwik.json b/plugins/PleineLune/plugin.piwik.json index d0718e1737..b3ab4ac732 100644 --- a/plugins/PleineLune/plugin.piwik.json +++ b/plugins/PleineLune/plugin.piwik.json @@ -1,5 +1,6 @@ { "name": "PleineLune", "description": "A dark theme for Piwik, ideal to view your analytics reports before sunrise.", - "theme": true + "theme": true, + "stylesheet": "stylesheets/theme.less" }
\ No newline at end of file |