API / Minn\Theme / StyleLayers

StyleLayers final class

Minn\Theme\StyleLayers · public/minn/src/Minn/Theme/StyleLayers.php · 67 lines

What plugins change about the global stylesheet's layers and nodes, for GlobalStyles: core's preset lists when wp_theme_json_data_default changed core's layer, and the style nodes wp_theme_json_get_style_nodes keeps (probe hook-inputs-2). Without those filters the stylesheet is the engine's own, byte for byte.

Used by 1

Public

staticcorePresets(): array#

Core's preset lists: as stored, unless a plugin changed core's layer (wp_theme_json_data_default), whose lists then stand in for them.

@return array<string, list<array{slug: string, value: string}>>
statickeptBlocks(array $blocks, array $kept): array#

The blocks' styles as far as the kept nodes reach: a block's own declarations with its node, each of its elements with that element's node (the reference lists them apart); a block with neither goes.

$blocksarray<string, mixed>
$keptlist<string>
@return array<string, mixed>
statickeptNodes(array $styles): ?array#

The style nodes a plugin keeps (wp_theme_json_get_style_nodes) as their paths, the root, element and block nodes printed only when kept; null when no plugin filters them.

@return list<string>|null