class-css-safelist.php

Shared CSS safelist guard for the Used_CSS and Critical_CSS pipelines.

Source includes/Assets/class-css-safelist.php1 min readPart of Performance Optimisation

includes/Assets/class-css-safelist.php

Shared CSS safelist guard for the Used_CSS and Critical_CSS pipelines.

Namespace: PerformanceOptimise\\Inc · Lines: 83

Class Css_Safelist

Shared CSS safelist guard.

Source: includes/Assets/class-css-safelist.php, line 25

class Css_Safelist

Tags: @since 2.2.0

publicstatic get_elementor_presets()

public static function get_elementor_presets(): array

Shared Elementor/popup preset selectors preserved by both pipelines.

Return: string[].

Tags: @since 2.2.0

Source: includes/Assets/class-css-safelist.php, line 33

publicstatic passes_elementor_smoke()

public static function passes_elementor_smoke(string $html, string $purged_css): bool

Whether purged CSS keeps required Elementor tokens.

ParameterTypeDefaultDescription
$htmlstring—Source HTML.
$purged_cssstring—Purged CSS under test.

Return: bool — True when the CSS passes the smoke check.

Tags: @since 2.2.0

Source: includes/Assets/class-css-safelist.php, line 60