1<?php 2/** 3 * List Item element component for the adhoctags plugin 4 * 5 * Defines <li> ... </li> syntax 6 * More info: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li 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_li extends syntax_plugin_adhoctags_abstractheadline { 14 15 protected $tag = 'li'; 16 17 /* allow link attributes: */ 18 function allowAttribute(&$name, &$value) { 19 20 switch ($name) { 21 case 'value': 22 return (preg_match('/^([\d]+)$/', trim($value))); 23 break; 24 25 default: 26 return false; 27 } 28 } 29 30 31}