=== Automatic Asset Version Killer ===
Contributors: spp
Tags: performance, cache, optimization, speed, query strings
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Remove ?ver= from CSS and JavaScript URLs so static assets cache better with CDNs and performance audits.

== Description ==

WordPress appends a `ver` query string to enqueued CSS and JavaScript files so browsers fetch fresh copies after updates. That is useful, but many CDNs, proxies, and tools such as GTmetrix, Pingdom, and PageSpeed Insights flag those URLs as harder to cache.

**Automatic Asset Version Killer** is a lightweight plugin that removes only the `ver` parameter from frontend script and style URLs. No database tables, no front-end JavaScript, and no configuration required after activation.

= How it works =

The plugin hooks into WordPress core filters:

* `script_loader_src` — runs before each JavaScript file is printed
* `style_loader_src` — runs before each stylesheet is printed

When a URL contains `?ver=`, the plugin uses WordPress `remove_query_arg()` to strip that parameter. Admin screens are left untouched so the dashboard keeps normal cache-busting behavior.

= Features =

* Zero setup: enabled automatically on activation
* Frontend only: admin and AJAX in wp-admin are skipped
* Safe: removes only the `ver` query argument
* Developer filters for exclusions and custom behavior
* Tiny footprint with no runtime assets of its own

= Developer hooks =

`spp_avk_excluded_handles` — exclude specific script/style handles

`spp_avk_cleaned_src` — modify the URL after cleanup

`spp_avk_prevent` — return true/false to force enable or disable

== Installation ==

1. Upload the `spp-asset-version-killer` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Optional: open **Settings → Asset Version Killer** to disable cleanup.

== Frequently Asked Questions ==

= Will this break my site? =

For most sites, no. It only removes the `ver` query string from enqueued CSS and JS on the public site. If a theme or plugin depends on that exact URL shape, use the `spp_avk_excluded_handles` filter to skip specific handles.

= Will visitors see old CSS or JS after an update? =

Possibly, if their browser or CDN cached the file without a version string. After theme or plugin updates, clear your site, CDN, and browser cache when styles or scripts look outdated.

= Does it remove other query strings? =

No. Only the `ver` parameter is removed. Other parameters are preserved.

== Screenshots ==

1. Simple settings screen under Settings → Asset Version Killer

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
