1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-01 02:21:58 +02:00

Use Library Manager to handle core libraries.

This commit is contained in:
lonalore
2017-01-26 12:45:45 +01:00
parent 7ef1d13b35
commit 7c0c0cd2f1
160 changed files with 22190 additions and 3024 deletions

View File

@@ -0,0 +1,42 @@
<?php
/**
* @file
* Provides information about external libraries.
*/
/**
* Class bootstrap3_library.
*/
class bootstrap3_library
{
/**
* Provides information about external libraries.
*/
function config()
{
$libraries = array();
return $libraries;
}
/**
* Alter the library information before detection and caching takes place.
*/
function config_alter(&$libraries)
{
$bootswatch = e107::pref('theme', 'bootswatch', false);
if($bootswatch)
{
// Disable Bootstrap CSS.
unset($libraries['cdn.bootstrap']['files']['css']);
unset($libraries['cdn.bootstrap']['variants']['minified']['files']['css']);
unset($libraries['bootstrap']['files']['css']);
unset($libraries['bootstrap']['variants']['minified']['files']['css']);
}
}
}