Revision 21420,
724 bytes
checked in by Seasoft, 11 years ago
(diff) |
#1613 (ソース整形・ソースコメントの改善)
- Zend Framework PHP 標準コーディング規約への準拠を高めた
|
-
Property svn:eol-style set to
LF
-
Property svn:keywords set to
Id
-
Property svn:mime-type set to
text/x-httpd-php; charset=UTF-8
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * 数値を数字絵文字に変換する。 |
---|
4 | * |
---|
5 | * 入力が0~9ではない場合、または、携帯端末からのアクセスではない場合は、 |
---|
6 | * 入力を [ と ] で囲んだ文字列を返す。 |
---|
7 | * |
---|
8 | * @param string $value 入力 |
---|
9 | * @return string 出力 |
---|
10 | */ |
---|
11 | function smarty_modifier_numeric_emoji($value) { |
---|
12 | // 数字絵文字 (0~9) の絵文字番号 |
---|
13 | static $numeric_emoji_index = array('134', '125', '126', '127', '128', '129', '130', '131', '132', '133'); |
---|
14 | |
---|
15 | if ((SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) |
---|
16 | && isset($numeric_emoji_index[$value]) |
---|
17 | ) { |
---|
18 | return '[emoji:' . $numeric_emoji_index[$value] . ']'; |
---|
19 | } else { |
---|
20 | return '[' . $value . ']'; |
---|
21 | } |
---|
22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.