COP CSS Custom Post Type Lite

Adds a custom post type for implementing theme independent css.

Author:Trevor Green (profile at wordpress.org)
WordPress version required:3.2.1
WordPress version tested:3.2.1
Plugin version:0.2.0
Added to WordPress repository:08-09-2011
Last updated:14-09-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://azuregreencreative.com/cop_css/
Total downloads:1 364
Active installs:10+
plugin download
Click to start download

Adds a custom post type of css that will compile all entries into a single minified css file that will automatically be enqueued to your site.

Minified CSS is stored in a transient for caching.

User now needs ‘edit_themes’ permission to see the css editor. By default this is only the administrator.

Shortcodes

Shortcodes are now processed during compilation of your css.

An new shortcode has been added called:

[meta key=”(name of arbitrary custom field)” post_id=”(optional)”]

This allows you to define a whatever custom fields you like on an individual css post and use them in your css.

Ex. a { color: [meta key=”my_color”]; }

So you can define common elements and use them throughout your css.

If you like you can use the option post_id to put those values from another post. So you can have one master css post with your primary colors and such and referance it in other posts.

Credits

Minification code from http://www.lateralcode.com/css-minifier/

Notes on Function

All css is compiled on save unless the transient has expired. If which case a query is run to compile the css durning rendering.
I may add option to use either a wp_option or a transient based upon user preferance.

Css is compiled by menu_order. I would like to add more options for better sorting.

There is an options page that outputs the css into a textarea so that you can review the final css in the dashboard.

Email me to request customizations trevor@mailagc.com

Future options may also include the ability to write your css to your theme directory. This plugin currently must be active to keep the css available.

I’m trying to follow the path of Mark Jaquith. Read more here.
How to Write a Plugin I’ll use


FAQ
ChangeLog