streams/Zotlabs/Widget/Notes.php

28 lines
437 B
PHP
Raw Normal View History

<?php
namespace Zotlabs\Widget;
2019-06-25 00:35:12 +00:00
use Zotlabs\Lib\Apps;
class Notes {
function widget($arr) {
2019-06-25 00:35:12 +00:00
if (! local_channel()) {
return '';
2019-06-25 00:35:12 +00:00
}
if (! Apps::system_app_installed(local_channel(),'Notes')) {
return '';
2019-06-25 00:35:12 +00:00
}
$text = get_pconfig(local_channel(),'notes','text');
2019-06-25 00:35:12 +00:00
$o = replace_macros(get_markup_template('notes.tpl'), [
'$banner' => t('Notes'),
'$text' => $text,
'$save' => t('Save'),
2019-06-25 00:35:12 +00:00
]);
return $o;
}
}