1
1
Fork 0
friendica_2019-12_sharedHos.../src/Module/Manifest.php

34 lines
683 B
PHP
Raw Normal View History

<?php
namespace Friendica\Module;
use Friendica\BaseModule;
use Friendica\Core\Renderer;
use Friendica\DI;
class Manifest extends BaseModule
{
public static function rawContent(array $parameters = [])
{
$config = DI::config();
$tpl = Renderer::getMarkupTemplate('manifest.tpl');
header('Content-type: application/manifest+json');
$touch_icon = $config->get('system', 'touch_icon', 'images/friendica-128.png');
if ($touch_icon == '') {
$touch_icon = 'images/friendica-128.png';
}
$output = Renderer::replaceMacros($tpl, [
'$touch_icon' => $touch_icon,
'$title' => $config->get('config', 'sitename', 'Friendica'),
]);
echo $output;
exit();
}
}