← All changes
|
src/Framework/Support/Facades/Scripts/ScriptAssetFacade.php
+2
-1
4.16.8.1
→
4.18.0
View file →
| @@ -37,11 +37,12 @@ | ||
| 37 | 37 | * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-dependency-extraction-webpack-plugin/#wordpress |
| 38 | 38 | * |
| 39 | 39 | * @return array{dependencies: array<string>, version: int|string} |
| 40 | 40 | * |
| 41 | + * @since 4.18.0 Fall back to the plugin version when the asset file is missing. | |
| 41 | 42 | * @since 2.32.0 |
| 42 | 43 | */ |
| 43 | 44 | public function get(string $path): array |
| 44 | 45 | { |
| 45 | - return file_exists($path) ? require $path : ['dependencies' => [], 'version' => filemtime($path)]; | |
| 46 | + return file_exists($path) ? require $path : ['dependencies' => [], 'version' => GIVE_VERSION]; | |
| 46 | 47 | } |
| 47 | 48 | } |