no longer any need for core extensions per se
git-svn-id: file:///home/shish/svn/shimmie2/trunk@253 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
20
ext/load_ext_data/main.php
Normal file
20
ext/load_ext_data/main.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
class LoadExtData extends Extension {
|
||||
public function receive_event($event) {
|
||||
if(is_a($event, 'PageRequestEvent')) {
|
||||
global $page, $config;
|
||||
|
||||
$data_href = $config->get_string("data_href");
|
||||
|
||||
foreach(glob("ext/*/style.css") as $css_file) {
|
||||
$page->add_header("<link rel='stylesheet' href='$data_href/$css_file' type='text/css'>");
|
||||
}
|
||||
|
||||
foreach(glob("ext/*/script.js") as $js_file) {
|
||||
$page->add_header("<script src='$data_href/$js_file' type='text/javascript'></script>");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
add_event_listener(new LoadExtData());
|
||||
?>
|
Reference in New Issue
Block a user