Elgg  Version master
security_txt.php
Go to the documentation of this file.
1 <?php
9 $params['selected'] = 'security_txt';
10 echo elgg_view('admin/security/tabs', $params);
11 
12 echo elgg_view('output/longtext', [
13  'value' => elgg_echo('admin:security:security_txt:description', [
14  elgg_view_url('https://securitytxt.org/'),
15  elgg_view_url(elgg_generate_url('security.txt')),
16  ]),
17 ]);
18 
19 $expires = elgg_get_config('security_txt_expires');
20 if (!empty($expires) && $expires < time()) {
21  echo elgg_view_message('warning', elgg_echo('admin:security:security_txt:expired'));
22 }
23 
24 echo elgg_view_form('admin/security/security_txt', [
25  'enable_sticky' => true,
26 ]);
elgg_view_form(string $action, array $form_vars=[], array $body_vars=[])
Definition: views.php:1054
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$params
Configure the contents of the security.txt endpoint.
Definition: security_txt.php:8
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:177
$expires
$vars
Definition: theme.php:5
elgg_view_url(string $href, string $text=null, array $options=[])
Helper function for outputting urls.
Definition: views.php:1448
elgg_view_message(string $type, string $body, array $vars=[])
Wrapper function for the message display pattern.
Definition: views.php:961
elgg_generate_url(string $name, array $parameters=[])
Generate a URL for named route.