aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/archiveorg/archiveorg.php
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2015-11-08 13:29:32 +0100
committerArthur <arthur@hoa.ro>2015-11-08 13:29:32 +0100
commitfd006c630b64146edc402b68d8503c716f8a55d6 (patch)
treee53904cc6232c7f2fe8e1de6f23c9a5d6c5403ad /plugins/archiveorg/archiveorg.php
parent70df947af60afb05529024bb2d3825eaf6cc7950 (diff)
parent056107ab4eae0a4867cf8d55de77d31f8868b899 (diff)
downloadShaarli-fd006c630b64146edc402b68d8503c716f8a55d6.tar.gz
Shaarli-fd006c630b64146edc402b68d8503c716f8a55d6.tar.zst
Shaarli-fd006c630b64146edc402b68d8503c716f8a55d6.zip
Merge pull request #275 from shaarli/plugin-proposition
Plugin proposition
Diffstat (limited to 'plugins/archiveorg/archiveorg.php')
-rw-r--r--plugins/archiveorg/archiveorg.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/archiveorg/archiveorg.php b/plugins/archiveorg/archiveorg.php
new file mode 100644
index 00000000..7d172584
--- /dev/null
+++ b/plugins/archiveorg/archiveorg.php
@@ -0,0 +1,25 @@
1<?php
2/**
3 * Plugin Archive.org.
4 *
5 * Add an icon in the link list for archive.org.
6 */
7
8/**
9 * Add archive.org icon to link_plugin when rendering linklist.
10 *
11 * @param mixed $data - linklist data.
12 *
13 * @return mixed - linklist data with archive.org plugin.
14 */
15function hook_archiveorg_render_linklist($data)
16{
17 $archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html');
18
19 foreach ($data['links'] as &$value) {
20 $archive = sprintf($archive_html, $value['url']);
21 $value['link_plugin'][] = $archive;
22 }
23
24 return $data;
25}