X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=plugins%2Fqrcode%2Fqrcode.php;h=a709abaa8328b9a70f8d3b3405a3052197e294f5;hb=70a35e2a6dfeabcb657494a0f30eb630aeb57792;hp=5f6e76a2f8c42d035f0c7026158b463935d953b0;hpb=61873e3ded8dfba397b39aebd2322d0939c82caa;p=github%2Fshaarli%2FShaarli.git diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php index 5f6e76a2..a709abaa 100644 --- a/plugins/qrcode/qrcode.php +++ b/plugins/qrcode/qrcode.php @@ -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; +}