=== Defer / Async Scripts ===
Contributors: snehalpancholi
Tags: performance, defer, async, javascript, render-blocking
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds defer or async attributes to chosen JavaScript handles to eliminate render-blocking scripts.

== Description ==

Render-blocking JavaScript delays when a browser can first display your page. Defer / Async Scripts lets you add `defer` or `async` loading attributes to any WordPress-enqueued script handle without touching theme code.

**How it works**

* **defer** — The script downloads in parallel with HTML parsing but executes after parsing is complete, in the order declared. Safe for most scripts that interact with the DOM.
* **async** — The script downloads in parallel and executes immediately when ready, without waiting for HTML parsing. Best for independent analytics or tracking snippets.

**Features**

* Per-handle defer list and async list (one handle per line)
* Skips the admin area by default (configurable)
* Skips the login page by default (configurable)
* Shows all currently registered script handles for reference
* Handles already carrying a `defer` or `async` attribute are left untouched

== Installation ==

1. Upload the `defer-async-scripts` folder to `/wp-content/plugins/`.
2. Activate from **Plugins → Installed Plugins**.
3. Configure at **Settings → Defer / Async Scripts**.

== Frequently Asked Questions ==

= Which scripts are safe to defer? =
Most theme scripts are safe to defer. Scripts that inject inline code expecting the library to be loaded synchronously should be tested carefully.

= What if I add a handle to both lists? =
The defer list takes priority.

= Will this affect admin or the editor? =
By default both are skipped. Uncheck the "Skip in admin" option to apply in the admin area.

== Changelog ==

= 1.0.0 =
* Initial release.

== Screenshots ==

1. Settings page showing defer handle list, async handle list, and skip toggles.
2. Reference list of all registered script handles.
