=== Aggregator ===
Contributors: palasthotel, janaeggebrecht, edwardbock
Donate link: http://palasthotel.de/
Tags: aggregator, seo, javascript
Requires at least: 4.8
Tested up to: 7.0.2
Stable tag: 2.2.0
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl

This plugin is no longer maintained. Please deactivate and delete it.

== Description ==

**This plugin has reached the end of its life and receives no further updates. Please deactivate and delete it.**

It aggregated a site's local JavaScript files into one header and one footer request, back when the number of requests was what made a page slow. That has not been true for years, and on a current WordPress the plugin now does more harm than good.

= Why it is being retired =

**HTTP/2 removed the reason it existed.** Bundling files was a way around HTTP/1.1, which opened a new connection per file. HTTP/2 and HTTP/3 send many files over one connection, so a handful of separate scripts costs next to nothing - while one big bundle has to be re-downloaded in full whenever any part of it changes.

**WordPress does the job itself now.** Since 6.3 a script can be registered with `defer` or `async` (`wp_script_add_data( $handle, 'strategy', 'defer' )`), which is a better answer to blocking scripts than merging them. Since 6.5 there are script modules, a separate registry this plugin never touched at all - so on a modern block theme part of the JavaScript was never aggregated in the first place.

**And it breaks pages.** Measured on WordPress 7.0.2 with version 2.1.2:

* Anything added with `wp_add_inline_script()` is **silently dropped**. Both `before` and `after` code disappear. WordPress itself and a great many plugins pass configuration to their scripts this way, so this can leave a page with script files that never get their settings.
* A `defer` or `async` strategy is **lost**. Scripts that were meant not to block rendering end up inside a bundle that does.

`wp_localize_script()` data survives - the plugin re-renders it itself - which is why the damage is not always obvious.

= What to do instead =

Deactivate and delete the plugin. Nothing needs to replace it: WordPress serves the individual files again, which is the right thing over HTTP/2. If single scripts block rendering, register them with a `defer` strategy.

The aggregated files the plugin wrote are left behind on purpose so nothing breaks mid-request. They can be deleted afterwards - by default in `wp-content/uploads/aggregated/`, or in your theme directory if that was configured under **Settings › Aggregator**.

== Installation ==

Do not install this plugin. It is no longer maintained.

== Frequently Asked Questions ==

= Will my site get slower without it? =

Almost certainly not. Over HTTP/2 the individual files are fetched over the same connection, and they cache separately - so a change to one script no longer invalidates all of them.

= Is there a successor? =

No, and none is planned. What this plugin did is either unnecessary now or better handled by WordPress itself.

== Changelog ==

= 2.2.0 =
* This plugin is no longer maintained. Please deactivate and delete it. See the description for why, and for what to do instead.
* No code changes: the behaviour of 2.1.2 is unchanged, so nothing shifts underneath a site that is still running it.

= 2.1.2 =
* PHP 7.3 compatibility update

= 2.1.1 =
* only add aggregated file if not empty
* tiny refactorings

= 2.1 =
* additional attributes for script tags

= 2.0.4 =
* localize scripts on wp_print_scripts action fix

= 2.0.3 =
* main php file rename
* external scripts with https:// and // fix aggregation fix

= 2.0.2 =
* typos fixed (hook name and html comments)

= 2.0.1 =
* rerender on javascript content file changes

= 2.0 =
* we can handle different aggregation combinations now
* scripts need to be rerendered
* Hook `ph_aggregator_ignore` is marked as deprecated, please make sure to update your code to use the new hook `aggregator_ignore`, which provides a js handle argument.

= 1.1.4 =
* added try catch blocks around each javascript file to prevent script execution after an error

= 1.1.3 =
* wp_enqueue with aggregated files time as version

= 1.1.2 =
* get correct working theme directory

= 1.1.1 =
* default to uploads
* theme slug for aggregated scripts

= 1.1 =
* aggregated location configuratable
* object orientation implemented

= 1.0.8 =
* localization data for aggregated scripts fix

= 1.0.7 =
* dequeue wrong scripts fix

= 1.0.6 =
* new rules

= 1.0.5 =
* aggregated folder in plugin deprecated

= 1.0.4 =
* aggregation to theme directory

= 1.0.3 =
* when to aggregate optimization

= 1.0.2 =
* aggregate to subfolder to prevent deployment issues

= 1.0.1 =
* Separate logged in and logged out aggregation

= 1.0 =
* First release
* aggregates JavaScript files

== Upgrade Notice ==

= 2.2.0 =
End of life: this plugin is no longer maintained - please deactivate and delete it. On WordPress 6.3 and newer it drops every script added with wp_add_inline_script() and loses defer/async, so pages can be missing script configuration. Nothing needs to replace it; over HTTP/2 the individual files are fine.

= 2.0.3 =
* you will have to reactivate the plugin because main php file was renamed in version 2.0.3
