From a6012af00d13bdab1806b7ae172d271d4ad9ebe5 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 4 Jun 2016 17:06:12 -0700 Subject: For emojis in posts, extend smilies and save a lot of duplication of effort --- include/text.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 72db9c5ea..5d0010bd5 100644 --- a/include/text.php +++ b/include/text.php @@ -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[] = '' . $e['name'] . ''; + } + } + $params = array('texts' => $texts, 'icons' => $icons); call_hooks('smilie', $params); -- cgit v1.2.3