For emojis in posts, extend smilies and save a lot of duplication of effort
This commit is contained in:
@@ -1155,6 +1155,18 @@ function list_smilies() {
|
||||
|
||||
);
|
||||
|
||||
$x = get_config('feature','emoji');
|
||||
if($x === false)
|
||||
$x = 1;
|
||||
if($x) {
|
||||
if(! App::$emojitab)
|
||||
App::$emojitab = json_decode(file_get_contents('library/emoji.json'),true);
|
||||
foreach(App::$emojitab as $e) {
|
||||
$texts[] = $e['shortname'];
|
||||
$icons[] = '<img height="16" width="16" src="images/emoji/' . $e['unicode'] . '.png' . '" alt="' . $e['name'] . '" />';
|
||||
}
|
||||
}
|
||||
|
||||
$params = array('texts' => $texts, 'icons' => $icons);
|
||||
call_hooks('smilie', $params);
|
||||
|
||||
|
Reference in New Issue
Block a user