]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - plugins/qrcode/qrcode.php
Fixes QRCode style
[github/shaarli/Shaarli.git] / plugins / qrcode / qrcode.php
index 5f6e76a2f8c42d035f0c7026158b463935d953b0..a709abaa8328b9a70f8d3b3405a3052197e294f5 100644 (file)
@@ -39,3 +39,19 @@ function hook_qrcode_render_footer($data)
 
     return $data;
 }
+
+/**
+ * When linklist is displayed, include qrcode CSS file.
+ *
+ * @param array $data - header data.
+ *
+ * @return mixed - header data with qrcode CSS file added.
+ */
+function hook_qrcode_render_includes($data)
+{
+    if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
+        $data['css_files'][] = PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.css';
+    }
+
+    return $data;
+}