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.
添加自定义帖子类型的CSS,它将所有条目编译到一个缩小的CSS文件中,该文件将自动进入您的网站。 p>
Minified CSS is stored in a transient for caching.
缩小的CSS会存储在瞬态中以便缓存。 p>
User now needs ‘edit_themes’ permission to see the css editor.
用户现在需要具有“ edit_themes”权限才能查看CSS编辑器。
By default this is only the administrator.
默认情况下,这仅是管理员。 p>
Shortcodes
简码 h4>
Shortcodes are now processed during compilation of your css.
现在可以在编译CSS时处理短代码。 p>
An new shortcode has been added called:
已添加一个新的简称: p>
[meta key=”(name of arbitrary custom field)” post_id=”(optional)”]
[meta键=”(任意自定义字段的名称)” post_id =”(可选)”] p>
This allows you to define a whatever custom fields you like on an individual css post and use them in your css.
这使您可以在单个CSS帖子中定义所需的任何自定义字段,并在CSS中使用它们。 p>
Ex.
例如
a { color: [meta key=”my_color”];
{{color:[meta key =“ my_color”];
}
} p>
So you can define common elements and use them throughout your css.
因此,您可以定义通用元素并在整个CSS中使用它们。 p>
If you like you can use the option post_id to put those values from another post.
如果愿意,可以使用选项post_id来放置来自其他帖子的那些值。
So you can have one master css post with your primary colors and such and referance it in other posts.
因此,您可以在主CSS帖子中写上您的原色等,并在其他帖子中引用它。 p>
Credits
信用 h4>
Minification code from http://www.lateralcode.com/css-minifier/
http://www.lateralcode.com/css-minifier/ 中的缩小代码
p>
Notes on Function
功能说明 h4>
All css is compiled on save unless the transient has expired.
除非临时状态已过期,否则所有css均在保存时编译。
If which case a query is run to compile the css durning rendering.
如果是这种情况,将运行查询以编译css裁切渲染。
I may add option to use either a wp_option or a transient based upon user preferance.
我可以根据用户的喜好添加使用wp_option或瞬态的选项。 p>
Css is compiled by menu_order.
Css由menu_order编译。
I would like to add more options for better sorting.
我想添加更多选项以更好地进行排序。 p>
There is an options page that outputs the css into a textarea so that you can review the final css in the dashboard.
有一个选项页面,可将css输出到文本区域,以便您可以在仪表板中查看最终的css。 p>
Email me to request customizations trevor@mailagc.com
给我发送电子邮件以请求自定义 trevor@mailagc.com p>
Future options may also include the ability to write your css to your theme directory.
将来的选项还可能包括将CSS写入主题目录的功能。
This plugin currently must be active to keep the css available.
该插件当前必须处于活动状态,以保持CSS可用。 p>
I’m trying to follow the path of Mark Jaquith.
我正在尝试追随Mark Jaquith的足迹。
Read more here.
在此处了解更多信息。
How to Write a Plugin I如何编写插件'll use
'将使用
p>
p>