当前位置: 首页>>代码示例>>PHP>>正文


PHP toolbox::set_headerbackground方法代码示例

本文整理汇总了PHP中theme_essential\toolbox::set_headerbackground方法的典型用法代码示例。如果您正苦于以下问题:PHP toolbox::set_headerbackground方法的具体用法?PHP toolbox::set_headerbackground怎么用?PHP toolbox::set_headerbackground使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在theme_essential\toolbox的用法示例。


在下文中一共展示了toolbox::set_headerbackground方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: theme_essential_process_css


//.........这里部分代码省略.........
    // Set the footer text colour.
    $footertextcolor = \theme_essential\toolbox::get_setting('footerblocktextcolour', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $footertextcolor, '[[setting:footerblocktextcolour]]', '#000000');
    // Set the footer block URL colour.
    $footerurlcolor = \theme_essential\toolbox::get_setting('footerblockurlcolour', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $footerurlcolor, '[[setting:footerblockurlcolour]]', '#000000');
    // Set the footer block hover colour.
    $footerhovercolor = \theme_essential\toolbox::get_setting('footerblockhovercolour', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $footerhovercolor, '[[setting:footerblockhovercolour]]', '#555555');
    // Set the footer separator colour.
    $footersepcolor = \theme_essential\toolbox::get_setting('footersepcolor', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $footersepcolor, '[[setting:footersepcolor]]', '#313131');
    // Set the footer URL colour.
    $footerurlcolor = \theme_essential\toolbox::get_setting('footerurlcolor', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $footerurlcolor, '[[setting:footerurlcolor]]', '#cccccc');
    // Set the footer hover colour.
    $footerhovercolor = \theme_essential\toolbox::get_setting('footerhovercolor', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $footerhovercolor, '[[setting:footerhovercolor]]', '#bbbbbb');
    // Set the slide header colour.
    $slideshowcolor = \theme_essential\toolbox::get_setting('slideshowcolor', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $slideshowcolor, '[[setting:slideshowcolor]]', '#30add1');
    // Set the slide header colour.
    $slideheadercolor = \theme_essential\toolbox::get_setting('slideheadercolor', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $slideheadercolor, '[[setting:slideheadercolor]]', '#30add1');
    // Set the slide caption text colour.
    $slidecaptiontextcolor = \theme_essential\toolbox::get_setting('slidecaptiontextcolor', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $slidecaptiontextcolor, '[[setting:slidecaptiontextcolor]]', '#ffffff');
    // Set the slide caption background colour.
    $slidecaptionbackgroundcolor = \theme_essential\toolbox::get_setting('slidecaptionbackgroundcolor', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $slidecaptionbackgroundcolor, '[[setting:slidecaptionbackgroundcolor]]', '#30add1');
    // Set the slide button colour.
    $slidebuttoncolor = \theme_essential\toolbox::get_setting('slidebuttoncolor', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $slidebuttoncolor, '[[setting:slidebuttoncolor]]', '#30add1');
    // Set the slide button hover colour.
    $slidebuttonhcolor = \theme_essential\toolbox::get_setting('slidebuttonhovercolor', false, $theme);
    $css = \theme_essential\toolbox::set_color($css, $slidebuttonhcolor, '[[setting:slidebuttonhovercolor]]', '#217a94');
    if (\theme_essential\toolbox::get_setting('enablealternativethemecolors1', false, $theme) || \theme_essential\toolbox::get_setting('enablealternativethemecolors2', false, $theme) || \theme_essential\toolbox::get_setting('enablealternativethemecolors3', false, $theme) || \theme_essential\toolbox::get_setting('enablealternativethemecolors4', false, $theme)) {
        // Set theme alternative colours.
        $defaultcolors = array('#a430d1', '#d15430', '#5dd130', '#006b94');
        $defaulthovercolors = array('#9929c4', '#c44c29', '#53c429', '#4090af');
        foreach (range(1, 4) as $alternative) {
            $default = $defaultcolors[$alternative - 1];
            $defaulthover = $defaulthovercolors[$alternative - 1];
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'color' . $alternative, \theme_essential\toolbox::get_setting('alternativethemecolor' . $alternative, false, $theme), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'textcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemetextcolor' . $alternative, false, $theme), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'urlcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeurlcolor' . $alternative, false, $theme), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'iconcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeiconcolor' . $alternative, false, $theme), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'navcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemenavcolor' . $alternative, false, $theme), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'hovercolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemehovercolor' . $alternative, false, $theme), $defaulthover);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footercolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefootercolor' . $alternative, false, $theme), '#30add1');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footertextcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefootertextcolor' . $alternative, false, $theme), '#30add1');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerblockbackgroundcolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterblockbackgroundcolour' . $alternative, false, $theme), '#cccccc');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerblocktextcolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterblocktextcolour' . $alternative, false, $theme), '#000000');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerblockurlcolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterblockurlcolour' . $alternative, false, $theme), '#000000');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerblockhovercolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterblockhovercolour' . $alternative, false, $theme), '#555555');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerheadingcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterheadingcolor' . $alternative, false, $theme), '#cccccc');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footersepcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefootersepcolor' . $alternative, false, $theme), '#313131');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerurlcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterurlcolor' . $alternative, false, $theme), '#cccccc');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerhovercolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterhovercolor' . $alternative, false, $theme), '#bbbbbb');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'slidecaptiontextcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeslidecaptiontextcolor' . $alternative, false, $theme), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'slidecaptionbackgroundcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeslidecaptionbackgroundcolor' . $alternative, false, $theme), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'slidebuttoncolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeslidebuttoncolor' . $alternative, false, $theme), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'slidebuttonhovercolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeslidebuttonhovercolor' . $alternative, false, $theme), $defaulthover);
        }
    }
    // Set the background image for the logo.
    $logo = \theme_essential\toolbox::setting_file_url('logo', 'logo', $theme);
    $css = \theme_essential\toolbox::set_logo($css, $logo);
    // Set the logo height.
    $logoheight = \theme_essential\toolbox::get_setting('logoheight');
    $css = \theme_essential\toolbox::set_logoheight($css, $logoheight);
    // Set the background image for the header.
    $headerbackground = \theme_essential\toolbox::setting_file_url('headerbackground', 'headerbackground', $theme);
    $css = \theme_essential\toolbox::set_headerbackground($css, $headerbackground);
    // Set the background image for the page.
    $pagebackground = \theme_essential\toolbox::setting_file_url('pagebackground', 'pagebackground', $theme);
    $css = \theme_essential\toolbox::set_pagebackground($css, $pagebackground);
    // Set the background style for the page.
    $pagebgstyle = \theme_essential\toolbox::get_setting('pagebackgroundstyle', false, $theme);
    $css = \theme_essential\toolbox::set_pagebackgroundstyle($css, $pagebgstyle);
    // Set marketing height.
    $marketingheight = \theme_essential\toolbox::get_setting('marketingheight', false, $theme);
    $marketingimageheight = \theme_essential\toolbox::get_setting('marketingimageheight');
    $css = \theme_essential\toolbox::set_marketingheight($css, $marketingheight, $marketingimageheight);
    // Set marketing images.
    $setting = 'marketing1image';
    $marketingimage = \theme_essential\toolbox::setting_file_url($setting, $setting, $theme);
    $css = \theme_essential\toolbox::set_marketingimage($css, $marketingimage, $setting);
    $setting = 'marketing2image';
    $marketingimage = \theme_essential\toolbox::setting_file_url($setting, $setting, $theme);
    $css = \theme_essential\toolbox::set_marketingimage($css, $marketingimage, $setting);
    $setting = 'marketing3image';
    $marketingimage = \theme_essential\toolbox::setting_file_url($setting, $setting, $theme);
    $css = \theme_essential\toolbox::set_marketingimage($css, $marketingimage, $setting);
    // Set custom CSS.
    $customcss = \theme_essential\toolbox::get_setting('customcss', false, $theme);
    $css = \theme_essential\toolbox::set_customcss($css, $customcss);
    // Finally return processed CSS.
    return $css;
}
开发者ID:nadavkav,项目名称:moodle-accessibility,代码行数:101,代码来源:lib.php

