feel free to keep it strictly simple...
get_page_headers

Function get_page_headers() completely replaces the old, meanwhile deleted function register_frontend_modfiles().

Only include the function in the HEAD-part of the template:

 

 

 <html>
   <head>
   <?php get_page_headers(); ?>
   ...more...
   </head>
   <body>
   ...
   </body>
 </html> 

 

The function is downward compatible and automatically loads the following files of all modules used on a page (if exist):

 

CSS files

  • module/frontend.css (media: all)
  • module/css/frontend.css (media: all)
  • template/page_id.css (media: all)
  • template/css/page_id.css (media: all)

 

JavaScript files

  • module/frontend.js
  • module/js/frontend.js
  • template/frontend.js
  • template/js/frontend.js

 

In addition, every module may deliver a configuration file headers.inc.php to define additional header info.