API / Minn\Runtime / AssetEdits

AssetEdits final class

Minn\Runtime\AssetEdits · public/minn/src/Minn/Runtime/AssetEdits.php · 42 lines

What a plugin did to $wp_scripts->registered or $wp_styles->registered directly, as wp_default_scripts callbacks do (a dependency dropped, a source swapped, an entry unset or added), handed to the registry: each handle as the view showed it last against the view as the plugin left it.

Used by 1

Public

staticapply(Minn\Runtime\Assets $assets, array $edited, array $synced, ?string $only = NULL): void#

The edits applied, for every handle or only the one named. The view changes with each edit the registry takes, so the edited view is read from the copy handed in.

$editedarray<string, mixed>the view as the plugin left it
$syncedarray<string, array{0: mixed, 1: list<string>, 2: mixed, 3: mixed, 4: mixed}>each handle as the view last showed it (source, dependencies, version, args, data)