{"id":29380,"date":"2014-05-10T07:18:41","date_gmt":"2014-05-10T07:18:41","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/remove-css-link-ids\/"},"modified":"2014-12-31T09:27:16","modified_gmt":"2014-12-31T09:27:16","slug":"remove-css-link-ids","status":"publish","type":"plugin","link":"https:\/\/pap-aw.wordpress.org\/plugins\/remove-css-link-ids\/","author":2999989,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.1","stable_tag":"1.0.1","tested":"3.9.40","requires":"3.8","requires_php":"","requires_plugins":"","header_name":"Remove CSS link IDs","header_author":"Primoz Cigler","header_description":"","assets_banners_color":"","last_updated":"2014-12-31 09:27:16","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.proteusnet.com\/blog","header_author_uri":"http:\/\/twitter.com\/primozcigler","rating":5,"author_block_rating":0,"active_installs":30,"downloads":2479,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[9032,356,23414,2302,3874],"plugin_category":[52,59],"plugin_contributors":[79412],"plugin_business_model":[],"class_list":["post-29380","plugin","type-plugin","status-publish","hentry","plugin_tags-attributes","plugin_tags-css","plugin_tags-enqueue","plugin_tags-id","plugin_tags-mod_pagespeed","plugin_category-performance","plugin_category-utilities-and-tools","plugin_contributors-cyman","plugin_committers-cyman"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/remove-css-link-ids.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This simple plugin hooks to the <code>wp_enqueue_scripts<\/code> and removed the <code>id='&lt;handle of the css file&gt;-css'<\/code> attribute. Most of the time you don't need these IDs anyway.<\/p>\n\n<p>I am using the <a href=\"https:\/\/developers.google.com\/speed\/pagespeed\/module\">mod_pagespeed<\/a> module on my server and the <code>combine_css<\/code> filter doesn't work if the <code>&lt;link&gt;<\/code> tags have ID attributes. So based on <a href=\"https:\/\/blog.codecentric.de\/en\/2011\/10\/wordpress-and-mod_pagespeed-why-combine_css-does-not-work\/\">this blog post<\/a> I created a very very simple (basically one-liner) plugin that removes the ID attribute using regex.<\/p>\n\n<p>There is also a very simple unit test for it, created using wp-cli: <code>wp scaffod plugin ...<\/code>.<\/p>\n\n<p>Enjoy the speedy sites! :)<\/p>\n\n<p>Do you want to contribute? Great! Please fork <a href=\"https:\/\/github.com\/primozcigler\/remove-css-ids\">this repository<\/a>, make the changes and create a pull request.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Unzip <code>remove-css-link-ids.zip<\/code> and upload unzipped folder 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<!--section=faq-->\n<dl>\n<dt>A question that someone might have?<\/dt>\n<dd><p>No questions asked yet.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release<\/li>\n<\/ul>","raw_excerpt":"WP plugin that removes the ID attributes from the  tags for the CSS files. Used mostly together with mod_pagespeed.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/29380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=29380"}],"author":[{"embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cyman"}],"wp:attachment":[{"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=29380"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=29380"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=29380"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=29380"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=29380"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pap-aw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=29380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}