HEX
Server: Apache
System: Linux digivps 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC 2025 x86_64
User: root (0)
PHP: 8.3.15
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/biographybirthday.com/wp-content/plugins/webp-express/lib/migrate/migrate4.php
<?php

namespace WebPExpress;

use \WebPExpress\Config;
use \WebPExpress\Messenger;
use \WebPExpress\Option;

function webpexpress_migrate4() {
    $config = Config::loadConfig();

    if ($config !== false) {
        if (isset($config['cache-control'])) {
            switch ($config['cache-control']) {
                case 'no-header':
                    break;
                case 'custom':
                    break;
                default:
                    $config['cache-control-max-age'] = $config['cache-control'];
                    $config['cache-control'] = 'set';
                    $config['cache-control-public'] = true;
                    Config::saveConfigurationFile($config);
            }
        }

        if (isset($config['fail']) && ($config['fail'] != 'original')) {
            $config['operation-mode'] = 'tweaked';
            if (Config::saveConfigurationFile($config)) {
                Messenger::addMessage(
                    'info',
                    'WebP Express 0.10 introduces <i>operation modes</i>. Your configuration <i>almost</i> fits the mode called ' .
                        '<i>Standard</i>, however as you have set the <i>Response on failure</i> option to something other than ' .
                        '<i>Original</i>, your setup has been put into <i>Tweaked</i> mode. ' .
                        '<a href="' . Paths::getSettingsUrl() . '">You might want to go and change that</a>.'
                );
            }
        }

        if (isset($config['redirect-to-existing-in-htaccess']) && ($config['redirect-to-existing-in-htaccess'])) {
            Messenger::addMessage(
                'info',
                'In WebP Express 0.10, the <i>.htaccess</i> rules has been altered a bit: The Cache-Control header is now set when ' .
                    'redirecting directly to an existing webp image.<br>' .
                    'You might want to <a href="' . Paths::getSettingsUrl() . '">go to the options page</a> and re-save settings in order to regenerate the <i>.htaccess</i> rules.'
            );
        }

        if (!isset($config['redirect-to-existing-in-htaccess'])) {
            Messenger::addMessage(
                'info',
                'In WebP Express 0.10, the "Redirect directly to converted image when available" option is no longer in beta. ' .
                    'You might want to <a href="' . Paths::getSettingsUrl() . '">go and activate it</a>.'
            );
        }

    }

    // PSST: When creating new migration files, remember to update WEBPEXPRESS_MIGRATION_VERSION in admin.php
    Option::updateOption('webp-express-migration-version', '4');

}

webpexpress_migrate4();