=== Chinaready WordPress CDN ===
Contributors: chinaready
Tags: cdn, performance, static assets, china
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Rewrite enqueued WordPress core, plugin, and theme static assets to the Chinaready WordPress CDN for China-reachable delivery.

== Description ==

Chinaready WordPress CDN mirrors WordPress `wp-includes` and curated GPL plugin/theme static files on Alibaba Cloud CDN at [wp-cdn.launchready.cn](https://wp-cdn.launchready.cn/).

This plugin rewrites URLs emitted by `wp_enqueue_script()` and `wp_enqueue_style()` so matching assets load from the CDN when:

* Your site Origin is allowlisted on the CDN product
* The installed WordPress core, plugin, or theme version matches the published CDN snapshot (`manifest.json`)

**What is rewritten**

* WordPress core assets under `wp-includes/`
* Static assets for curated plugins under `wp-content/plugins/{slug}/`
* Static assets for curated themes under `wp-content/themes/{slug}/`

**What is not rewritten**

* Media uploads
* Admin PHP and dynamic endpoints
* Commercial plugins (for example Elementor Pro)
* Optimization-plugin merged bundles with site-specific hashes
* Hard-coded absolute URLs inside HTML or JavaScript

**Allowlist required**

The CDN is restricted to approved Origins (CORS + Referer). After installing this plugin, apply to add your production and staging site URLs:

[https://chinaready.co/contact/](https://chinaready.co/contact/)

**Download**

Same GPL build as WordPress.org:

[https://wp-cdn.launchready.cn/client/chinaready-wp-cdn.zip](https://wp-cdn.launchready.cn/client/chinaready-wp-cdn.zip)

== Installation ==

1. Install from WordPress.org **Plugins → Add New**, or upload `chinaready-wp-cdn.zip` under **Plugins → Add New → Upload Plugin**.
2. Activate **Chinaready WordPress CDN**.
3. Open **Settings → Chinaready WP CDN** and confirm your site Origin is allowlisted.
4. Verify front-end assets load from your configured CDN origin when versions match the snapshot.

Optional `wp-config.php` constants:

`define( 'CHINAREADY_WP_CDN_ORIGIN', 'https://wp-cdn.launchready.cn' );`
`define( 'CHINAREADY_WP_CDN_APPLY_URL', 'https://chinaready.co/contact/' );`

== Frequently Asked Questions ==

= Does this replace a full-site CDN? =

No. It only rewrites selected WordPress static assets. HTML, APIs, uploads, and third-party origins still need your normal hosting or site CDN strategy.

= Why are some assets still served locally? =

The plugin only rewrites enqueued script/style URLs when the installed version matches `manifest.json`. Version mismatches, commercial plugins, and optimizer merged files are left unchanged to avoid 404s.

= Can I disable rewriting for plugins or themes? =

Yes. Use **Settings → Chinaready WP CDN → Rewrite scope**.

== Screenshots ==

1. Settings and CDN snapshot status screen

== Changelog ==

= 1.0.0 =
* Initial WordPress.org release
* Rewrite enqueued core, plugin, and theme static assets
* Settings page with manifest cache and version status table
* Allowlist apply link and direct ZIP download from wp-cdn.launchready.cn

== Upgrade Notice ==

= 1.0.0 =
Initial public release.
