-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstraptworemover.php
47 lines (41 loc) · 1.16 KB
/
bootstraptworemover.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* @author
* @copyright
* @license
*/
defined("_JEXEC") or die("Restricted access");
/**
* Joomla System plugin
*
* @package Joomla.Plugin
* @subpackage System.bootstraptworemover
*/
class plgSystemBootstraptworemover extends JPlugin
{
/**
* Method to catch the onAfterInitialise event.
*
* @return boolean
*
* @since 1.5
*
* @throws InvalidArgumentException
*/
public function onBeforeCompileHead()
{
// Application Object
$app = JFactory::getApplication();
// Frontend
if( $app instanceof JApplicationSite )
{
$doc = JFactory::getDocument();
unset($doc->_scripts[JURI::root(true).'/media/jui/js/jquery.min.js']);
unset($doc->_scripts[JURI::root(true).'/media/jui/js/bootstrap.min.js']);
unset($doc->_scripts[JURI::root(true).'/media/jui/js/jquery-migrate.min.js']);
unset($doc->_styleSheets[JURI::root(true).'/media/jui/css/bootstrap.min.css']);
unset($doc->_styleSheets[JURI::root(true).'/media/jui/css/bootstrap-responsive.min.css']);
unset($doc->_styleSheets[JURI::root(true).'/media/jui/css/bootstrap-extended.css']);
}
}
}