{"id":18725,"date":"2012-06-22T15:40:35","date_gmt":"2012-06-22T15:40:35","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/insert-javascript-css\/"},"modified":"2012-07-26T02:08:04","modified_gmt":"2012-07-26T02:08:04","slug":"insert-javascript-css","status":"publish","type":"plugin","link":"https:\/\/ko.wordpress.org\/plugins\/insert-javascript-css\/","author":39403,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.2","stable_tag":"0.2","tested":"3.4.2","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Insert JavaScript & CSS","header_author":"Ryan Nutt","header_description":"","assets_banners_color":"","last_updated":"2012-07-26 02:08:04","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.nutt.net\/donate\/","header_plugin_uri":"http:\/\/www.nutt.net\/tag\/insert-javascript-css\/","header_author_uri":"http:\/\/www.nutt.net","rating":4.1,"author_block_rating":0,"active_installs":400,"downloads":26599,"num_ratings":10,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"":"<p>Fix so that JS and CSS will load in post types other than post.<\/p>"},"ratings":{"1":"2","2":0,"3":0,"4":"1","5":"7"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1538854","resolution":"2","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1538854","resolution":"3","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1538854","resolution":"1","location":"plugin"}},"screenshots":{"1":"Icon added to the post media area","2":"Form to enter JavaScript","3":"Form to enter CSS"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[356,229,170,86],"plugin_category":[59],"plugin_contributors":[80951],"plugin_business_model":[],"class_list":["post-18725","plugin","type-plugin","status-publish","hentry","plugin_tags-css","plugin_tags-javascript","plugin_tags-page","plugin_tags-post","plugin_category-utilities-and-tools","plugin_contributors-ryannutt","plugin_committers-ryannutt"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/insert-javascript-css.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/insert-javascript-css\/trunk\/screenshot-1.png?rev=1538854","caption":"Icon added to the post media area"},{"src":"https:\/\/ps.w.org\/insert-javascript-css\/trunk\/screenshot-2.png?rev=1538854","caption":"Form to enter JavaScript"},{"src":"https:\/\/ps.w.org\/insert-javascript-css\/trunk\/screenshot-3.png?rev=1538854","caption":"Form to enter CSS"}],"raw_content":"<!--section=description-->\n<p>Easily add custom JavaScript or CSS to a single post or page.<\/p>\n\n<p>When activated, a new icon is added to the post edit page near the icon you use \nto add media to a post. Clicking the new icon brings up a screen where you can \ninsert JavaScript and CSS that will be included with the current post.<\/p>\n\n<p>Anything entered into the text field on the JavaScript tab will be inserted into \nthe &lt;head&gt; section of your web page. Same is true of the CSS tab. This allows \nyou to insert arbitrary JavaScript and CSS into any post or page you would \nlike without having to resort to loading it on all pages.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>insert-javascript-css<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<p>OR<\/p>\n\n<ol>\n<li>Use the plugin installer inside of WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Do I need to wrap in script or style tags?<\/dt>\n<dd><p>Does't matter. If you do, they're left in place. If you don't, they'll be added.<\/p><\/dd>\n<dt>What about archive pages?<\/dt>\n<dd><p>Unless you specifically tell it not to, this plugin will include any JavaScript or CSS \nincluded in a post on archive pages as well.<\/p>\n\n<p>This can lead to conflicts. Take for example two posts, one with <code>body { background: blue; }<\/code>\nand the other with <code>body { background: green; }<\/code>. Whichever post comes last will take priority,\nbut that's probably not what you want.<\/p>\n\n<p>If you add a custom field named <code>ijsc_single_only<\/code> to your post the JavaScript or CSS will\nonly add when <code>is_single()<\/code> is true. It doesn't matter what value you put in <code>ijsc_single_only<\/code>, only\nthat there is a value.<\/p><\/dd>\n<dt>Who can insert JavaScript or CSS<\/dt>\n<dd><p>By default users with the capability upload_files are allowed to insert JavaScript\nor CSS into posts. This seemed to be a logical choice as you need to have a certain level of trust \nfor users to upload files.<\/p>\n\n<p>If you would like to change what capability is required you can edit the <code>IJC_CAPABILITY_REQUIRED<\/code> \nconstant defined in <code>insert-javascript-css.php<\/code> inside the plugin folder.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.2<\/h4>\n\n<p>Fix so CSS and JS will show up in post types other than post.<\/p>\n\n<h4>0.1<\/h4>\n\n<p>Initial release<\/p>","raw_excerpt":"Adds fields to the post and page edit pages that allow you to insert custom JavaScript or CSS for that post or page.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/18725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=18725"}],"author":[{"embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ryannutt"}],"wp:attachment":[{"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=18725"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=18725"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=18725"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=18725"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=18725"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=18725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}