streams/Code/Module/Comment_control.php

30 lines
769 B
PHP
Raw Normal View History

<?php
2022-02-16 04:08:28 +00:00
namespace Code\Module;
2022-02-16 04:08:28 +00:00
use Code\Lib\Apps;
use Code\Lib\Libsync;
use Code\Web\Controller;
2021-12-02 23:02:31 +00:00
class Comment_control extends Controller
{
2021-12-02 23:02:31 +00:00
public function get()
{
$desc = t('This app allows you to select the comment audience and set a length of time that comments on a particular post will be accepted.');
$text = '<div class="section-content-info-wrapper">' . $desc . '</div>';
2021-12-02 23:02:31 +00:00
if (!(local_channel() && Apps::system_app_installed(local_channel(), 'Comment Control'))) {
return $text;
}
2021-12-02 23:02:31 +00:00
$desc = t('This app is installed. A button to control comments may be found below the post editor.');
2021-12-02 23:02:31 +00:00
$text = '<div class="section-content-info-wrapper">' . $desc . '</div>';
2021-12-02 23:02:31 +00:00
return $text;
}
}