mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
Merge branch 'MDL-81512-main' of https://github.com/mickhawkins/moodle
This commit is contained in:
commit
978f3d42e5
@ -349,14 +349,17 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
|
||||
new lang_string('themeselector', 'admin'), $CFG->wwwroot . '/admin/themeselector.php'));
|
||||
|
||||
// Settings page for each theme.
|
||||
$ADMIN->add('appearance', new admin_category('themes', new lang_string('themesettingscustom', 'admin')));
|
||||
foreach (core_component::get_plugin_list('theme') as $theme => $themedir) {
|
||||
$settingspath = "$themedir/settings.php";
|
||||
if (file_exists($settingspath)) {
|
||||
$settings = new admin_externalpage('themesetting' . $theme, new lang_string('pluginname', 'theme_'.$theme),
|
||||
new moodle_url($settingspath), 'moodle/site:config', true);
|
||||
$settings = new admin_settingpage("themesetting$theme", new lang_string('pluginname', "theme_$theme"),
|
||||
'moodle/site:config', true
|
||||
);
|
||||
include($settingspath);
|
||||
if ($settings) {
|
||||
$ADMIN->add('appearance', $settings);
|
||||
// Add settings if not hidden (to avoid displaying the section if it appears empty in the UI).
|
||||
if ($settings && !$settings->hidden) {
|
||||
$ADMIN->add('themes', $settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1458,6 +1458,7 @@ $string['themeresetcaches'] = 'Clear theme caches';
|
||||
$string['themeselect'] = 'Change theme';
|
||||
$string['themeselector'] = 'Themes';
|
||||
$string['themesettingsadvanced'] = 'Advanced theme settings';
|
||||
$string['themesettingscustom'] = 'Custom theme settings';
|
||||
$string['themeeditsettingsname'] = 'Edit theme settings \'{$a}\'';
|
||||
$string['themesettingsname'] = 'Theme settings \'{$a}\'';
|
||||
$string['themeusagereportname'] = 'Theme usage report \'{$a}\'';
|
||||
|
Loading…
x
Reference in New Issue
Block a user