$c) { if (!isset($c['converter'])) { continue; } if ($c['converter'] == 'ewww') { //unset($wodOptions['webp-convert']['convert']['converters'][$i]); array_splice($wodOptions['webp-convert']['convert']['converters'], $i, 1); //$successfulWrite = Config::saveConfigurationFileAndWodOptions($config); $successfulWrite = FileHelper::saveJSONOptions($configDir . '/wod-options.json', $wodOptions); return $successfulWrite; } } } /** * Mark ewww api keys as non functional. * * Current implementation simply removes ewww from wod-options.json. * It will reappear when options are saved - but be removed again upon next failure * * @return boolean If it went well. */ public static function markApiKeysAsNonFunctional($apiKeysToMarkAsNonFunctional, $configDir) { //self::markApiKeysAsNonFunctionalInConfig($apiKeysToMarkAsNonFunctional, $configDir); // TODO: We should update the key to api-key-2 the first time. // But I am going to change the structure of wod-options so ewww becomes a stack converter, so // I don't bother implementing this right now. self::removeEwwwFromWodOptions($apiKeysToMarkAsNonFunctional, $configDir); } }