1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00
php-e107/e107_themes/bootstrap3/theme_library.php

49 lines
990 B
PHP
Raw Normal View History

<?php
/**
* e107 website system
*
* Copyright (C) 2008-2017 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* @file
* Provides information about external libraries.
*/
/**
2017-01-27 22:22:17 +01:00
* Class theme_library.
*/
2017-01-27 10:20:25 -08:00
class theme_library
{
/**
* Provides information about external libraries.
*/
function config()
{
// TODO - bootswatch...
return array();
}
2020-04-28 14:16:38 -07:00
/**
* Alters library information before detection and caching takes place.
* @param $libraries
*/
function config_alter(&$libraries)
{
$bootswatch = e107::pref('theme', 'bootswatch', false);
if(!empty($bootswatch))
{
// Disable Bootstrap CSS.
unset($libraries['cdn.bootstrap']['files']['css']);
unset($libraries['cdn.bootstrap']['variants']['dev']['files']['css']);
unset($libraries['bootstrap']['files']['css']);
unset($libraries['bootstrap']['variants']['dev']['files']['css']);
}
}
}