Photo Directory, letting the site owner choose an * output format for imported photos when this server's image editor can * actually produce one. Deliberately gated on WebP support specifically: * if the server can't produce WebP, imported photos keep their original * format and no format picker is shown at all, since AVIF-only support * with no WebP is not a configuration this plugin tries to accommodate. */ class PhotoFetch_Settings { const OPTION_NAME = 'photofetch_image_format'; const QUALITY_OPTION_NAME = 'photofetch_image_quality'; const PAGE_SLUG = 'photofetch-settings'; const DEFAULT_QUALITY = 82; // Matches core's own default JPEG compression quality. /** * Registers the settings page under the Settings menu. */ public static function register_page() { add_options_page( __( 'Photo Directory', 'photofetch' ), __( 'Photo Directory', 'photofetch' ), 'manage_options', self::PAGE_SLUG, array( __CLASS__, 'render_page' ) ); } /** * Registers both settings with the Settings API, so the page's