$qrcode_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/qrcode/qrcode.html');
foreach ($data['links'] as &$value) {
- $qrcode = sprintf($qrcode_html, $value['real_url'], $value['real_url'], PluginManager::$PLUGINS_PATH);
+ $qrcode = sprintf($qrcode_html,
+ urlencode($value['url']),
+ $value['url'],
+ PluginManager::$PLUGINS_PATH
+ );
$value['link_plugin'][] = $qrcode;
}
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.');
+}