OSDN Git Service

BugTrack/2447 Show tracker - passage by Client-JavaScript
[pukiwiki/pukiwiki.git] / plugin / passage.inc.php
diff --git a/plugin/passage.inc.php b/plugin/passage.inc.php
new file mode 100644 (file)
index 0000000..ea6c6a1
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+// PukiWiki - Yet another WikiWikiWeb clone
+// passage.inc.php
+// Copyright 2017 PukiWiki Development Team
+// License: GPL v2 or (at your option) any later version
+//
+// Show passage by Client JavaScript
+
+function plugin_passage_inline()
+{
+       list($date_atom) = func_get_args();
+       $time = strtotime($date_atom);
+       $yyyyMMdd = date('Y-m-d', $time);
+       return '<span class="simple_passage" data-mtime="' .
+               get_date_atom($time) . '">' . $yyyyMMdd . '</span>';
+}