2 // PukiWiki - Yet another WikiWikiWeb clone.
3 // $Id: size.inc.php,v 1.10 2005/06/16 15:04:08 henoheno Exp $
5 // Text-size changing via CSS plugin
7 define('PLUGIN_SIZE_MAX', 60); // px
8 define('PLUGIN_SIZE_MIN', 8); // px
11 define('PLUGIN_SIZE_USAGE', '&size(px){Text you want to change};');
13 function plugin_size_inline()
15 if (func_num_args() != 2) return PLUGIN_SIZE_USAGE;
17 list($size, $body) = func_get_args();
19 // strip_autolink() is not needed for size plugin
20 //$body = strip_htmltag($body);
22 if ($size == '' || $body == '' || ! preg_match('/^\d+$/', $size))
23 return PLUGIN_SIZE_USAGE;
25 $size = max(PLUGIN_SIZE_MIN, min(PLUGIN_SIZE_MAX, $size));
26 return '<span style="font-size:' . $size .
27 'px;display:inline-block;line-height:130%;text-indent:0px">' .