Proyectos de Subversion Moodle

Rev

Rev 256 | | 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
 
138 ariadna 4
function theme_universe_child_get_setting($setting, $format = false)
5
{
6
    $theme = theme_config::load('universe');
7
 
8
    if (empty($theme->settings->$setting)) {
9
        return false;
10
    }
11
 
12
    if (!$format) {
13
        return $theme->settings->$setting;
14
    }
15
 
16
    if ($format === 'format_text') {
17
        return format_text($theme->settings->$setting, FORMAT_PLAIN);
18
    }
19
 
20
    if ($format === 'format_html') {
21
        return format_text($theme->settings->$setting, FORMAT_HTML, array('trusted' => true, 'noclean' => true));
22
    }
23
 
24
    return format_string($theme->settings->$setting);
25
}
26
 
118 ariadna 27
function theme_universe_child_get_pre_scss($theme)
28
{
1 efrain 29
    // Load the settings from the parent.
118 ariadna 30
    $theme = theme_config::load('universe');
1 efrain 31
    // Call the parent themes get_pre_scss function.
118 ariadna 32
    return theme_universe_get_pre_scss($theme);
1 efrain 33
}