Template Provisioning

The Template Provisioning plugin automatically links each blog page to .css and .js files that correspond to its template.

Author:Jason Tremblay (profile at wordpress.org)
WordPress version required:2.8
WordPress version tested:3.0.5
Plugin version:0.2.5
Added to WordPress repository:18-07-2009
Last updated:13-02-2011
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://www.bigbigtech.com/wordpress-plugins/t...
Total downloads:1 556
Active installs:10+
plugin download
Click to start download

Overview

The Template Provisioning plugin automatically links to stylesheet and javascript files in your theme directories based on the template file that renders a page. It searches in several pre-defined locations for files, and includes whichever files are found.

I wrote this plugin because I prefer this method to using WordPress's conditional tags in my header. Keeping resources for different templates separate helps me keep my custom theme directories clean and organized.

For example, if I have a custom template "map.php" that is being used by a static page, I can create "css/map.css" and "js/map.js" files and they'll be automatically linked-up by this plugin.

Requirements

Will this plugin work with your theme? Probably. It's completely additive, and doesn't change anything that would affect other plugins. I have been using most of this code since WordPress 2.5 or so. But be warned... I haven't thoroughly tested it across versions of WordPress. I'll try to do that soon and post the results.