Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-07-15 10:16:34 +0400
committermattab <matthieu.aubry@gmail.com>2013-07-15 10:16:34 +0400
commit4b7419587bc0b9d02362697ff60bc8c59751dded (patch)
treea8382bdcccb8225f24bd6f9df5b1854248901685 /core
parent1ad9203f0186fb96b1a1149c49f0deb5c6e1a35e (diff)
Refs #3942 Adding Themes menu in the admin screen. Next: make Zeitgeist the default theme (and allow only one enabled theme at a time)
Diffstat (limited to 'core')
-rw-r--r--core/Plugin.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/Plugin.php b/core/Plugin.php
index 65ae6bc54b..811f43eccf 100644
--- a/core/Plugin.php
+++ b/core/Plugin.php
@@ -28,6 +28,7 @@ abstract class Piwik_Plugin
* - 'version' => string // plugin version number; examples and 3rd party plugins must not use Piwik_Version::VERSION; 3rd party plugins must increment the version number with each plugin release
* - 'translationAvailable' => bool // is there a translation file in plugins/your-plugin/lang/* ?
* - 'TrackerPlugin' => bool // should we load this plugin during the stats logging process?
+ * - 'theme' => bool // Whether this plugin is a theme (a theme is a plugin, but a plugin is not necessarily a theme)
*
* @return array
*/
@@ -109,6 +110,17 @@ abstract class Piwik_Plugin
}
/**
+ * Whether this plugin is a theme
+ *
+ * @return bool
+ */
+ final public function isTheme()
+ {
+ $info = $this->getInformation();
+ return !empty($info['theme']) && (bool)$info['theme'];
+ }
+
+ /**
* Returns the plugin's base class name without the "Piwik_" prefix,
* e.g., "UserCountry" when the plugin class is "Piwik_UserCountry"
*