friendica/mod/smilies.php
Hypolite Petovan e36f2bb1fb Use short form array syntax everywhere
- Add short form array syntax to po2php.php generation
2018-01-15 14:07:17 -05:00

26 lines
467 B
PHP

<?php
/**
* @file mod/smilies.php
*/
use Friendica\App;
use Friendica\Content\Smilies;
/**
* @param object $a App
* @return mixed
*/
function smilies_content(App $a)
{
if ($a->argv[1] === "json") {
$tmp = Smilies::getList();
$results = [];
for ($i = 0; $i < count($tmp['texts']); $i++) {
$results[] = ['text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]];
}
json_return_and_die($results);
} else {
return Smilies::replace('', true);
}
}