From: Florent Bruneau Date: Sun, 2 Nov 2008 16:15:09 +0000 (+0100) Subject: Move plugin 'icon' in the core. X-Git-Tag: core/1.0.0~11 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=906b45bbf7130955dc65a34445b53390d6460b49;p=platal.git Move plugin 'icon' in the core. Signed-off-by: Florent Bruneau --- 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 "?>