From 3600bd520df3cf84efc7cd146657eb6e45694d3f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 1 Aug 2005 20:22:42 +0200 Subject: Load plugin javascript Javascript files from plugins called script.js are loaded automatically darcs-hash:20050801182242-7ad00-2bc839c92c54e641347ed1cbeadf8bba3ef6a7a8.gz --- inc/pluginutils.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'inc/pluginutils.php') diff --git a/inc/pluginutils.php b/inc/pluginutils.php index 4988a169c..5fcc6acfe 100644 --- a/inc/pluginutils.php +++ b/inc/pluginutils.php @@ -7,9 +7,9 @@ */ /** - * prints needed HTML to include plugin CSS files + * prints needed HTML to include plugin CSS and JS files */ -function plugin_printCSS(){ +function plugin_printCSSJS(){ $plugins = plugin_list(); foreach ($plugins as $p){ $dir = "lib/plugins/$p/"; @@ -21,6 +21,9 @@ function plugin_printCSS(){ } if(@file_exists(DOKU_INC.$dir.'print.css')){ print ' '."\n"; + } + if(@file_exists(DOKU_INC.$dir.'script.js')){ + print ' '."\n"; } } } -- cgit v1.2.3