experiments->is_feature_active( 'e_optimized_css_loading' ) === false) {
if ($config['redirect-to-existing-in-htaccess'] === false) {
DismissableMessages::addDismissableMessage('0.23.0/elementor');
}
}
} catch (\Exception $e) {
// Well, just bad luck.
}
}
*/
if (($config['operation-mode'] == 'cdn-friendly') && !$config['alter-html']['enabled']) {
//echo print_r(get_option('cache-enabler'), true);
if ($cacheEnablerActivated) {
if ($webpEnabled) {
Messenger::printMessage(
'info',
'You should consider enabling Alter HTML. This is not necessary, as you have Cache Enabler enabled, which alters HTML. ' .
'However, it is a good idea because currently Cache Enabler does not replace as many URLs as WebP Express (ie ' .
'background images in inline styles)'
);
}
} else {
Messenger::printMessage(
'warning',
'You are in CDN friendly mode but have not enabled Alter HTML (and you are not using Cache Enabler either). ' .
'This is usually a misconfiguration because in this mode, the only way to get webp files delivered ' .
'is by referencing them in the HTML.'
);
}
}
/*
if (!$anyRedirectionToConverterEnabled && ($config['operation-mode'] == 'cdn-friendly')) {
// this can not happen in varied image responses. it is ok in no-conversion, and also tweaked, because one could wish to tweak the no-conversion mode
Messenger::printMessage(
'warning',
'You have not enabled any of the redirects to the converter. ' .
'At least one of the redirects is required for triggering WebP generation.'
);
}*/
if ($config['alter-html']['enabled'] && !$config['alter-html']['only-for-webps-that-exists'] && !$config['enable-redirection-to-webp-realizer']) {
Messenger::printMessage(
'warning',
'You have configured Alter HTML to make references to WebP files that are yet to exist, ' .
'but you have not enabled the option that makes these files come true when requested. Do that!'
);
}
if ($config['enable-redirection-to-webp-realizer'] && $config['alter-html']['enabled'] && $config['alter-html']['only-for-webps-that-exists']) {
Messenger::printMessage(
'warning',
'You have enabled the option that redirects requests for non-existing webp files to the converter, ' .
'but you have not enabled the option to point to these in Alter HTML. Please do that!'
);
}
if ($config['image-types'] == 3) {
$workingConverters = ConvertersHelper::getWorkingAndActiveConverters($config);
if (count($workingConverters) == 1) {
if (ConvertersHelper::getConverterId($workingConverters[0]) == 'gd') {
if (isset($workingConverters[0]['options']['skip-pngs']) && $workingConverters[0]['options']['skip-pngs']) {
Messenger::printMessage(
'warning',
'You have enabled PNGs, but configured Gd to skip PNGs, and Gd is your only active working converter. ' .
'This is a bad combination!'
);
}
}
}
}
/*
if (Config::isConfigFileThereAndOk() ) { // && PlatformInfo::definitelyGotModEnv()
if (!isset($_SERVER['HTACCESS'])) {
Messenger::printMessage(
'warning',
"Using rewrite rules in .htaccess files seems to be disabled " .
"(The AllowOverride directive is probably set to None. " .
"It needs to be set to All, or at least FileInfo to allow rewrite rules in .htaccess files.)
" .
"Disabled .htaccess files is actually a good thing, both performance-wise and security-wise.
" .
"But it means you will have to insert the following rules into your apache configuration manually:" .
"
" . htmlentities(print_r(Config::hmmm(), true)) . "" ); } }*/ if (!Paths::createContentDirIfMissing()) { Messenger::printMessage( 'error', 'WebP Express needs to create a directory "webp-express" under your wp-content folder, but does not have permission to do so.
You have turned on ' . implode(' and ', $turnedOn) . '. However, ' . (count($turnedOn) == 2 ? 'these features' : 'this feature') . ' does not work on your current server settings / wordpress setup, ' . ' because the PHP scripts in the plugin folder (in the "wod" and "wod2" subfolders) fails to run ' . ' when requested directly. You can try to fix the problem or simply turn ' . (count($turnedOn) == 2 ? 'them' : 'it') . ' off and rely on "Convert on upload" and "Bulk Convert" to get the images converted.
' . 'If you are going to try to solve the problem, you need at least one of the following pages ' . 'to display "pong": ' . 'wod-test' . ' or wod2-test' . '. The problem will typically be found in the server configuration or a security plugin. ' . 'If one of the links results in a 403 Permission denied, look out for "deny" and "denied" in ' . 'httpd.conf, /etc/apache/sites-enabled/your-site.conf and in parent .htaccess files.' . '
.' ); } // We currently allow the "canRunTestScriptInWOD" test not to be stored, // If it is not stored, it means .htaccess files are pointing to "wod" // PS: the logic of where it is stored happens in HTAccessRules::getWodUrlPath // - we mimic it here. $pointingToWod = true; // true = pointing to "wod", false = pointing to "wod2" $hasWODTestBeenRun = isset($storedCapTests['canRunTestScriptInWOD']); if ($hasWODTestBeenRun && !($storedCapTests['canRunTestScriptInWOD'])) { $pointingToWod = false; } $canOnlyRunInWod = $canRunInWod && !$canRunInWod2; if ($canOnlyRunInWod && !$pointingToWod) { Messenger::printMessage( 'warning', 'The conversion script cannot currently be run. ' . 'However, simply click "Save settings and force new .htaccess rules" to fix it. ' . '(this will point to the script in the "wod" folder rather than "wod2")' ); } $canOnlyRunInWod2 = $canRunInWod2 && !$canRunInWod; if ($canOnlyRunInWod2 && $pointingToWod) { Messenger::printMessage( 'warning', 'The conversion script cannot currently be run. ' . 'However, simply click "Save settings and force new .htaccess rules" to fix it. ' . '(this will point to the script in the "wod2" folder rather than "wod")' ); } } if (HTAccessRules::arePathsUsedInHTAccessOutdated()) { $pathsGoingToBeUsedInHtaccess = [ 'wod-url-path' => Paths::getWodUrlPath(), ]; $config2 = Config::loadConfig(); if ($config2 === false) { Messenger::printMessage( 'warning', 'Warning: Config file cannot be loaded. Perhaps clicking ' . 'Save settings will solve it