Plugin Updates

This commit is contained in:
Tony Volpe
2024-04-02 20:23:21 +00:00
parent 96800520e8
commit 94170ec2c4
1514 changed files with 133309 additions and 105985 deletions

View File

@@ -47,13 +47,15 @@ class Display implements SubscriberInterface {
}
$enabled = isset( $values['display_nextgen'] ) ? true : false;
$was_enabled = (bool) get_imagify_option( 'display_nextgen' );
$result = false;
if ( $enabled ) {
// Add the AVIF file type.
if ( $enabled && ! $was_enabled ) {
// Add the WebP file type.
$result = $this->get_server_conf()->add();
} elseif ( ! $enabled ) {
// Remove the AVIF file type.
} elseif ( ! $enabled && $was_enabled ) {
// Remove the WebP file type.
$result = $this->get_server_conf()->remove();
}