| @@ -20,16 +20,16 @@ | ||
| 20 | 20 | $realPath = rtrim($this->wordpressConfig->getRealPath(), DIRECTORY_SEPARATOR); |
| 21 | 21 | $path = [$realPath, 'assets']; |
| 22 | 22 | $path = implode(DIRECTORY_SEPARATOR, $path) . DIRECTORY_SEPARATOR; |
| 23 | 23 | $fileWithPath = $path . self::SUPPORTER_FILE; |
| 24 | - $needsUpdate = $this->php->isFile($fileWithPath) === false | |
| 25 | - || $this->php->fileMTime($fileWithPath) < $this->wordpress->currentTime('timestamp') - 24 * 60 * 60; | |
| 26 | - $fileContent = ($needsUpdate === true) ? $this->php->fileGetContents(self::SUPPORTER_FILE_URL) : false; | |
| 24 | + $needsUpdate = is_file($fileWithPath) === false | |
| 25 | + || filemtime($fileWithPath) < $this->wordpress->currentTime('timestamp') - 24 * 60 * 60; | |
| 26 | + $fileContent = ($needsUpdate === true) ? @file_get_contents(self::SUPPORTER_FILE_URL) : false; | |
| 27 | 27 | |
| 28 | 28 | if ($fileContent !== false) { |
| 29 | - $this->php->filePutContents($fileWithPath, $fileContent); | |
| 30 | - } elseif ($this->php->isFile($fileWithPath) === true) { | |
| 31 | - $fileContent = $this->php->fileGetContents($fileWithPath); | |
| 29 | + file_put_contents($fileWithPath, $fileContent); | |
| 30 | + } elseif (is_file($fileWithPath) === true) { | |
| 31 | + $fileContent = file_get_contents($fileWithPath); | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $this->supporters = (is_string($fileContent) === true) ? json_decode($fileContent, true) : []; |
| 35 | 35 | } |