Two improvements after v0.2.1 deploy revealed the avif_status bug wasn't fully fixed: Fix: Format_Generator::make_avif() now calls record_avif_outcome() at the end of the synchronous path. Previously only the cron path recorded outcomes, so wp h4b-img generate-missing-siblings (synchronous) left 4067 stale 'queued' rows even though it successfully generated 603 AVIFs on disk. process_avif_job() simplified to a thin wrapper around make_avif(avif_async=false). Added: wp h4b-img reconcile-meta — walks _h4b_img_optim postmeta, checks for .webp / .avif files on disk, and updates avif_status / webp size fields to match reality. One-shot reconciliation for stale records left by earlier plugin versions. --dry-run supported. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
29 lines
975 B
PHP
29 lines
975 B
PHP
<?php
|
|
/**
|
|
* Plugin Name: H4B Image Optim
|
|
* Plugin URI: https://gitea.help4bis.com/help4bis/h4b-image-optim
|
|
* Description: ICC-safe image optimisation with WebP + AVIF generation. Replaces Smush Pro without the grey-wash bug. No CDN.
|
|
* Version: 0.2.2
|
|
* Author: help4bis (Henk + Claude)
|
|
* Author URI: https://help4bis.com
|
|
* License: GPL-2.0-or-later
|
|
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
|
|
* Requires PHP: 8.1
|
|
* Requires at least: 6.4
|
|
* Text Domain: h4b-image-optim
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
define( 'H4B_IMG_OPTIM_VERSION', '0.2.2' );
|
|
define( 'H4B_IMG_OPTIM_FILE', __FILE__ );
|
|
define( 'H4B_IMG_OPTIM_DIR', plugin_dir_path( __FILE__ ) );
|
|
define( 'H4B_IMG_OPTIM_URL', plugin_dir_url( __FILE__ ) );
|
|
define( 'H4B_IMG_OPTIM_SLUG', 'h4b-image-optim' );
|
|
|
|
require_once H4B_IMG_OPTIM_DIR . 'includes/class-plugin.php';
|
|
|
|
H4B\ImageOptim\Plugin::instance()->boot();
|