X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=plugins%2Fqrcode%2Fqrcode.php;h=0f96a106921e856eff1160cc0b881c1b68b2e75d;hb=ebee8d9372fb8c00db730524625570c4282ce60a;hp=84a1961888667833fe3f84cdaa3943bcf192bd11;hpb=49e62f22ad750d4d60936ec8437caee91809b179;p=github%2Fshaarli%2FShaarli.git diff --git a/plugins/qrcode/qrcode.php b/plugins/qrcode/qrcode.php index 84a19618..0f96a106 100644 --- a/plugins/qrcode/qrcode.php +++ b/plugins/qrcode/qrcode.php @@ -43,3 +43,28 @@ 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; +} + +/** + * This function is never called, but contains translation calls for GNU gettext extraction. + */ +function qrcode_dummy_translation() +{ + // meta + t('For each link, add a QRCode icon.'); +}