get($path); return $assets['dependencies']; } /** * @since 2.32.0 * * @return int|string */ public function getVersion(string $path) { $assets = $this->get($path); return $assets['version']; } /** * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-dependency-extraction-webpack-plugin/#wordpress * * @return array{dependencies: array, version: int|string} * * @since 4.18.0 Fall back to the plugin version when the asset file is missing. * @since 2.32.0 */ public function get(string $path): array { return file_exists($path) ? require $path : ['dependencies' => [], 'version' => GIVE_VERSION]; } }