OSDN Git Service

RecentChanges: Update
[pukiwiki/pukiwiki.git] / plugin / size.inc.php
1 <?php
2 /////////////////////////////////////////////////
3 // PukiWiki - Yet another WikiWikiWeb clone.
4 //
5 // $Id: size.inc.php,v 1.6 2004/07/31 03:09:20 henoheno Exp $
6 //
7
8 function plugin_size_inline()
9 {
10         if (func_num_args() != 2)
11         {
12                 return FALSE;
13         }
14
15         list($size,$body) = func_get_args();
16
17         if ($size == '' or $body == '')
18         {
19                 return FALSE;
20         }
21
22         if (!preg_match('/^\d+$/',$size))
23         {
24                 return $body;
25         }
26
27         $s_size = htmlspecialchars($size);
28         return "<span style=\"font-size:{$s_size}px;display:inline-block;line-height:130%;text-indent:0px\">$body</span>";
29 }
30 ?>