=== Eco-Shield === Contributors: ssebuwufumoses, hanifahnabayinda Tags: performance, youtube, privacy, lazy load, eco Requires at least: 6.5 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 Boost PageSpeed and reduce carbon footprint by replacing YouTube & Vimeo embeds with a smart, privacy-focused static facade. == Description == **Eco-Shield** is the lightweight, "set-it-and-forget-it" solution for faster, greener WordPress sites. Standard YouTube and Vimeo embeds can significantly slow down websites and lower PageSpeed scores. A single video embed often loads over 1.7MB of JavaScript and tracks your users before they even click play. **Eco-Shield fixes this automatically.** It replaces YouTube and Vimeo embeds with a lightweight "Smart Facade"—a static image that looks exactly like the real player. The heavy video scripts are only loaded when your visitor actually clicks "Play." **Comprehensive Protection:** Eco-Shield automatically detects and optimizes: * **Gutenberg Blocks:** Core YouTube and Vimeo blocks. * **Auto-Embeds (oEmbed):** Plain YouTube/Vimeo URLs pasted into the editor. * **Legacy Iframes:** Hard-coded iframes from YouTube and Vimeo. === Why use Eco-Shield? === * **🚀 Instant Speed Boost:** Drastically reduces initial page size (often by 1MB+ per video). * **🌱 Eco-Friendly:** Reduces data transfer and server energy usage, lowering your site's carbon footprint. * **🔒 Privacy First (GDPR/DSGVO):** Blocks third-party tracking cookies and scripts until the user explicitly interacts with the content. * **⚡ Zero Configuration:** No confusing settings. No bloat. Just activate it, and your site is instantly faster. == Installation == 1. Upload the `eco-shield.zip` file to the `/wp-content/plugins/` directory. 2. Activate the plugin through the 'Plugins' menu in WordPress. 3. **That's it!** There are no settings to configure. Your videos are automatically protected. == Frequently Asked Questions == = Where is the settings page? = There isn't one! Eco-Shield is designed to be "Zero Config." We believe performance shouldn't require a manual. Once activated, it automatically protects all YouTube and Vimeo embeds in your posts and pages. = Does this work with block themes (Full Site Editing)? = Yes. We hook into `render_block` to ensure compatibility with modern block themes as well as classic `the_content` filters. = Does this support Vimeo? = Yes. It supports both YouTube and Vimeo standard URLs and embeds. = Is it compatible with caching plugins? = Yes. Because our replacement happens on the server side (PHP) before the page is cached, it is fully compatible with WP Rocket, LiteSpeed, W3 Total Cache, and others. == Screenshots == 1. The Smart Facade: A professional thumbnail overlay on a live post looks exactly like a real player. 2. Backend Preview: Showing that the editor still works normally for content creators. 3. Performance Boost: Before and After PageSpeed comparison showing reduced page size. == Changelog == = 1.0.0 = * Initial release. * Added core "Smart Facade" engine for YouTube and Vimeo. * Implemented lazy loading for privacy and performance. * Added support for Blocks, oEmbeds, and Iframes.