Proyectos de Subversion Moodle

Rev

Rev 1287 | Rev 1370 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
118 ariadna 1
<?php
1 efrain 2
defined('MOODLE_INTERNAL') || die();
3
 
1287 ariadna 4
function theme_universe_child_themedir()
1286 ariadna 5
{
6
    global $CFG;
7
 
8
    $teme_dir = '/theme';
9
 
10
    if (isset($CFG->themedir)) {
11
        $teme_dir = $CFG->themedir;
12
        $teme_dir = str_replace($CFG->dirroot, '', $CFG->themedir);
13
    }
14
 
15
    return $teme_dir;
16
}
17
 
138 ariadna 18
function theme_universe_child_get_setting($setting, $format = false)
19
{
20
    $theme = theme_config::load('universe');
21
 
22
    if (empty($theme->settings->$setting)) {
23
        return false;
24
    }
25
 
26
    if (!$format) {
27
        return $theme->settings->$setting;
28
    }
29
 
30
    if ($format === 'format_text') {
31
        return format_text($theme->settings->$setting, FORMAT_PLAIN);
32
    }
33
 
34
    if ($format === 'format_html') {
35
        return format_text($theme->settings->$setting, FORMAT_HTML, array('trusted' => true, 'noclean' => true));
36
    }
37
 
38
    return format_string($theme->settings->$setting);
39
}
40
 
118 ariadna 41
function theme_universe_child_get_pre_scss($theme)
42
{
1 efrain 43
    // Load the settings from the parent.
118 ariadna 44
    $theme = theme_config::load('universe');
1 efrain 45
    // Call the parent themes get_pre_scss function.
118 ariadna 46
    return theme_universe_get_pre_scss($theme);
1 efrain 47
}
1348 ariadna 48
 
49
function theme_universe_child_get_main_scss_content($theme)
50
{
51
    global $CFG;
52
    return theme_universe_get_main_scss_content($theme); // o personalizado
53
}