1 |
efrain |
1 |
<?php
|
|
|
2 |
// This file is part of Moodle - http://moodle.org/
|
|
|
3 |
//
|
|
|
4 |
// Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
// it under the terms of the GNU General Public License as published by
|
|
|
6 |
// the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
// (at your option) any later version.
|
|
|
8 |
//
|
|
|
9 |
// Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
// GNU General Public License for more details.
|
|
|
13 |
//
|
|
|
14 |
// You should have received a copy of the GNU General Public License
|
|
|
15 |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
|
|
|
17 |
/**
|
|
|
18 |
*
|
|
|
19 |
* @package theme_monocolor
|
|
|
20 |
* @copyright 2022 - 2023 Marcin Czaja (https://rosea.io)
|
|
|
21 |
* @license Commercial https://themeforest.net/licenses
|
|
|
22 |
*
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
defined('MOODLE_INTERNAL') || die();
|
|
|
27 |
|
|
|
28 |
$page = new admin_settingpage('theme_monocolor_seo', get_string('seosettings', 'theme_monocolor'));
|
|
|
29 |
|
|
|
30 |
// Favicon setting.
|
|
|
31 |
$name = 'theme_monocolor/favicon';
|
|
|
32 |
$title = get_string('favicon', 'theme_monocolor');
|
|
|
33 |
$description = get_string('favicon_desc', 'theme_monocolor');
|
|
|
34 |
$opts = array('accepted_types' => array('.ico'), 'maxfiles' => 1);
|
|
|
35 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'favicon', 0, $opts);
|
|
|
36 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
37 |
$page->add($setting);
|
|
|
38 |
|
|
|
39 |
$name = 'theme_monocolor/favicon16';
|
|
|
40 |
$title = get_string('favicon16', 'theme_monocolor');
|
|
|
41 |
$description = get_string('empty_desc', 'theme_monocolor');
|
|
|
42 |
$opts = array('accepted_types' => array('.png'), 'maxfiles' => 1);
|
|
|
43 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'favicon16', 0, $opts);
|
|
|
44 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
45 |
$page->add($setting);
|
|
|
46 |
|
|
|
47 |
$name = 'theme_monocolor/favicon32';
|
|
|
48 |
$title = get_string('favicon32', 'theme_monocolor');
|
|
|
49 |
$description = get_string('empty_desc', 'theme_monocolor');
|
|
|
50 |
$opts = array('accepted_types' => array('.png'), 'maxfiles' => 1);
|
|
|
51 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'favicon32', 0, $opts);
|
|
|
52 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
53 |
$page->add($setting);
|
|
|
54 |
|
|
|
55 |
$name = 'theme_monocolor/faviconsafaritab';
|
|
|
56 |
$title = get_string('faviconsafaritab', 'theme_monocolor');
|
|
|
57 |
$description = get_string('empty_desc', 'theme_monocolor');
|
|
|
58 |
$opts = array('accepted_types' => array('.svg'), 'maxfiles' => 1);
|
|
|
59 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'faviconsafaritab', 0, $opts);
|
|
|
60 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
61 |
$page->add($setting);
|
|
|
62 |
|
|
|
63 |
$name = 'theme_monocolor/faviconsafaritabcolor';
|
|
|
64 |
$title = get_string('faviconsafaritabcolor', 'theme_monocolor');
|
|
|
65 |
$description = get_string('empty_desc', 'theme_monocolor');
|
|
|
66 |
$default = '#000000';
|
|
|
67 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
68 |
$page->add($setting);
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
// Apple Touch Icon.
|
|
|
72 |
$name = 'theme_monocolor/seoappletouchicon';
|
|
|
73 |
$title = get_string('seoappletouchicon', 'theme_monocolor');
|
|
|
74 |
$description = get_string('seoappletouchicon_desc', 'theme_monocolor');
|
|
|
75 |
$opts = array('accepted_types' => array('.png'), 'maxfiles' => 1);
|
|
|
76 |
$setting = new admin_setting_configstoredfile($name, $title, $description, 'seoappletouchicon');
|
|
|
77 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
78 |
$page->add($setting);
|
|
|
79 |
|
|
|
80 |
$name = 'theme_monocolor/seometadesc';
|
|
|
81 |
$title = get_string('seometadesc', 'theme_monocolor');
|
|
|
82 |
$description = get_string('seometadesc_desc', 'theme_monocolor');
|
|
|
83 |
$default = '';
|
|
|
84 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
85 |
$page->add($setting);
|
|
|
86 |
|
|
|
87 |
$name = 'theme_monocolor/seothemecolor';
|
|
|
88 |
$title = get_string('seothemecolor', 'theme_monocolor');
|
|
|
89 |
$description = get_string('seothemecolor_desc', 'theme_monocolor');
|
|
|
90 |
$default = '';
|
|
|
91 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
92 |
$page->add($setting);
|
|
|
93 |
|
|
|
94 |
$settings->add($page);
|