From 906b45bbf7130955dc65a34445b53390d6460b49 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 2 Nov 2008 17:15:09 +0100 Subject: [PATCH] Move plugin 'icon' in the core. Signed-off-by: Florent Bruneau --- plugins/compiler.icon.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 plugins/compiler.icon.php diff --git a/plugins/compiler.icon.php b/plugins/compiler.icon.php new file mode 100644 index 0000000..d464900 --- /dev/null +++ b/plugins/compiler.icon.php @@ -0,0 +1,46 @@ +_parse_attrs($tag_attrs)); + + $alt = 'alt=""'; + + if (isset($title)) { + $title = pl_entities(trim($title, '\'"'), ENT_QUOTES); + $alt = 'alt="'.$title.'"'; + $title = 'title="'. $title.'" '; + } + + $name = pl_entities(trim($name, '\'"'), ENT_QUOTES); + $name = "images/icons/$name.gif"; + if ($full) { + global $globals; + $name = $globals->baseurl . '/' . $name; + } + + return "?> -- 2.1.4