{"id":43075,"date":"2011-09-08T08:00:00","date_gmt":"2011-09-08T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/cop-css-custom-post-type-lite\/"},"modified":"2011-09-15T03:00:00","modified_gmt":"2011-09-15T03:00:00","slug":"cop-css-custom-post-type-lite","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/cop-css-custom-post-type-lite\/","title":{"rendered":"COP CSS Custom Post Type Lite"},"content":{"rendered":"<p>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.<\/p>\n<p>Minified CSS is stored in a transient for caching.<\/p>\n<p>User now needs \u2018edit_themes\u2019 permission to see the css editor. By default this is only the administrator.<\/p>\n<h4>Shortcodes<\/h4>\n<p>Shortcodes are now processed during compilation of your css.<\/p>\n<p>An new shortcode has been added called:<\/p>\n<p>[meta key=\u201d(name of arbitrary custom field)\u201d post_id=\u201d(optional)\u201d]<\/p>\n<p>This allows you to define a whatever custom fields you like on an individual css post and use them in your css.<\/p>\n<p>Ex. a { color: [meta key=\u201dmy_color\u201d]; }<\/p>\n<p>So you can define common elements and use them throughout your css.<\/p>\n<p>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.<\/p>\n<h4>Credits<\/h4>\n<p>Minification code from <a href=\"http:\/\/www.lateralcode.com\/css-minifier\/\" rel=\"nofollow ugc\">http:\/\/www.lateralcode.com\/css-minifier\/<\/a><\/p>\n<h4>Notes on Function<\/h4>\n<p>All css is compiled on save unless the transient has expired. If which case a query is run to compile the css durning rendering.<br \/>\nI may add option to use either a wp_option or a transient based upon user preferance.<\/p>\n<p>Css is compiled by menu_order. I would like to add more options for better sorting.<\/p>\n<p>There is an options page that outputs the css into a textarea so that you can review the final css in the dashboard.<\/p>\n<p>Email me to request customizations <a href=\"mailto:trevor@mailagc.com\" rel=\"nofollow ugc\">trevor@mailagc.com<\/a><\/p>\n<p>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.<\/p>\n<p>I\u2019m trying to follow the path of Mark Jaquith. Read more here.<br \/>\n<a href=\"http:\/\/markjaquith.wordpress.com\/2011\/06\/07\/how-to-write-a-plugin-that-ill-use\/\" rel=\"nofollow ugc\">How to Write a Plugin I\u2019ll use<\/a><\/p>\n<p><a href=\"http:\/\/www.azuregreencreative.com\" rel=\"nofollow ugc\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adds a custom post type for implementing theme independent css.<\/p>\n","protected":false},"author":65,"featured_media":257188,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"COP CSS Custom Post Type Lite - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Adds a custom post type for implementing theme independent css."},"footnotes":""},"categories":[1],"tags":[93,954],"class_list":["post-43075","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-css","tag-custom-post-type"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/43075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=43075"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/43075\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/257188"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=43075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=43075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=43075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}