Phase 6: WebP image conversion - Converter for Media plugin with Nginx rewrite rules

This commit is contained in:
Hanson.xyz Dev
2025-11-28 17:16:24 -06:00
parent 91de533da4
commit 78a744ef06
260 changed files with 21138 additions and 5 deletions
@@ -0,0 +1,39 @@
<?php
/**
* Field displayed in plugin settings form.
*
* @var mixed[] $option Data of field.
* @var string $index Index of field.
*
* @package Converter for Media
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<?php if ( $option['info'] ) : ?>
<p><?php echo wp_kses_post( $option['info'] ); ?></p>
<?php endif; ?>
<?php foreach ( $option['values'] as $value => $label ) : ?>
<div class="webpcField">
<input type="radio"
name="<?php echo esc_attr( $option['name'] ); ?>"
value="<?php echo esc_attr( $value ); ?>"
id="<?php echo esc_attr( $option['name'] . '-' . $value ); ?>"
class="webpcField__input webpcField__input--radio"
<?php echo ( in_array( $value, $option['disabled'] ) ) ? 'disabled' : ''; ?>
<?php echo ( $value == $option['value'] ) ? 'checked' : ''; // phpcs:ignore ?>
>
<label for="<?php echo esc_attr( $option['name'] . '-' . $value ); ?>"></label>
<span class="webpcField__label">
<?php echo wp_kses_post( $label ); ?>
<?php if ( $option['values_warnings'][ $value ] ?? null ) : ?>
<span class="webpcField__labelWarning">
<?php echo wp_kses_post( $option['values_warnings'][ $value ] ); ?>
</span>
<?php endif; ?>
</span>
</div>
<?php endforeach; ?>