=== Minify Inline CSS/JS ===
Contributors: snehalpancholi
Tags: performance, minify, CSS, JavaScript, speed
Requires at least: 6.0
Tested up to: 6.7
Stable tag: 1.0.0
Requires PHP: 8.1
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Strip whitespace and comments from inline <style> and <script> blocks to reduce HTML page weight.

== Description ==

Many themes and plugins output inline CSS and JavaScript that contains developer-friendly whitespace, indentation, and comments. While this is great for reading the source, it adds unnecessary bytes to every page response.

Minify Inline CSS/JS uses output buffering to process the final HTML and compact inline `<style>` and `<script>` blocks before the page is sent to the browser.

**Features:**

* Minifies inline `<style>` blocks (CSS whitespace and comment stripping)
* Minifies inline `<script>` blocks (JS blank line and whitespace collapsing)
* Safe mode preserves license comments (`/*!`) and avoids regex patterns that could break JS with embedded strings
* External .css and .js files are never touched
* Skips `application/json` and `application/ld+json` script blocks
* Skips scripts with a `src` attribute
* Optional admin page exclusion
* On/off master toggle — safe to disable without losing settings

== Installation ==

1. Upload `minify-inline-css-js` to `/wp-content/plugins/`.
2. Activate the plugin.
3. Go to **Settings → Minify Inline**.
4. Enable minification and choose your options.
5. Save.

== Frequently Asked Questions ==

= Could this break my site? =
With Safe Mode on, the risk is very low. Safe mode only collapses blank lines and trims leading/trailing whitespace in JS, and only strips non-license CSS comments. If you turn off Safe Mode, test thoroughly as aggressive regex patterns can theoretically break JS with unusual string content.

= Does this compress external .css/.js files? =
No. This plugin only processes inline code in `<style>` and `<script>` tags in the HTML output. For external files, use a full asset optimization plugin.

== Changelog ==

= 1.0.0 =
* Initial release.
