=== WP Retro Version Manager - Retro Themes and Plugins ===
Contributors: sadathimel, themedot
Plugin URI: https://github.com/sadathimel/retro-version-manager  
Tags: plugines and themes version, downgrade theme and plugin, wordpress plugin and theme manager, version control
Requires at least: 6.3  
Tested up to: 6.8  
Stable tag: 1.0.4  
Requires PHP: 7.4  
License: GPLv2 or later  
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Easily browse, download, or install older versions of WordPress plugins and themes from WordPress.org. Perfect for testing or restoring compatibility.

== Description ==

**WP Retro Version Manager - Retro Themes and Plugins** simplifies managing WordPress plugin and theme versions. Whether you need to downgrade a plugin like `wordpress-seo` or a theme like `twentytwenty` due to compatibility issues, this tool lets you search, download, or install specific versions directly from the WordPress.org repository.

**Key Features:**

- **Search Plugin and Theme Versions**: Enter a plugin or theme slug (e.g., `wordpress-seo`, `twentytwenty`) to view all available versions. The installed version (if any) is shown at the top.
- **Install Older Versions**: Install any version with one click, provided it is not already installed.
- **Download ZIP Files**: Save plugin or theme ZIPs for manual installation or backups.
- **User-Friendly Interface**: Clean, modern design with clear instructions.
- **Safe and Secure**: Uses WordPress core APIs for reliable downloads and installations.

**Important Note:**  
If a plugin or theme is already installed, you must manually deactivate and delete it from the Plugins or Themes page before installing a different version. Some themes like bundled ones (e.g., `twentytwenty`) may have limited version history.

== Installation ==

1. Upload the `retro-version-manager` folder to the `/wp-content/plugins/` directory.  
2. Activate the plugin through the 'Plugins' menu in WordPress.  
3. Navigate to **Tools > Retro Version Manager** in your dashboard.  
4. Select whether to search for a plugin or theme, enter the slug (e.g., `wordpress-seo`, `twentytwenty`), and search versions.  
5. Install or download as needed.  
6. If the plugin or theme is already installed, deactivate and delete it before installing a different version.

== Frequently Asked Questions ==

= Can I downgrade any WordPress plugin or theme? =  
Yes, as long as it's hosted on WordPress.org and has older versions available. Some themes (like `twentytwenty`) may have limited version history. Older versions may be available in the WordPress core SVN: https://core.svn.wordpress.org/tags/

= Will installing a new version replace the old one? =  
No. You must manually deactivate and delete the existing plugin or theme before installing another version.

= Is it safe to downgrade plugins or themes? =  
It can solve compatibility issues but may introduce vulnerabilities. Always back up your site first.

= Can I download plugin or theme versions without installing? =  
Yes! Use the "Download ZIP" option to save a version for manual installation or backup.

= How do I know which version is installed? =  
The currently installed version appears at the top when you search for a plugin or theme.

== Screenshots ==

1. **Admin Interface** – Search plugin or theme versions with a clean design.  
2. **Version List** – View available versions with options to install or download.  
3. **Success Notice** – Confirmation after installing a version with activation instructions.

== Changelog ==

= 1.0.4 =
* Added theme version management.
* UI toggle for plugin/theme selection.
* Secure theme installation logic added.
* Improved handling of bundled themes.
* Enhanced error messages and download timeout handling.
* Caching added for faster performance.
* Improved error logging.

= 1.0.3 =
* Addressed WordPress.org review feedback.
* All outputs properly escaped.
* JavaScript URL and dialog visibility fixed.

= 1.0.2 =
* Removed usage of `WP_PLUGIN_DIR`/`WP_CONTENT_DIR`, used `plugin_dir_path()`.
* Removed automatic plugin deactivation/deletion – manual action required.
* Removed debug logging.
* Added nonce and permission checks.
* UI updated for clarity.

= 1.0.1 =
* Fixed security issues.
* Improved nonce and input validation.
* Removed unused translation loading.
* Updated internal prefixes for uniqueness.

= 1.0.0 =
* Initial release.
* Plugin version search, install, and download support.
* Currently installed version shown at top.

== Upgrade Notice ==

= 1.0.4 =  
Major update! Now supports WordPress **theme** versions. Improved reliability, error handling, and performance. Requires manual deactivation/deletion before switching versions.

= 1.0.3 – 1.0.0 =  
Security, compliance, and UI updates. See changelog for full details.

== External Services ==

This plugin uses official WordPress APIs to fetch plugin and theme data.

**WordPress.org Plugin API**  
- Purpose: Fetch plugin version info.  
- Data sent: Plugin slug (e.g., `wordpress-seo`).  
- When: On user request during version search.  
- Terms: https://wordpress.org/about/terms/  
- Privacy: https://wordpress.org/about/privacy/

**WordPress.org Theme API**  
- Purpose: Fetch theme version info.  
- Data sent: Theme slug (e.g., `twentytwenty`).  
- When: On user request during version search.  
- Terms: https://wordpress.org/about/terms/  
- Privacy: https://wordpress.org/about/privacy/

== Support ==

If you find this plugin helpful, [Buy Me a Coffee](https://www.buymeacoffee.com/) to support development, or report issues via the [WordPress.org support forum](https://wordpress.org/support/plugin/retro-version-manager/).

