Title: COP CSS Custom Post Type Lite
Author: Trevor Green
Published: <strong>2011 年 9 月 8 日</strong>
Last modified: 2011 年 9 月 14 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/cop-css-custom-post-type-lite.svg)

# COP CSS Custom Post Type Lite

 作者：[Trevor Green](https://profiles.wordpress.org/trevogre/)

[下载](https://downloads.wordpress.org/plugin/cop-css-custom-post-type-lite.zip)

 * [详情](https://cn.wordpress.org/plugins/cop-css-custom-post-type-lite/#description)
 * [评价](https://cn.wordpress.org/plugins/cop-css-custom-post-type-lite/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/cop-css-custom-post-type-lite/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/cop-css-custom-post-type-lite/#developers)

 [支持](https://wordpress.org/support/plugin/cop-css-custom-post-type-lite/)

## 描述

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/](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](https://cn.wordpress.org/plugins/cop-css-custom-post-type-lite/trevor@mailagc.com?output_format=md)

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](http://markjaquith.wordpress.com/2011/06/07/how-to-write-a-plugin-that-ill-use/)

## 安装

Extract the zip file and just drop the contents in the wp-content/plugins/ directory
of your WordPress installation and then activate the Plugin from Plugins page.

## 常见问题

Questions Please.

## 评价

此插件暂无评价。

## 贡献者及开发者

「COP CSS Custom Post Type Lite」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Trevor Green ](https://profiles.wordpress.org/trevogre/)

[帮助将「COP CSS Custom Post Type Lite」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/cop-css-custom-post-type-lite)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/cop-css-custom-post-type-lite/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/cop-css-custom-post-type-lite/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/cop-css-custom-post-type-lite/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/cop-css-custom-post-type-lite/)。

## 更新日志

0.2.0

Bug Fixes to hook registration

0.1.9

Began adding shortcodes to css.
 Added [meta key=”(arbitrary custom field)”]

0.1.8

Fixed preview using option instead of transient.
 Added check for permission to ‘
edit_themes’ before loading interface.

0.1.7

Initial Public Version

## 额外信息

 *  版本 **0.2.0**
 *  最后更新：**15 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.2.1 或更高版本 **
 *  已测试的最高版本为 **3.2.1**
 *  语言
 * [English (US)](https://wordpress.org/plugins/cop-css-custom-post-type-lite/)
 * 标签
 * [css](https://cn.wordpress.org/plugins/tags/css/)[custom post type](https://cn.wordpress.org/plugins/tags/custom-post-type/)
 *  [高级视图](https://cn.wordpress.org/plugins/cop-css-custom-post-type-lite/advanced/)

## 评级

尚未提交反馈。

[您的评价](https://wordpress.org/support/plugin/cop-css-custom-post-type-lite/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/cop-css-custom-post-type-lite/reviews/)

## 贡献者

 *   [ Trevor Green ](https://profiles.wordpress.org/trevogre/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/cop-css-custom-post-type-lite/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.azuregreencreative.com)