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:
42
e107_themes/bootstrap3/theme_library.php
Normal file
42
e107_themes/bootstrap3/theme_library.php
Normal 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']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user