=== Selective Thumbnail Regenerator ===
Contributors: rberet
Tags: thumbnails, media, regenerate, images, thumbnail regenerator
Requires at least: 5.5
Tested up to: 6.9
Requires PHP: 7.0
Stable tag: 1.0.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

A WordPress plugin that allows users to regenerate thumbnails for media files uploaded in specific months and years.

== Description ==

The Selective Thumbnail Regenerator plugin provides a convenient way to regenerate image thumbnails for WordPress media libraries. Unlike other thumbnail regeneration plugins that process the entire library, this plugin allows you to selectively regenerate thumbnails for images uploaded during a specific year and month.

= Key Features =

* **Date-based Selection**: Choose a specific year and month to limit which thumbnails are regenerated
* **Thumbnail Size Selection**: Choose which specific thumbnail sizes to regenerate instead of all sizes
* **Batch Processing**: Process multiple images per request for faster regeneration
* **Cancel Support**: Stop the regeneration process at any time with the cancel button
* **Summary Report**: View a detailed summary after regeneration with success/failure counts and elapsed time
* **Progress Tracking**: Visual progress bar shows the status of the regeneration process
* **User-friendly Interface**: Simple dropdown menu interface for date selection
* **Resource-friendly**: Built-in delay between each regeneration to prevent server overload
* **Real-time Updates**: Status messages show the current progress and any errors

== Installation ==

1. Download the plugin ZIP file.
2. Log in to your WordPress admin panel.
3. Go to Plugins > Add New > Upload Plugin.
4. Upload the ZIP file and click "Install Now".
5. Activate the plugin through the "Plugins" menu in WordPress.

== Usage ==

1. In your WordPress admin panel, navigate to Tools > Selective Thumbnail Regenerator.
2. Select the year and optionally the month for which you want to regenerate thumbnails.
3. Click "Check Number of Images" to see how many images will be processed.
4. Click "Regenerate Thumbnails" to start the regeneration process.
5. Wait for the process to complete - you'll see a progress bar and status updates.

== Frequently Asked Questions ==

= Why would I need to regenerate thumbnails? =

You might need to regenerate thumbnails if:
* You've changed your theme and it uses different thumbnail sizes
* You've modified the thumbnail sizes in WordPress settings
* You've installed a plugin that adds new thumbnail sizes
* Your thumbnails are corrupted or missing

= Will this plugin delete any of my original images? =

No, the plugin only regenerates thumbnail versions of your existing images. The original uploaded images remain untouched.

= How long does the regeneration process take? =

The time depends on several factors, including:
* The number of images in the selected period
* Your server's processing power
* The size of your original images
* The number of thumbnail sizes defined in your WordPress installation

The plugin processes images in batches (5 at a time by default) with a short delay between batches to balance speed and server load.

= Can I cancel the regeneration process? =

Yes, click the "Cancel" button that appears during regeneration. The process will stop after the current batch finishes, and you'll see a summary of what was completed.

= What happens if I close the browser during regeneration? =

The regeneration process will stop if you navigate away from the page or close your browser. You'll need to restart the process when you return.

= Can I regenerate only specific thumbnail sizes? =

Yes, the plugin displays all registered thumbnail sizes with checkboxes. Select only the sizes you need, or leave all unchecked to regenerate all sizes.

== Troubleshooting ==

= Error: "No images found for the selected period" =

This means there are no images in your media library that were uploaded during the selected year and month. Try selecting a different time period.

= The regeneration process is slow =

This is normal behavior. The plugin deliberately adds a 1-second delay between processing each image to prevent server overload. This might make the process seem slow, but it ensures stability.

= The process stops with an error message =

If you encounter an error during regeneration, check your server's PHP error logs for more details. Common issues include memory limits, timeout settings, or file permission problems.

== Changelog ==

= 1.0.3 =
* Feature: Thumbnail size selection - choose which specific sizes to regenerate
* Feature: Cancel button - stop the regeneration process at any time
* Feature: Batch processing - process multiple images per AJAX request for faster regeneration
* Feature: Summary report - view success/failure counts and elapsed time after completion
* Improved: Updated FAQ with new feature documentation

= 1.0.2 =
* Security: Added capability checks to AJAX handlers for improved security
* Removed unnecessary plugin assets
* Removed empty languages folder and Domain Path header
* Code structure improvements

= 1.0.1 =
* Security: Added ABSPATH protection to prevent direct file access
* Compatibility: Updated "Tested up to" value to WordPress 6.8
* Code Standards: Changed all prefixes from 'str' to 'strgrtr' for uniqueness
* Updated main class name to STRGRTR_Thumbnail_Regenerator
* Fixed contributor username in readme
* Updated all JS/CSS/HTML elements to use consistent prefixes

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.0 =
Initial release

= 1.0.1 =
Fixed security issues, updated function prefixes to 'strgrtr' for uniqueness, added ABSPATH protection, and updated compatibility to WordPress 6.8.

= 1.0.2 =
Important security update: Added capability checks to AJAX handlers and removed unnecessary files.

= 1.0.3 =
New features: Thumbnail size selection, cancel button, batch processing, and summary report.