Elgg  Version 2.3
security.php
Go to the documentation of this file.
1 <?php
7 $current_strength = elgg_echo('site_secret:current_strength');
8 $strength_text = elgg_echo("site_secret:strength:$strength");
9 $strength_msg = elgg_echo("site_secret:strength_msg:$strength");
10 
11 $body = '<p>' . elgg_echo('admin:site:secret:intro') . '</p>';
12 $body .= elgg_view_module('main', "$current_strength: $strength_text", $strength_msg, [
13  'class' => ($strength != 'strong') ? 'elgg-message elgg-state-error' : 'elgg-message elgg-state-success',
14 ]);
15 
17  '#type' => 'checkbox',
18  'label' => elgg_echo('admin:site:secret:regenerate'),
19  'value' => 1,
20  'name' => 'regenerate_site_secret',
21  '#help' => elgg_echo('admin:site:secret:regenerate:help'),
22 ]);
23 
24 echo elgg_view_module('inline', elgg_echo('admin:legend:security'), $body, ['id' => 'elgg-settings-advanced-security']);
$body
Definition: security.php:11
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1424
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$strength_msg
Definition: security.php:9
$strength
Advanced site settings, site section.
Definition: security.php:6
elgg echo
Translates a string.
Definition: languages.js:48
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1250
_elgg_get_site_secret_strength()
Get the strength of the site secret.
Definition: actions.php:215
$current_strength
Definition: security.php:7
$strength_text
Definition: security.php:8