20 lines
471 B
PHP
20 lines
471 B
PHP
|
<?php
|
||
|
|
||
|
class manifest extends rcube_plugin
|
||
|
{
|
||
|
public $task = 'login|mail|settings|addressbook|calendar';
|
||
|
|
||
|
function init()
|
||
|
{
|
||
|
$this->add_hook('render_page', array($this, 'add_manifest'));
|
||
|
}
|
||
|
|
||
|
function add_manifest($p)
|
||
|
{
|
||
|
$manifest_url = $this->url('manifest.json');
|
||
|
$p['content'] = preg_replace('/<head>/', '<head>' . "\n" . ' <link rel="manifest" href="' . $manifest_url . '">', $p['content'], 1);
|
||
|
|
||
|
return $p;
|
||
|
}
|
||
|
}
|