feat: initial v0.1.0 MVP
Replaces Smush Pro's optimisation pipeline without the grey-wash bug. CLI commands working: wp h4b-img status wp h4b-img optimise --id=<n> wp h4b-img bulk wp h4b-img rescue Verified on dev.rds.ink: - ICC profile preservation works (the Smush-bug fix) - Bulk: 20 attachments → 487 KB saved (10.4%), 0 errors - Rescue: end-to-end mechanism verified on WorkingAsOne_horse fixture - WebP synchronous, AVIF queued via WP-Cron - Originals backed up to wp-content/h4b-img-originals/ See CHANGELOG.md for details + ../DESIGN-h4b-image-optim.md for architecture. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
21
uninstall.php
Normal file
21
uninstall.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Clean removal. Only deletes options + cron; leaves files in place
|
||||
* (backups + .webp/.avif siblings) so removal is non-destructive.
|
||||
*
|
||||
* @package H4B\ImageOptim
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
delete_option( 'h4b_image_optim_settings' );
|
||||
wp_clear_scheduled_hook( 'h4b_img_prune_originals' );
|
||||
wp_clear_scheduled_hook( 'h4b_img_generate_avif' );
|
||||
|
||||
// Do NOT delete:
|
||||
// - wp-content/uploads/h4b-img-originals/ (user backups)
|
||||
// - .webp / .avif sibling files
|
||||
// - _h4b_img_optim postmeta (audit trail)
|
||||
// User can remove these manually via WP-CLI: wp h4b-img purge --confirm
|
||||
Reference in New Issue
Block a user