示例2: theme_essential_process_css


//.........这里部分代码省略.........
    // Set the slide header colour.
    $slideshowcolor = \theme_essential\toolbox::get_setting('slideshowcolor');
    $css = \theme_essential\toolbox::set_color($css, $slideshowcolor, '[[setting:slideshowcolor]]', '#30add1');
    // Set the slide header colour.
    $slideheadercolor = \theme_essential\toolbox::get_setting('slideheadercolor');
    $css = \theme_essential\toolbox::set_color($css, $slideheadercolor, '[[setting:slideheadercolor]]', '#30add1');
    // Set the slide caption text colour.
    $slidecaptiontextcolor = \theme_essential\toolbox::get_setting('slidecaptiontextcolor');
    $css = \theme_essential\toolbox::set_color($css, $slidecaptiontextcolor, '[[setting:slidecaptiontextcolor]]', '#ffffff');
    // Set the slide caption background colour.
    $slidecaptionbackgroundcolor = \theme_essential\toolbox::get_setting('slidecaptionbackgroundcolor');
    $css = \theme_essential\toolbox::set_color($css, $slidecaptionbackgroundcolor, '[[setting:slidecaptionbackgroundcolor]]', '#30add1');
    // Set the slide button colour.
    $slidebuttoncolor = \theme_essential\toolbox::get_setting('slidebuttoncolor');
    $css = \theme_essential\toolbox::set_color($css, $slidebuttoncolor, '[[setting:slidebuttoncolor]]', '#30add1');
    // Set the slide button hover colour.
    $slidebuttonhcolor = \theme_essential\toolbox::get_setting('slidebuttonhovercolor');
    $css = \theme_essential\toolbox::set_color($css, $slidebuttonhcolor, '[[setting:slidebuttonhovercolor]]', '#217a94');
    if (\theme_essential\toolbox::get_setting('enablealternativethemecolors1') || \theme_essential\toolbox::get_setting('enablealternativethemecolors2') || \theme_essential\toolbox::get_setting('enablealternativethemecolors3') || \theme_essential\toolbox::get_setting('enablealternativethemecolors4')) {
        // Set theme alternative colours.
        $defaultcolors = array('#a430d1', '#d15430', '#5dd130', '#006b94');
        $defaulthovercolors = array('#9929c4', '#c44c29', '#53c429', '#4090af');
        foreach (range(1, 4) as $alternative) {
            $default = $defaultcolors[$alternative - 1];
            $defaulthover = $defaulthovercolors[$alternative - 1];
            $alternativethemecolour = \theme_essential\toolbox::get_setting('alternativethemecolor' . $alternative);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'color' . $alternative, $alternativethemecolour, $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'inputfocusbordercolor' . $alternative, $alternativethemecolour, $default, '0.8');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'inputfocusshadowcolor' . $alternative, $alternativethemecolour, $default, '0.6');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'textcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemetextcolor' . $alternative), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'urlcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeurlcolor' . $alternative), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'defaultbuttontextcolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemedefaultbuttontextcolour' . $alternative), '#ffffff');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'defaultbuttontexthovercolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemedefaultbuttontexthovercolour' . $alternative), '#ffffff');
            $alternativethemedefaultbuttonbackgroundcolour = \theme_essential\toolbox::get_setting('alternativethemedefaultbuttonbackgroundcolour' . $alternative);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'defaultbuttonbackgroundcolour' . $alternative, $alternativethemedefaultbuttonbackgroundcolour, '#30add1');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'defaultbuttonbackgroundcolourimage' . $alternative, $alternativethemedefaultbuttonbackgroundcolour, '#30add1');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'defaultbuttonbackgroundcolourrgba' . $alternative, \theme_essential\toolbox::hexadjust($alternativethemedefaultbuttonbackgroundcolour, 10), '#30add1', '0.25');
            $alternativethemedefaultbuttonbackgroundhovercolour = \theme_essential\toolbox::get_setting('alternativethemedefbuttonbackgroundhvrcolour' . $alternative);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'defaultbuttonbackgroundhovercolour' . $alternative, $alternativethemedefaultbuttonbackgroundhovercolour, '#3ad4ff');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'defaultbuttonbackgroundhovercolourimage' . $alternative, $alternativethemedefaultbuttonbackgroundhovercolour, '#3ad4ff');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'defaultbuttonbackgroundhovercolourrgba' . $alternative, \theme_essential\toolbox::hexadjust($alternativethemedefaultbuttonbackgroundhovercolour, 10), '#3ad4ff', '0.25');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'iconcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeiconcolor' . $alternative), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'navcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemenavcolor' . $alternative), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'hovercolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemehovercolor' . $alternative), $defaulthover);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'stripetextcolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemestripetextcolour' . $alternative), '#ffffff');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'stripebackgroundcolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemestripebackgroundcolour' . $alternative), '#ff9a34');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footercolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefootercolor' . $alternative), '#30add1');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footertextcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefootertextcolor' . $alternative), '#30add1');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerblockbackgroundcolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterblockbackgroundcolour' . $alternative), '#cccccc');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerblocktextcolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterblocktextcolour' . $alternative), '#000000');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerblockurlcolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterblockurlcolour' . $alternative), '#000000');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerblockhovercolour' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterblockhovercolour' . $alternative), '#555555');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerheadingcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterheadingcolor' . $alternative), '#cccccc');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footersepcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefootersepcolor' . $alternative), '#313131');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerurlcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterurlcolor' . $alternative), '#cccccc');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'footerhovercolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemefooterhovercolor' . $alternative), '#bbbbbb');
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'slidecaptiontextcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeslidecaptiontextcolor' . $alternative), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'slidecaptionbackgroundcolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeslidecaptionbackgroundcolor' . $alternative), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'slidebuttoncolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeslidebuttoncolor' . $alternative), $default);
            $css = \theme_essential\toolbox::set_alternativecolor($css, 'slidebuttonhovercolor' . $alternative, \theme_essential\toolbox::get_setting('alternativethemeslidebuttonhovercolor' . $alternative), $defaulthover);
        }
    }
    // Set the background image for the logo.
    $logo = \theme_essential\toolbox::setting_file_url('logo', 'logo');
    $css = \theme_essential\toolbox::set_logo($css, $logo);
    // Set the logo width and height.
    $logowidth = \theme_essential\toolbox::get_setting('logowidth');
    $logoheight = \theme_essential\toolbox::get_setting('logoheight');
    $css = \theme_essential\toolbox::set_logodimensions($css, $logowidth, $logoheight);
    // Set the background image for the header.
    $headerbackground = \theme_essential\toolbox::setting_file_url('headerbackground', 'headerbackground');
    $css = \theme_essential\toolbox::set_headerbackground($css, $headerbackground);
    // Set the background image for the page.
    $pagebackground = \theme_essential\toolbox::setting_file_url('pagebackground', 'pagebackground');
    $css = \theme_essential\toolbox::set_pagebackground($css, $pagebackground);
    // Set the background style for the page.
    $pagebgstyle = \theme_essential\toolbox::get_setting('pagebackgroundstyle');
    $css = \theme_essential\toolbox::set_pagebackgroundstyle($css, $pagebgstyle);
    // Set marketing height.
    $marketingheight = \theme_essential\toolbox::get_setting('marketingheight');
    $marketingimageheight = \theme_essential\toolbox::get_setting('marketingimageheight');
    $css = \theme_essential\toolbox::set_marketingheight($css, $marketingheight, $marketingimageheight);
    // Set marketing images.
    $setting = 'marketing1image';
    $marketingimage = \theme_essential\toolbox::setting_file_url($setting, $setting);
    $css = \theme_essential\toolbox::set_marketingimage($css, $marketingimage, $setting);
    $setting = 'marketing2image';
    $marketingimage = \theme_essential\toolbox::setting_file_url($setting, $setting);
    $css = \theme_essential\toolbox::set_marketingimage($css, $marketingimage, $setting);
    $setting = 'marketing3image';
    $marketingimage = \theme_essential\toolbox::setting_file_url($setting, $setting);
    $css = \theme_essential\toolbox::set_marketingimage($css, $marketingimage, $setting);
    // Category course title images.
    $css = \theme_essential\toolbox::set_categorycoursetitleimages($css);
    // Set custom CSS.
    $customcss = \theme_essential\toolbox::get_setting('customcss');
    $css = \theme_essential\toolbox::set_customcss($css, $customcss);
    // Finally return processed CSS.
    return $css;
}
开发者ID:lucisgit,项目名称:moodle-theme_essential,代码行数:101,代码来源:lib.php


注:本文中的theme_essential\toolbox::set_headerbackground方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。