{"id":24618,"date":"2013-08-07T03:07:48","date_gmt":"2013-08-07T03:07:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/dependency-minification\/"},"modified":"2015-02-25T01:46:46","modified_gmt":"2015-02-25T01:46:46","slug":"dependency-minification","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/dependency-minification\/","author":186678,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.9.8","stable_tag":"trunk","tested":"3.7.41","requires":"3.5","requires_php":"","requires_plugins":"","header_name":"Dependency Minification","header_author":"X-Team","header_description":"","assets_banners_color":"","last_updated":"2015-02-25 01:46:46","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"http:\/\/x-team.com\/wordpress\/","rating":4,"author_block_rating":0,"active_installs":30,"downloads":17029,"num_ratings":11,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":"2","2":"1","3":0,"4":0,"5":"8"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3868,21107,23027,1736,247],"plugin_category":[52,54,59],"plugin_contributors":[80699,80063,77890,78133,80700,80698,78438,78325],"plugin_business_model":[],"class_list":["post-24618","plugin","type-plugin","status-publish","hentry","plugin_tags-compress","plugin_tags-concatenate","plugin_tags-dependencies","plugin_tags-minify","plugin_tags-performance","plugin_category-performance","plugin_category-security-and-spam-protection","plugin_category-utilities-and-tools","plugin_contributors-alex-ye","plugin_contributors-c3mdigital","plugin_contributors-fjarrett","plugin_contributors-kucrut","plugin_contributors-lkraav","plugin_contributors-shadyvb","plugin_contributors-westonruter","plugin_contributors-xwp","plugin_committers-westonruter"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/dependency-minification.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin takes all scripts and stylesheets that have been added via <code>wp_enqueue_script<\/code> and <code>wp_enqueue_style<\/code>\nand <em>automatically<\/em> concatenates and minifies them into logical groups. For example, scripts in the footer get grouped\ntogether and styles with the same media (e.g. <code>print<\/code>) get minified together. Minification is done via WP-Cron in order\nto prevent race conditions and to ensure that the minification process does not slow down page responses.<\/p>\n\n<p>This is a reincarnation and rewrite of the <a href=\"http:\/\/wordpress.org\/plugins\/optimize-scripts\/\">Optimize Scripts<\/a> plugin,\nwhich this plugin now supersedes.<\/p>\n\n<p><strong>Features:<\/strong><\/p>\n\n<ul>\n<li>Minified sources are stored in the WP Options table so no special filesystem access is required.<\/li>\n<li>Endpoint for minified requests is at <code>\/_minified<\/code>, which can be configured.<\/li>\n<li>Admin page for taking inventory of minified scripts and stylesheets, with methods for expiring or purging the cached data.<\/li>\n<li>Dependencies which must not be minified may be excluded via the <code>dependency_minification_excluded<\/code> filter.<\/li>\n<li>Dependencies hosted on other domains are by default excluded, but this behavior can be changed by filtering the <code>default_exclude_remote_dependencies<\/code> option via the <code>dependency_minification_options<\/code> filter, or on a case-by-case basis via the filter previously mentioned.<\/li>\n<li>By default excludes external scripts from being concatenated and minified, but they can be opted in via the <code>dependency_minification_excluded<\/code> filter.<\/li>\n<li>The length of time that a minified source is cached defaults to 1 month, but can be configured via the <code>cache_control_max_age_cache<\/code> option.<\/li>\n<li>If a minified source is not available yet, the page source will note that the dependency minification process is pending.<\/li>\n<li>Any errors that occur during minification will be shown on the frontend in comments if the <code>show_error_messages<\/code> option is enabled; such errors are enabled by default if <code>WP_DEBUG<\/code>.<\/li>\n<li>If the minification process errors out, the original unminified sources are served and the error is cached for 1 hour (by default, configured via <code>cache_control_max_age_error<\/code>) to prevent back-to-back crons from continually attempting to minify in perpetuity.<\/li>\n<li>Cached minified sources are served with <code>Last-Modified<\/code> and <code>ETag<\/code> responses headers and requests will honor <code>If-None-Match<\/code> and <code>If-Modified-Since<\/code> to return <code>304 Not Modified<\/code> responses (configurable via the <code>allow_not_modified_responses<\/code> option).<\/li>\n<li>Data attached to scripts (e.g. via <code>wp_localize_script<\/code>) is also concatenated together and attached to the newly-minified script.<\/li>\n<li>WP-Cron is utilized to initiate the minification process in order to prevent race conditions, and to ensure that page responses aren't slowed down.<\/li>\n<li>Stale minified scripts and stylesheets remain until replaced by refreshed ones; this ensures that full-page caches which reference stale minified sources won't result in any 404s.<\/li>\n<li>Can serve compressed responses with <code>gzip<\/code> or <code>deflate<\/code>.<\/li>\n<li>Transforms relatives paths in stylesheets (e.g. background-images) to absolute ones, so that they don't 404.<\/li>\n<\/ul>\n\n<p><strong>Development of this plugin is done <a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\">on GitHub<\/a>. Pull requests welcome. Please see <a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\/issues\">issues<\/a> reported there before going to the plugin forum.<\/strong><\/p>\n\n<p>If you are using Nginx with the default Varying Vagrant Vagrants config, you'll want to remove <code>css|js<\/code> from this rule in <code>nginx-wp-common.conf<\/code> (or remove the rule altogether):<\/p>\n\n<pre><code># Handle all static assets by serving the file directly. Add directives \n# to send expires headers and turn off 404 error logging.\nlocation ~* \\.(js|css|png|jpg|jpeg|gif|ico)$ {\n    expires 24h;\n    log_not_found off;\n}\n<\/code><\/pre>\n\n<!--section=changelog-->\n<h4>0.9.8<\/h4>\n\n<ul>\n<li>Fix rewrite rule broken by filtering home_url (<a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\/pull\/49\">#49<\/a>). Props <a href=\"http:\/\/profiles.wordpress.org\/c3mdigital\/\">c3mdigital<\/a>.<\/li>\n<li>Switch from JSMin to JSMinPlus due to repeated issues with JSMin causing execution timeouts.<\/li>\n<li>Update plugin to indicate WordPress 3.8 compatibility.<\/li>\n<li>Fix expire and purge links.<\/li>\n<\/ul>\n\n<h4>0.9.7<\/h4>\n\n<p>Improve how the plugin guesses the sources' absolute paths (<a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\/pull\/34\">#34<\/a>). Props <a href=\"http:\/\/profiles.wordpress.org\/alex-ye\/\">alex-ye<\/a>.<\/p>\n\n<h4>0.9.6<\/h4>\n\n<p>Improve network activation and deactivation (<a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\/pull\/37\">#37<\/a>). Props <a href=\"http:\/\/profiles.wordpress.org\/kucrut\/\">kucrut<\/a>.<\/p>\n\n<h4>0.9.5<\/h4>\n\n<p>Fix wp_localize_script data lost in minification (<a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\/issues\/28\">#28<\/a>). Props <a href=\"http:\/\/profiles.wordpress.org\/lkraav\/\">lkraav<\/a>.<\/p>\n\n<h4>0.9.4<\/h4>\n\n<p>Issue warning if pretty permalinks are not enabled (<a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\/issues\/16\">#16<\/a>). Props <a href=\"http:\/\/profiles.wordpress.org\/shadyvb\/\">shadyvb<\/a>.<\/p>\n\n<h4>0.9.3<\/h4>\n\n<p>Prevent default built-in scripts from breaking minification groups (<a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\/issues\/9\">#9<\/a>). Props <a href=\"http:\/\/profiles.wordpress.org\/shadyvb\/\">shadyvb<\/a>.<\/p>\n\n<h4>0.9.2<\/h4>\n\n<p>Show alert if WP_DEBUG is disabling dependency minification (<a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\/issues\/12\">#12<\/a>). Props <a href=\"http:\/\/profiles.wordpress.org\/c3mdigital\/\">c3mdigital<\/a>.<\/p>\n\n<h4>0.9.1<\/h4>\n\n<p>Add a settings link to the list of plugin action links (<a href=\"https:\/\/github.com\/x-team\/wp-dependency-minification\/issues\/13\">#13<\/a>). Props <a href=\"http:\/\/profiles.wordpress.org\/fjarrett\/\">fjarrett<\/a>.<\/p>\n\n<h4>0.9 beta<\/h4>\n\n<p>First Release<\/p>","raw_excerpt":"Automatically concatenates and minifies any scripts and stylesheets enqueued using the standard dependency system.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/24618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=24618"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/westonruter"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=24618"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=24618"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=24618"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=24618"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=24618"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=24618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}