Make WordPress Core

Timestamp:
09/25/2023 10:14:11 PM (8 months ago)
Author:
costdev
Message:

Filesystem API: Introduce filters for before/after unzipping archives.

This introduces the following new filters which wrap the process of unzipping an archive:

  • pre_unzip_file - Filters archive unzipping to allow an override with a custom process.
  • unzip_file - Filters the result of unzipping an archive.

Both filters pass the following:

  • string $file - Full path and filename of ZIP archive.
  • string $to - Full path on the filesystem to extract archive to.
  • string[] $needed_dirs - A full list of required folders that need to be created.
  • float|false $required_space - The space required to unzip the file and copy its contents, with a 10% buffer.

Props dfavor, azaozz, oglekler, afragen, costdev.
Fixes #37719.

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.