1<?php
2/**
3 * Date/Time element component for the adhoctags plugin
4 *
5 * Defines  <time> ... </time> syntax
6 * More info: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time
7 *
8 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
9 * @author     Anika Henke <anika@selfthinker.org>
10 * @author     Sascha Leib <sascha.leib(at)kolmio.com>
11 */
12
13class syntax_plugin_adhoctags_time extends syntax_plugin_adhoctags_abstractinline {
14
15	protected $tag	= 'time';
16
17	/* allow link attributes: */
18	function allowAttribute(&$name, &$value) {
19		//dbg('<time>:allowAttribute(' . $name . ', "' . $value . '")');
20
21		return ( $name == 'datetime' && preg_match('/^[\w\d\s_+-:]+$/i', $value) );
22
23	}
24}