MDL-78806 admin: Setting for displaying site name in page title

* A new config setting `sitenameintitle` for displaying the site name
on the page has been created.
This commit is contained in:
Jun Pataleta 2023-08-03 15:45:47 +08:00
parent d1bc94905e
commit 5c9a0a80fc
No known key found for this signature in database
GPG Key ID: F83510526D99E2C7
2 changed files with 14 additions and 0 deletions

View File

@ -244,6 +244,18 @@ reports,core_reportbuilder|/reportbuilder/index.php',
// "htmlsettings" settingpage
$temp = new admin_settingpage('htmlsettings', new lang_string('htmlsettings', 'admin'));
$sitenameintitleoptions = [
'shortname' => new lang_string('shortname'),
'fullname' => new lang_string('fullname'),
];
$sitenameintitleconfig = new admin_setting_configselect(
'sitenameintitle',
new lang_string('sitenameintitle', 'admin'),
new lang_string('sitenameintitle_help', 'admin'),
'shortname',
$sitenameintitleoptions
);
$temp->add($sitenameintitleconfig);
$temp->add(new admin_setting_configcheckbox('formatstringstriptags', new lang_string('stripalltitletags', 'admin'), new lang_string('configstripalltitletags', 'admin'), 1));
$temp->add(new admin_setting_emoticons());
$ADMIN->add('appearance', $temp);

View File

@ -1252,6 +1252,8 @@ $string['sitemaintenanceon'] = 'Your site is currently in maintenance mode (only
$string['sitemaintenanceoncli'] = 'Your site is currently in CLI maintenance mode, no web access is allowed.';
$string['sitemaintenancewarning'] = 'Your site is currently in maintenance mode (only admins can log in). To return this site to normal operation, <a href="maintenance.php">disable maintenance mode</a>.';
$string['sitemaintenancewarning2'] = 'Your site is currently in maintenance mode (only admins can log in). To return this site to normal operation, <a href="{$a}">disable maintenance mode</a>.';
$string['sitenameintitle'] = 'Include site name in page title';
$string['sitenameintitle_help'] = 'This setting will append the site name at the end of the page title. It is encouraged to include the site name in the page title as it will improve the site\'s accessibility by allowing users to quickly identify the page that they are currently in.';
$string['sitepolicies'] = 'Site security settings';
$string['sitepolicy'] = 'Site policy URL';
$string['sitepolicy_help'] = 'The URL of the site policy that all registered users must see and agree to before accessing the site. Note that this setting will only have an effect if the site policy handler is set to default (core).';